Saya memiliki solusi sementara. Saya mengomentari baris .tex di atas (dengan “%”), kemudian menambahkan berikut ke file PrintDraftChanges.txt saya:
'(?<!\\ft) *:( |\n)' > '\u202f:\1' # Place non-breaking thin space before colon
Dalam kasus saya, saya tidak ingin mengganti spasi setelah penanda \ft (karena itu membuatnya tidak berfungsi lagi), jadi saya memasukkan sedikit negative look-behind di sana. Dan titik dua sebenarnya dapat terjadi di akhir baris, jadi saya harus mencari spasi atau baris baru setelah titik dua.
Ini berhasil karena saya menambahkan sedikit lebih banyak konteks ke string pencarian, sehingga menghindari perubahan titik dua di jalur file PDF.
Saya lebih suka menemukan solusi lain, jika memungkinkan, karena saya tidak memiliki kontrol sebanyak yang saya miliki dengan \kern di file .tex untuk \u202f. Tetapi ini setidaknya memberi saya perkiraan kasar, untuk melanjutkan dalam penataan huruf saya.
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.
Diterjemahkan secara otomatis dari English