0 votes
286 views

A team I’m helping would like the name of God to display as all caps (not small caps). What do I need to put in Changes.txt to get the contents of \nd…\nd* to display as all caps?

PTXprint by (153 points) | 286 views

2 Answers

0 votes

Hmm. if you want it to apply to all letters, not just a few given sequences, then that sounds more like a ‘translation’ problem than a regular expression substitution. I don’t think python’s regex module can do that, unless you had a whole load of "a">"A" entries.
I guess you could use the TeX primitive \uppercase, and the private-use-area characters U+FDEE and U_FDEF, which we make available as alternatives to { and } respectively (as they are printable characters in USFM, not grouping characters). Hopefully ptxprint will at most moan about uppercase not being a recognised marker, but it might crash you use this in a diglot):

"(\\nd )([^\\]*)(\\nd\*)" > "\1 \\uppercase\uFDEE\2\uFDEF\3"

This of course depends on XeTeX’s idea of what’s upper-case for your characters, and it might need to be educated if you have any more interesting letters.

by (1.1k points)
0 votes

Ruth, are you saying that the scripture text is already marked up with something like \nd Lord\nd* but you want it to show up as LORD? (not small caps)

Why not try a very simple change like this (substituting your language’s name for God) to see if it solves the problem:

"\\nd Lord\\nd\*" > "LORD"

Note that the double \\ is needed because \n is a special character and needs to be ‘escaped’ with an additional \.

by (3.2k points)
reshown

mjpenny is of course correct, I assumed that you needed something more complex (e.g. due to affixation). If you are struggling with affixation, the team might want to think about whether it would look better with only the name portion of the word in all-caps. (Some romani translatoins have RAIesqo [of the LORD], for example). That can be done with either \nd Rai\nd*esqo and a changes.txt like mjpenny gives, Or there are also sub-matches.
I think the format is:

in "\\nd .*\\nd\*": "Lord" > "LORD"

(Meaning change Lord to LORD, when it’s in a chunk \nd ....\nd*)

For testing purposes, I’d be very tempted to enable coloured text and set a colour for text marked as \nd (see the styling tab), just in case something goes wrong. If you are doing this, then mjpenny’s example would also include the \\nd bits in the right hand side of the arrow.

Related questions

0 votes
6 answers 497 views
Hello, I was just checking for incorrect use of capitalization. In particular, I know that the translators have sometimes ... for them to have their own category. Thanks so much!
alex_larkin 379 asked May 17, 2021
0 votes
2 answers 295 views
How do I show chapter numbers on a single line–i.e. don’t have drop caps?
mnjames 1.9k asked Feb 28, 2023
0 votes
6 answers 420 views
I want the \nd style to be in small caps. When I export from PT to RTF, \nd is underlined. I checked the box ... distinction of style whatsoever. What can I do to get small caps?
anon054969 123 asked Feb 20, 2021
0 votes
2 answers 379 views
Hi All Does any one can tell me whether there is Smart Caps option in Paratext for Roman letters? The first letter of ... can I get it Smart Caps in Paratext? thanks in Advance
binoy 327 asked Oct 15, 2019
0 votes
3 answers 213 views
(Paul Unger writes) I found a topic in the PT Supporters e-mail list that held promise for how to do this. It ... track. Does anyone know what I need to put for small caps?
anonymous asked Apr 10, 2015
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
And over all these virtues put on love, which binds them all together in perfect unity.
Colossians 3:14
3,037 questions
5,995 answers
5,661 comments
2,022 users