最新版本 3.0.32 包含了一種增強功能,可讓您在前言(Front Matter)中精確地將 PDF 插入到您需要的位置。以下是關於如何使用這個作為里程碑(milestone)功能的 \zpdf 指令的一些說明:
這個 \zpdf 程式碼可以放在 SFM 文字的任何位置,包括您的 前言 (FRTlocal.sfm),並會插入指定的 PDF 檔案。請注意,您必須使用 /forward/slashes (而非\back\slashes)作為路徑分隔符號;而且 最好將 PDF 放在專案的 "shared" 資料夾中 ,這樣它們就可以透過 Paratext 中的 send/recv 進行共享,並且 無論使用者為何,PTXprint 都能在相同位置找到它們。
該指令最簡單的格式如下:
\zpdf|file="../../../shared/IntroPages.pdf"\*
或者,如果您確實需要硬編碼路徑(即不依賴 PTXprint 設定的相對路徑),您也可以這樣做:
\zpdf|file="C:/Temp/IntroPages.pdf"\*
如果您需要縮放、旋轉或從較長的 PDF 中僅選擇某一頁,也可以透過額外參數實現:
\zpdf|file="../../../shared/Filename.pdf" page="3" scale="750" rotate="270"\*
請注意,對於 scale 參數,1000 = 100%,因此 500 代表 50%,以此類推。所以在上述範例中,只會插入 Filename.pdf 的第 3 頁,縮放至 75% 大小,並旋轉 270 度。
在您的前言內容上下文中,您可能希望像這樣添加一個或多個簡介頁面(Intro Pages):
...
\pc \zimagecopyrights
\rem ----------Page 3----------------
\periph Intro Matter|id="importedpdf"
\zpdf|file="../../../shared/IntroPages.pdf"\*
\rem ----------Page 4----------------
\periph Table of Contents|id="contents"
\mt3 \zvar|toctitle\*
\ip \ztoc|main\*
...
The latest version 3.0.32 includes an enhanced way of including PDFs exactly where you need them within Front Matter. Here are some notes on how to use this \zpdf command which functions as a milestone:
This \zpdf code can go anywhere within SFM text, including in your Front Matter (FRTlocal.sfm), and will insert the PDF file specified. Notice that you must use /forward/slashes (not\back\slashes) for your path separators; and it is ideal to place the PDFs in the project's "shared" folder so that they get shared using send/recv in Paratext and so that PTXprint can find them in the same place regardless of user.
The simplest form of the command is this:
\zpdf|file="../../../shared/IntroPages.pdf"\*
or if you really need a hardcoded path (which isn't relative to PTXprint's settings) you can also do this:
\zpdf|file="C:/Temp/IntroPages.pdf"\*
And if you need to scale, or rotate or select just one page from a longer PDF, then that's also possible with the extra parameters:
\zpdf|file="../../../shared/Filename.pdf" page="3" scale="750" rotate="270"\*
Note here that for scale, 1000 = 100%, so 500 would be 50% etc. So in the above example, only page 3 from the Filename.pdf will be inserted, scaled to 75% size, and rotated 270 degrees.
Within the context of your Front Matter material you may want to add one or more Intro Pages like this:
...
\pc \zimagecopyrights
\rem ----------Page 3----------------
\periph Intro Matter|id="importedpdf"
\zpdf|file="../../../shared/IntroPages.pdf"\*
\rem ----------Page 4----------------
\periph Table of Contents|id="contents"
\mt3 \zvar|toctitle\*
\ip \ztoc|main\*
...
機器翻譯自 English