sillsdev / sillsdev/ptx2pdf

Verse range appearing outside column

Open
#1,102 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

No action
Dominant language
Python
Stars
33
Forks
15
PR merge metrics
No merged PRs in 30d

Description

This has been mentioned before but a hack that worked earlier is now not working.

The problem occurs in LUK 1:70-71 which is a verse range on poetry and this is the output without any modifications:

Image

You can see that the verse number extends to the left beyond the text column. In an earlier version of PTXPrint, I was able to get around this by creating a style specifically for this verse and this was the modificed output:

Image

However, the current version of PTXPrint (2.9.8) produces this:

Image

with an * appearing that wasn't there before.
The style I created was a copy of \q1 with modified indent factors:

Image

As far as the source text is concerned, this is what is in Paratext:

Image

I've had some problems inserting the modified marker but this is what is in the changes.txt file:

at LUK 1:69 "(जाट्‌नने।)[\r\n\s]\q" > "\1\n\zqlk170"

which produces this in the Final SFM:

\q^103 \v 69 होसकै कानुङ लागि लहो सेवक दाऊदौ वंशाङ काट शक्‍तिशाली
\q मुक्‍तिदाता खडा जाट्‌नने। \zqlk170 \v 70-71 होसकै काल्‍हाकी शत्रुकुङ मीहुटीङ र काल्‍हाकी घृणा जाट्‍चको लकीङ
\zqlk170*
\q जीवाटाक्‍ले डेच कुरा लहो पवित्र
\q अगमवक्‍ताकुङ मेङ्‌गेरीङ खायाक लकीङ ङाक्‍ङन्‍या।
\q \v 72 होसकै काल्‍हौ बोइ बाज्‍युकोखाटा जाट्‍च पवित्र

You can see that the new marker has replaced the \q in the right place but the \n seems to have been ignored, so it is not starting on a new line.
Also, a \zqlk170* has been added to the end of the line when this does not exist as a marker. In PTXPrint, to create the new marker, I went to the \q1 style and clicked Add, to create this:

Image

There is no end marker, so I don't know why this new endmarker is appearing and I'm wondering if it is the source of the * that is now appearing.

Any solutions much appreciated!

Archive attached.

Thanks.

Alastair

EMagar-Sep2025PTXprintArchive_2_9_8_202509261527.zip

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing LUK 1:69-72 from the attached archive in PTXPrint 2.9.8, then inspect changes.txt and the generated Final SFM around the \zqlk170 marker. Compare the q1-derived style and the output with and without the marker. Done means the verse range stays within the text column, begins on the intended new line, and does not gain a spurious end marker or asterisk.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.