A custom footnote caller not rendered correctly

I have a project where the asterisk is used as the main footnote caller. But in some specific cases (when it’s the second footnote in the same verse) there should be two asterisks. So the plain SFM looks the following:

\p \v 1 Civîna Entakyayêda çend p'êxember û dersdar hebûn, Barnabas, Şimh'ûnê ku jêr'a Nîgêr\f + \fr 13:1 \ft «Nîgêr» jî çawa «merivê ç'ermê r'eş» tê fe'mkirinê.\f* digotin, Lûkyoyê ji Kûrênê, Menayînê ku t'evî Hêrodesê%f serwêr\f ** \fr 13:1 \ft Eva Hêrodesa, awa gotî Hêrodes-Antîpas, serwêrê Celîlê bû (\xt Lûqa 3:1\xt*).\f* mezin bibû û Şawûl.

This is how it looks in Paratext Preview mode and how I want it to look in PDF:

The first footnote looks OK, but the second one is incorrect:

  • one asterisk instead of two in the text
  • in the footnotes section the second asterisk is different and separated with a space.

On the View+Edit > Final SFM tab I see that the second footnote marker has been changed:

\f * \asterisk\space

I know that this file can’t be edited in PTXprint, but the original Paratext file is formatted correctly! I tried t use “Advanced > Apply Changes.txt (and PrintDraftChanges.txt) > Edit” function, added a string to substitute \f * \asterisk\space with \f **

"\\f .\\asterisk\\space" > "\\f  \\*\\*"

But the result is the same. Is there a way to render this custom caller correctly, like in Paratext?

I just tested, and it looks like any two-character sequence will get broken up by this. I tried “hi”, and got the “h” as a superscript and the “i” as part of the footnote. And actually “12” failed also, though when using “+” you can certainly get double-digit numbers.

I also looked at the USFM documentation, and I don’t see anything stating that a footnote caller can’t be multiple characters, so I suspect this might be a bug. I tried to figure out a hack to get around it, but was unsuccessful.

If you don’t get a solution soon, you could consider using \u2051, ⁑, two asterisks aligned vertically.

1 Like

I’ve just taken the slightly scary (for me) step of messing with a regular expression in the python code… It seems to do what we want and not crash anything. Assuming the python experts don’t revert it, then it’ll be fixed in 2.3.13.

1 Like

Updated PTXprint to 2.3.16, now the footnotes with “**” simply disappeared completely: no callers in the text, no footnotes. :sweat:

Hmm. It seems that the python code is trying to be too helpful, and doesn’t like letting *s through unaltered. Hopefully Martin will be able to fix it soon.
For me it’s turning \f ** \fr ... into \f * \asterisk\space \fr ...
I don’t know how familiar you are with the “Advanced” tab, but on there you can enable the changes file, and in that you could put a line like this:

"\\f \*\*" > "\\f @@"

That ought to change \f ** into \f @@ (in the temporary copy of your SFM file which PTXprint uses to print from, NOT your original paratext file - that stays unchanged).
I realise that \f @@ isn’t what you want, but based on my quick test, it should at least print! You can then comment out that line (put # at the start of the line) to see if things are working later on.

This has been fixed now in version 2.3.17, and you should be able to use multi-character footnote callers, even if there are 2 ** in a row.

I’ve tested PTXprint 2.3.18, it works perfectly, the issue is fixed! Thank you so much!