0 votes
I would like page borders around Scripture text, but not around introductions. I've used some work-arounds in the past, including (if I'm publishing a single book) just typesetting the introduction along with the title pages and create a PDF that gets loaded before the text. I've also done some tricky (ugly) things in the past with TeX macros that swap out different page borders behind the scenes. It should be clear that in this case the introductions need to be on pages by themselves, but there is a checkbox that can help on the Body page, "Start 1st Chapter on a New Page".

Is there a currently "recommended" method for doing this? I would think this would be an important functionality to implement, as certain major religions require borders around "Holy" text, but not around human-produced text (like Introductions).
PTXprint by (1.3k points)

3 Answers

0 votes

I have now found this post: https://support.bible/11876/multiple-borders, which has useful information.

But it would be helpful to have some specific examples of how \sethook commands are used. I'll start us off with one simple one that I created. I leave the page border configuration UNchecked (because I want to start without a border), I've checked the option Start 1st Chapter on a New Page (which separates the intro from the text), and I put the following into the ptxprint-mods.tex file, which turns on the border when GEN 1.1 starts, and (just to show that it is possible) turns the border off again on the page that contains GEN 5.1

\makeatletter
\setcvhook{GEN1.1}{\def\PageBorder{"C:/Program Files/PTXprint/ptxprint/PDFassets/border-art/A5 page border - no footer.pdf"}\setbox\b@rder\box\voidb@x}
\setcvhook{GEN5.1}{\let\PageBorder\empty\setbox\b@rder\box\voidb@x}
\makeatother

Can other people post some working examples from their projects, from their ptxprint-mods.tex file, so we can learn what hooks are useful for this kind of task?

by (1.3k points)
edited by
0 votes
\makeatletter
\sethook{bookstart}{FRT}{\def\PageBorder{"front.pdf"}\setbox\b@rder\box\voidb@x}
\sethook{before}{is2}{\global\let\PageBorder\empty\global\setbox\b@rder\box\voidb@x}
\sethook{bookstart}{XXA}{\def\PageBorder{"background.pdf"}\setbox\b@rder\box\voidb@x}
\makeatother

I have Front Matter defined inside of PTXprint, and I want the first page of that (the title page) to have the "front.pdf" border around it.
The second page of the Front Matter starts with \is2. I want no border around that and following pages.
When the Front Matter is done and I get into the main text, XXA, I want a new border "background.pdf".

Both my pdfs are stored in the project\local\ptxprint\config_name directory. This allows me to use the pdfs without having to define the full directory structure.

by (1.6k points)
edited by
0 votes

The current recommended way to change page borders is to use a hook (page or chapter.verse) and the \NewPageBorder{} TeX command.  If set to empty, then there will be no page border.

E.g.
\setcvhook{GEN1.1}{\NewPageBorder{../../../figures/scripturepageborder.pdf}}

\sethook{page}{24}{\NewPageBorder{}}

\setbookhook{start}{GLO}{\NewPageBorder{}}

I'm suggesting that (rather than in local, where they might be lost), page borders should exist in the figures directory, where they are shared by send/receive. This probably depends on your team. As far as I know, TeX on windows doesn't mind separating directories with forward slashes, even if they "look wrong".

 Be aware that the definition of \PageBorder (which \NewPageBorder changes) is checked when the page is complete, just before it is written to the PDF, not when the first material on the page is added. I.e. turning off page borders when you reach Rev 22:21 will mean that there is no border on the page containing that verse.

Also note that I am writing here about fixed page borders, which are not to be confused with text-borders (which use ornament-including rules to put a variable-sized border around the scripture-text portions of a page, but not around footnotes).

by (592 points)

Related questions

0 votes
5 answers
PTXprint Jan 2, 2023 asked by mnjames (1.6k points)
0 votes
1 answer
PTXprint May 10, 2021 asked by jeffh (1.3k points)
+1 vote
2 answers
0 votes
1 answer
0 votes
3 answers
Paratext Dec 31, 2015 asked by mnjames (1.6k points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
They devoted themselves to the apostles’ teaching and to fellowship, to the breaking of bread and to prayer.
Acts 2:42
2,447 questions
5,134 answers
4,833 comments
1,231 users