0 votes
I'm getting Luke and Acts ready to be printed as a booklet, and I can't figure out how to put an intermediate title page before the beginning of Acts.
PTXprint by (102 points)

3 Answers

0 votes
There are several different ways to insert USFM which isn't in the paratext files. One option is to use the changes.txt file, but that gets a bit messy, with you needing to double every slash.
You could try using a hook, but the problem with hooks is that in hooks numbers are considered to be numbers, not things that might be part of a marker, i.e.  \mt1 will be understood as \mt 1.

The most initially complex, but maybe eventually the easiest once you're used to it, is to make a 'trigger file'. If your project is called MYPROJ, and the configuration testing, then for a glossary the file would  need to go into
{paratextDir}/MYPROJ/shared/ptxprint/testing/triggers
with the name A9GLOMYPROJ-testing.SFM.triggers

In that file, you can put one or more trigger entries, e.g. like this:

\AddTrigger GLObookstart-preverse
\mt1 ~
\zgap|8em \*
\zrule|width="0.5"\*
\zgap|1em \*
\mt1 GLOSSARY
\zgap|1em\*
\zrule|width="0.5"\*
\pb
\EndTrigger

The trigger entries can be anchored to any verse or \k keyword\k* entry, etc.  much like figures (though to get the figure-like position you need to add a suffix "-preverse" as here), and should allow you to include any valid USFM.  If you use no suffix, then the USFM is triggered after the triggering verse number, for verses, and possibly not at all for other locations.

Of course, you'd need to use 45ACT...SFM.triggers and ACTbookstart-preverse
by (737 points)
0 votes

Building on DG's comment: "One option is to use the changes.txt file, but that gets a bit messy, with you needing to double every slash."

There is an easy way to do this though:

Then on the changes.txt tab that appears, use the Code snippets to insert the rule which will add a title page to EVERY book:

You may want to change the piece in Yellow to say something else, or remove it completely. If you don't want any name to appear under the Book name, then use \is ~ to indicate a space there. You can change the codes as needed, but essentially you are injecting some text into the USFM file as it gets processed (this is NOT stored in your Paratext file).

If you only want this to happen before ACT and not also at LUK, then change the beginning of the rule to say:

at ACT '(?ms)(\\h )(.+?\r?\n)(.+?)(\r?\n)(\\mt)' > '\1\2\3\4\\zgap|2in\\*\4\\mt \2\\is ~\4\\zrule\\*\4\\pb\4\5'

by (2.6k points)
0 votes

An obvious easier way is just to compile Luke and Acts as separate PDF files and then create title pages as separate pdf files also and combine them using a PDF combiner tool online. 

Adobe has a tool to do this: https://www.adobe.com/ca/acrobat/online/merge-pdf.html

Of course if the technique that @Mark P showed works for you then that would be a cleaner way :-)

by (121 points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
So Peter was kept in prison, but the church was earnestly praying to God for him.
Acts 12:5
2,628 questions
5,369 answers
5,045 comments
1,420 users