我們擁有一份相當龐大的手工製作的連字號(hyphenation)數據清單,透過 > Fonts+Scripts > Hyphenation > Import List... 從底層的 PT 專案匯入到 PTXPrint 中。
我找到了這裡的一個檔案,看起來就是那次匯入的結果:
"D:\[path]\PT9\[project]\shared\ptxprint\hyphen-[project].tex"
這個 .tex 檔案使用 UTF-8 編碼,我只看到形式為 U+002D 的「標準」連字號。現在我想使用正則表達式(regex)來減少那些「可能但難看」的連字選項:
我會關閉 PTXPrint,製作一份備份副本,透過移除某些連字號來應用我的更改,然後再次運行 PTXPrint,並嘗試「Print」(即「Make PDF」)。這樣做聽起來合理嗎,還是這樣會毀掉我的 PTXPrint 專案?如果是後者,是否有更好的方法來調整連字號?
注意:我不需要關於正則表達式的幫助,謝謝。這裡的問題僅關於 PTXPrint 的內部運作機制。
簡而言之(TL/DR):
我們將 PT 專案視為許多可能出版物的「來源」,正如 PTXPrint 線上樣本庫所展示的那樣。因此,在 Paratext 內部,我們仔細地手動維護連字號主清單,標記所有 合法的選項,包括那些不太美觀的選項。
對於目前的出版物,我們針對成年讀者群體,並擁有特定的版面設計、頁面尺寸和字體大小,這賦予我們「更多的自由度」和靈活性。因此,我們可以過濾掉一些允許但非理想的連字選項。例如,我想移除所有會在列印行尾留下僅一個字符(如「孤兒字」)的選項,以及類似的情況(行尾孤立的字符)。
We are having a substantial list of hand-crafted hyphenation data, pulled into PTXPrint from an underlying PT-project via > Fonts+Scripts > Hyphenation > Import List...
I have found a file here, that seems to be a result of that import:
"D:\[path]\PT9\[project]\shared\ptxprint\hyphen-[project].tex"
This .tex file is encoded in UTF8 and I see only "normal" hyphens in form of U+002D. Now I would like to use a regex to reduce hyphenation-options which are "possible but ugly":
I would shut down PTXPrint, make a backup-copy, apply my changes by removing certain hyphens, run PTXPrint again, and attempt to "Print" aka "Make PDF". Does this sound reasonable, or will I destroy the PTXPrint-project that way? If the latter, is there a better way to tune the hyphenation?
Note: I do not need help with the regex, thank you. The question here is only about the inner workings of PTXPrint.
TL/DR:
We consider the PT-project as the "source" for many possible publications, as demonstrated nicely on the PTXPrint online sample gallery. So inside Paratext we carefully manually maintain the hyphenation master-list, where we mark all legal options, even the not-very-pretty ones.
For the present publication we have a certain adult-readers target audience and we have a layout, page-size, font-size, which gives us "a little more freedom" and flexibility. So we can filter-out some of the allowed but not-ideal hyphenation-options. For example, I want to remove all options, which would leave only one character like a "orphan" on the end of a printed line and similar for trailing lonely characters.
機器翻譯自 English