# Modifying colons but still having an included PDF

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:

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

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

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.

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.

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