0 votes
228 views

In my ptxprint-mods.tex file, I want to do some specific adjustments around punctuation. Here is the adjustment around colons:

\catcode`\:=\active \def:{\unskip\kern0.25em\char`\:{}} % colon

Unfortunately this messes up the inclusion of PDF files, like a PDF with title and credit pages. I get this at the top of my output:

image

Can someone help me figure out how I can get both of those? Thanks.

PTXprint by (1.4k points)
reshown | 228 views

3 Answers

0 votes

Just FYI - I tried putting the PDF file to include in the PrintDraft folder, but it still uses a full path (with a colon).

by (1.4k points)
0 votes

I have a temporary word-around. I comment out the .tex line above (with “%”), then add the following into my PrintDraftChanges.txt file:

'(?<!\\ft) *:( |\n)' > '\u202f:\1' # Place non-breaking thin space before colon

In my particular case, I didn’t want to replace the space after the \ft marker (as it makes it not work anymore), so I put in a little negative look-behind there. And the colon can actual occur at the end of the line, so I have to look for either a space or a newline after the colon.

This works because I’m adding a little more context into the search string, so it avoids changing the colon in the PDF file path.

I would prefer to find another solution, if possible, since I don’t have nearly as much control with \u202f as I do with the \kern command in the .tex file. But this at least gives me a rough approximation, to move forward in my typesetting.

by (1.4k points)

Remember the changes only apply on the USFM files, so you don’t have to worry about encountering PDF filenames in there.

You can regain your control by using pretty much any code you want and then in your ptxprint-mods.tex you can do things like:

\def\mycolonkern{\unskip\kern0.25em}
\catcode"202F=\active \def^^^^202f{\mycolonkern}

Note the careful use of uppercase hex codes in the catcode statement and lowercase hex codes in the def. Gets me every time! Anyway, now you have some million characters you can use for all kinds of craziness :slight_smile:

0 votes

Rather than making colon active, can XeTeX’s \interchartoks help here? I’ve only read about it, never used it, but it seems like it ought to work.

by (294 points)

Related questions

0 votes
1 answer 105 views
I have a lectionary Bible module, which has its own \s# headings. There is no "\inc s" in the module, because ... . But I'm wondering if I'm missing some setting somewhere?
beve 128 asked Apr 10, 2025
0 votes
1 answer 164 views
It was working OK, but then I hit the "reset" button to the default setting. Now I can't change it.
MnKN 134 asked Jun 2, 2024
0 votes
1 answer 36 views
I've heard for a long time that PTXprint does not require Paratext to be installed. But the process of using ... PTXprint short of creating a dummy Paratext project? Thanks, Jeff
jeffh 1.4k asked Jan 6
0 votes
1 answer 21 views
Mailto: <*Emails are not allowed*> PTXprint [2.7.17] - Error! Failed to create: MSB_BookofMark_XXC_ptxp.pdf ! File ... various settings on the Advanced tab. PTXprint Version 2.7.17
MnKN 134 asked Sep 13, 2025
+1 vote
0 answers 188 views
(See also Inserting Pages from a PDF which is more focussed on inserting a particular page or two, with the option of ... alter the arrangement of any paragraphs that it is met in.
DG 1.1k asked Oct 9, 2023
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Give proper recognition to those widows who are really in need.
1 Timothy 5:3
3,037 questions
5,994 answers
5,661 comments
2,022 users