+1 vote

I have a recently-completed text that we are trying to put into the DBL. OT quoted in the NT is tagged with \qt, always with an appropriate closing marker \qt*. Unfortunately, any \qt containing a footnote is being flagged as a marker error (the exact error is “Character style not closed”). So, this seems to be a nesting error.

Romans 9:20

\v 20 Mi ɓah hi̧ mu ɓahri, a wo nzuk pirmatul, mu ɓa fe mí mu fah Ŋgerzah le wo~?
\qt Iri ɓay ɓah hi̧ nzuk-mboh ni ɓahri, ɓay fe mí mu mboh mi kaŋay le wo
\f + \fr 9.20 \fr* \ft Ŋgerzah ɓah kaŋ ɓil Mbete Jérémie 18.1-6 ke Mbete Esaïe
29.16 ke 45.9 ke 64.7 sew ké gun Izarayelri kpuh tul ziŋ Ŋgerzah. \f*~? \qt*

Do we really need to break \qt before and after footnotes? This would avoid the error, but it seems more reasonable to have a footnote inside a character style. Is there a better structure? Should I simply deny the errors?

Ideas?

Paratext by (231 points)
reshown

1 Answer

+1 vote
Best answer

Yes you really need to break \qt before and after footnotes (and verse numbers and paragraph markup). No you cannot avoid it. I posted a method to help simplify the markup of \wj passages here: Regex to insert intermediate \wj and \wj* markers It can be adapted to do the same for \qt …\qt* markers.

by (1.8k points)
reshown

I was about to say the same CrazyRocky, it is confusing because it gaves a missing closing error for the first segment before the footnote and a missing beginning at the end of the quote.

Thanks all, I got it solved. And this got me through the checks.
When I got to the USX checks, I was running into major nesting errors. This NT had some tags closed that shouldn’t have closing tags, like \fk and \fqa, and these were causing silent errors that pointed toward other culprits. After that, there was still some leftover nesting to find that needed plusses. Eventually, I got everything sorted out, and along the way I learned a lot about footnote structure, and how challenging the Footnote SFM markup is.


About 1/3 of the \f… “character (note)” class markers have closing markers, and the rest shouldn’t, but adding one doesn’t create a marker error in the basic checks. Are we ready to move to USX yet and forego USFM’s ambiguity? :slight_smile:

@Matthew_Lee Here is a regex for Regex Pal to fix closing markers in footnotes:
Find:

(?<=\\([f])\s)(?s).*?(?=\\\1\*):::(?<=\\(f\w+\s)([^\\]|\\(?!f))*?\\(f\w+).*?)\\\3\*(\s*)(\\\1)?

Replace:

\4\\\1

What this does is take something like:

\ft Text \fqa Alternate Text\fqa* More text.\f*

And change it to:

\ft Text \fqa Alternate Text \ft More text.\f*

The first \ft is captured and is used to replace \fqa* and the space before “More Text” is captured and moved before the \ft .

Add this to userMenu.txt:

Fix footnote closers#r#(?<=\\([f])\s)(?s).*?(?=\\\1\*):::(?<=\\(f\w+\s)([^\\]|\\(?!f))*?\\(f\w+).*?)\\\3\*(\s*)(\\\1)?#\4\\\1

Related questions

0 votes
3 answers
Paratext Mar 30, 2023 asked by Paul (615 points)
0 votes
1 answer
0 votes
1 answer
Paratext Mar 1, 2023 asked by mnjames (1.8k points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Just as a body, though one, has many parts, but all its many parts form one body, so it is with Christ.
1 Corinthians 12:12
2,616 questions
5,350 answers
5,037 comments
1,419 users