Does ptxPrint support user-defined backslash markers like \zn...\zn*?

In the past, I read in some USFM documentation that there is a namespace \z… reserved for user-defined markers. In my Paratext project, I use several backslash markers for character-level markup, e.g.:

\zd for text that I would suggest to delete, which should be hidden in a draft printout
\zs for suggested text that I want to show in a draft printout
\zh for hidden suggested text
\zgl for grammatical labels (e.g. RC - relative clause) to help me find certain grammatical structures that I want to investigate further. This is also hidden text.

The idea is that my national colleagues in the translation team can see my suggestions right there in the text in Paratext, and don’t have to open any Notes.

Those character styles work just fine on screen. They are displayed exactly as formatted in the custom.sty stylesheet, but they cause PTXprint to throw an error. (By the way, Paratext 9’s “export draft PDF” also throws an error with those markers; it also uses XeTeX to create the pdf file.)

Any suggestions what I could do about this?

(My Paratext project uses USFM 2.)

Hi Rainer, Thanks for posting a great question!

Yes, there are ways to support these user-defined markers. If you have already defined these styles in either custom.sty or ptxprint-mods.sty then you can just enable those on the Advance tab as shown here:

If not, then you will need to use the Styles tab to add (or just modify) these user-defined styles. To add new styles (select another similar one, like bd…bd* and then use the Add button to add a style):

Change the parameters and comments as needed:
And then You can use color, and size to change the appearance.

[Note: there seems to be a bug in 1.5.9 which is preventing the Hide/Exclude Contents of marker, so a workaround is to set the Font size for \zd to 0.01pt which will make it invisible :slight_smile: ]

Thank you for the instructions. I tried them with two projects, and they worked! At I first just selected the option to use custom.sty, but the printing failed. So I also defined some custom styles in PTXprint, and got the printout I expected.

Then tried just using custom.sty with another Paratext project [SBEBT - a back translation project], and it also worked.

I closed PTXprint and opened the app again, selected the SBET project, and tried to delete my custom styles that I had previously added, because I figured I don’t need them (and the settings there overwrite some settings in custom.sty). But the Del-Button did not show any effect. Even after closing and opening PTXprint, the added styles were still there!

Here is the screenshot:

So, how can I delete those custom, user-defined styles?

[By the way, the “the Hide/Exclude Contents of markers” \zd and \zh is working just fine for me. No workaround needed.]

Thanks, Rainer

Thanks for reporting this bug Rainer.
In my brief testing, I can see that if you use the delete button, and then hit Print, it does actually try to delete the style, but it doesn’t remove the entry from the list on the left. When you close and re-open PTXprint, that marker has (almost) disappeared - it appears in the section “None”! Oops.
We’ll get this fixed for the next release.

Also note that it isn’t possible to delete styles that have come in from a Stylesheet, as they will just re-appear each time PTXprint starts up again. So, even when this is fixed, you will only be able to remove styles that have been manually added using the Styles editor (these end up being stored in the configuration’s ptxprint.sty file).

This bug (of not being able to delete added markers) has now be fixed in version 1.5.10 which was recently released.