0 votes

In our project, we sometimes put a word or two from the national language (Khmer) in a footnote or glossary entry, and we want to mark that up for pre-publication processing. We’ve defined a marker \zkh (using the \z Namespace defined in USFM 3.0) and added the following to custom.sty:

\Marker zkh
\Endmarker zkh*
\Name zkh...zkh* - Special Text - Khmer Language Text
\Description For Khmer Language text
\OccursUnder ip im ipi imi ipq imq ipr iq iq1 iq2 iq3 io io1 io2 io3 io4 ms ms1 ms2 s s1 s2 s3 s4 cd sp d lh li li1 li2 li3 li4 lf lim lim1 lim2 lim3 lim4 m mi nb p pc ph phi pi pi1 pi2 pi3 pr pmo pm pmc pmr po q q1 q2 q3 q4 qc qr qd qm qm1 qm2 qm3 tr th1 th2 th3 th4 thr1 thr2 thr3 thr4 tc1 tc2 tc3 tc4 tcr1 tcr2 tcr3 tcr4 f fe NEST

Unfortunately, I don’t see how to use this in Paratext 9. If I’m in Standard view and I start to type the marker (by typing a slash), a context menu comes up, and it won’t let me type a “z”. Actually, it lets me type it, but if I press enter, it won’t do anything - it can’t find it’s way into the text.

image

Is there any way to overcome this?

Thanks!

Paratext by (288 points)

3 Answers

0 votes
Best answer

viverechristus,

When you type a marker in the window you can press the space-bar to accept the marker. Pressing Enter only works if the marker is a valid marker for that list. For instance, if you press the \ then it shows the character styles. If you try to type \p Enter nothing should happen (or it will give you something like \pn, But if you press \p Space then it will add a paragraph marker. In your case if you press \zkh Space then it should add the correct marker.

Note that if you highlight the word(s) before pressing \ then it should add the opening and closing markers around the word(s) that were selected.

by (8.1k points)

Thanks. I should have known this already, and I’m glad to know it now.

Thank you for that. It’s very nice to hear about this PT nuance. But I’m thinking it is not very intuitive to have PT treat \marker< Enter > differently than \marker< Space >. (Old SF programs like Shoebox and Toolbox treated these the same.)

viverechristus’s confusion indicates he too found it odd/frustrating that pressing < Enter > did nothing.

So is there some advantage to this divergent behavior which I’m just not seeing?

To me, either only < Space > should be able to close the marker dialog, and < Enter > should never close it, or better, PT should just treat \marker< Enter > the same as \marker< Space > for closing the dialog and putting in the SF marker. (Unless there is a really good reason to make this distinction.)

Because I find normal users won’t remember this level of distinction (if they ever knew it). They just assume they messed something up when it doesn’t act like they expected it to.

You are correct that it seems a little odd. Here is what I understand. No matter what the context in adding a marker you can always end it with the Space. So typing \p Space will add a paragraph marker. This is of course the behavior you would see if you are in Unformatted view.

The issue with the Enter key is that when you are in Standard view and are using marker selection tool, the Enter key only works if the marker is actually present in the tool at that time. Pressing the \ key will display the character styles that are currently available based on usfm.sty and custom.sty (and frtbak.sty for other books). So if I press \ p I will never see just the \p option. I will see things like \pn. If I type \p and then Enter I will actually be selecting one of the available character markers. However, because of the nature of the Space with markers if I press a Space after typing the p I actually get the marker I want.

For paragraph markers I would normally press Enter and then type the maker code. So if I press Enter p I will see the \p option and when I press Enter again I get that marker.

So, part of the issue is the difference between the display of paragraph and character styles and what is visible depending on if you started with Enter or Space.

Just to be perfectly clear. Both Enter and Space will end a marker that is visibly present in the marker window. If a marker is not present in the window (when you type the marker there is nothing visible in the box below) then pressing Enter will do nothing. Pressing Space will add that marker (even it if is an invalid marker).

Yes, that was perfectly clear. My point is it isn’t intuitive. If we have to explain something with minutia, then it is unlikely to ever be clear to a normal user. No, we don’t have to change it. But if we are looking to minimize confusion, then < Enter > should never do nothing. Because as it is now, < Enter > is acting like ESC in that situation – and that is counter-intuitive.

This has unlocked the mystery of selecting books of the bible from the toolbar drop-down. I’m regularly frustrated when I type, say, “ru”, and all that’s left in the list is “RUT”, but I press enter and nothing happens. I see that if I press space, I get RUT and the chapter number selection becomes active. I also notice that when enter does work, it doesn’t move me to the chapter selection but instead goes to whatever chapter and verse are already populated.

Incidentally, after pressing enter (and successfully moving to the book I want), the book title (abbreviation) remains highlighted in blue, even though the cursor is now active in the newly selected book (in this case, Jonah 1:1):

image

More than once I have assumed that my selection failed, and I have tried to type the book name again, only to find that I’m typing nonsense into a verse. This, to me, is a potentially serious problem because it can lead to unintentional and very occasionally unnoticed edits in verses. Blue highlighting should only ever mean “ready for selection”, not “already selected”.

THIS.
I too have frequently found bogus letters or numbers in the first verse of books because the user thought they were typing in the book or chapter box when in fact the cursor was active in the verse text. Yikes.

This behavior it is confusing and dangerous as viverechristus points out. And while this is “fiddly” and might be a pain to fix in the software, it is dangerous enough that now 2 people have mentioned it. So I’m sure there are others as well.

Yes, I have seen extra numbers added by mistake quite often.

0 votes

I think the problem is that you did not specify a type for your custom marker. If the type is missing, Paratext assumes it is a paragraph style.
Try adding the following line to your marker definition in your custom.sty file:
\StyleType Character

by [Expert]
(16.2k points)

Thanks. Specifying the StyleType got the marker added to the context selection tool.

By the way, where can I go to see documentation on valid stylesheet definitions?

One thing to do is to look at (do not edit) the usfm.sty file to see how styles are defined. The other thing to look at is the help topic “How do I implement a custom stylesheet for my project?”

Thanks, anon848905.

0 votes

I just reported this as PTXS-23210. If others have seen the problem, maybe you could report it too.

by (288 points)

Related questions

Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
And I tell you that you are Peter, and on this rock I will build my church, and the gates of Hades will not overcome it.
Matthew 16:18
2,565 questions
5,297 answers
5,001 comments
1,375 users