У меня есть временное решение. Я закомментировал строку .tex выше (с помощью «%»), а затем добавил следующее в мой файл PrintDraftChanges.txt:
'(?<!\\ft) *:( |\n)' > '\u202f:\1' # Place non-breaking thin space before colon
В моем конкретном случае я не хотел заменять пробел после маркера \ft (так как из-за этого он перестает работать), поэтому я добавил туда небольшой отрицательный просмотр назад. И двоеточие может фактически находиться в конце строки, поэтому мне нужно искать либо пробел, либо перевод строки после двоеточия.
Это работает, потому что я добавляю немного больше контекста в поисковую строку, что позволяет избежать изменения двоеточия в пути к файлу PDF.
Я бы предпочел найти другое решение, если это возможно, поскольку у меня нет такого контроля над \u202f, как над командой \kern в файле .tex. Но это хотя бы дает мне приблизительное решение, чтобы продвинуться в верстке.
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.
Переведено машиной с языка English Показать оригинал