0 votes
372 vues

I think the proper way to mark words as belonging to the wordlist/glossary is \w␣…\w*␣, where the second space that I’ve marked there is optional. For example, if you wanted punctuation immediately after word, you’d put that immediately after the * and not have a space included.

Also, I’m pretty sure you’re not supposed to add a space after the word and before the end marker \w*. If you do it fails reference checking and tells you there’s a space there.

Is all the above true?


If so, I think there’s a bug either in the USFM standard or in PrintDraft. In TeX, usually you add an optional space before a marker depending on whether you need it in the output, and an obligatory space must come after the marker to signal the end of the marker. USFM seems to treat closing markers with * differently than the TeX rule, and doesn’t require a space after them.

So, what’s happening is if I format my text according to the rules above, I’m getting no spacing between the \w marked word and the next word.

If someone can confirm this is a legitimate problem and not just a mistake on my part, I can write it up as a bug. Should I send it to Paratext or to the ptx2pdf mail list, or someone else?

Ancienne publication - affichée dans sa langue d'origine
Paratext par (1,9k points) | 372 vues

3 Réponses

+1 vote
Meilleure réponse

It’s not a bug. The standard
rule is that “\w " including the space is the complete opening
marker. “*” is the complete closing marker. To have a space
in the text after the \w word/phrase”, you would have to type
a space after the closing marker.

      You are correct that the

word/phrase within the phrase should not end in punctuation or
a space. Ending in punc/space means it would have to be
included as a part of the key in the glossary.

Ancienne publication - affichée dans sa langue d'origine
par (571 points)
réaffiché

Arrgh. I’ve known about how the optional space after a closing marker determines the spacing in the output for years, and it didn’t even occur to me today that maybe the rest of the team didn’t. In fact, that was so far from my mind that I started inventing other ideas of what was going on. Now that I re-read my first post here it makes a lot less sense, and I should have known something was wrong.

I went back and looked more carefully (spacing is extremely difficult to see in our font) and realized there wasn’t a space after the \w* marker. In fact, over an hour later and I’ve found and corrected about 500 places where there wasn’t a space but should have been.

Now I probably need to start search for when there is a space but shouldn’t be…

Ancienne publication - affichée dans sa langue d'origine
0 votes

The built-in “Export Project to USX” tool in PT also deletes the space after the \w* closing marker, meaning that the <char style=“w”>…</char> result doesn’t have a space after it. To me this suggests a bug in USFM, not PrintDraft.

Ancienne publication - affichée dans sa langue d'origine
par (1,9k points)
0 votes

Here is a regex I run on all projects to move a space from before a character style closing marker to after it. It ignores \f* \x* and \fe* because you do not want to move a final space out of a footnote, cross reference or endnote into the text:
Find:
(\s)(\\\+?((?!(f|x|fe))\S)*\*)
Replace:
\2\1

Ancienne publication - affichée dans sa langue d'origine
par (1,8k points)
réaffiché

I inserted crossed references and they were underlined. What do I do to resolve it?
Then I just ran basic check and found invalid books. What do I do to resolve this?

Ancienne publication - affichée dans sa langue d'origine

Questions connexes

0 votes
3 réponses 296 vues
Puis-je personnaliser l'interligne de mon projet de rétro-tradition ?
Michel 125 posée nov. 4, 2023
0 votes
3 réponses 342 vues
I am trying to adjust the line spacing of the main title in Print Draft in PrintDraft-mods.sty, because some main titles ... in the same way. How can the line spacing be changed?
Paulus Kieviet 517 posée août 21, 2019
0 votes
1 réponse 56 vues
Nous donnions un cours sur Paratext la semaine dernière et nous leur apprenions à utiliser PTXprint. Les traducteurs de ces ... Merci d'avoir pris en compte cette demande... Jeff
jeffh 1,4k posée nov. 22, 2024
0 votes
1 réponse 242 vues
Je prépare un NT en utilisant la police Noto Nastaliq Urdu. J'ai de la difficulté à obtenir un ... caractères sans aucune séparation de mots discernable. Des suggestions ?
mlucas53 148 posée déc. 19, 2023
0 votes
3 réponses 351 vues
Chers membres de la communauté, J'ai besoin d'un espacement entre le numéro du verset et le texte du verset, ainsi qu ... faire ? Capture d'écran 2023-08-22 1114581948 1126 320 KB
sajid.imdad 140 posée août 22, 2023
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Accept the one whose faith is weak, without quarreling over disputable matters.
Romans 14:1
3,046 questions
6,006 réponses
5,671 commentaires
2,027 utilisateurs