Boxes around text

Is there a way to put a box/frame lines around certain parts of the text? As in have a few paragraphs of regular text, then a couple of paragraphs within the box?

I realize this won’t be built into ptxprint, but I’m willing to edit the ptxprint-mods.tex file.

As in scripture text?

You can probably use the style start- and end-hooks, or there are chapter-verse hooks too, depending on what you want to do. You’d have the start hook say something like {\setbox1=\vbox\bgroup}, the end-hook say {\egroup ....}
with the … putting a box around your text. The text in the box wouldn’t be able to break across a page or column break.

With sufficient set-up along the lines of \let\b@drleft\tr@e \let\b@drright\tr@e ...
you could call the \mkb@rdr macro that is in the ptx-extended.tex file.

If you’re talking about non-scriprure text, (e.g. then framed \esb side bars are supported in the macros, though they’ve not been very well tested).

Thank you for this.

Some background on what I’m doing: This is for a pamphlet which is basically a Bible study. A series of Bible passages interspersed with questions/answers. I’d like the Q/A visually distinct from the scripture, hence the desire for boxes.

I did this years ago in Latex, but I suspect it would take me longer to get that Latex system back up and running correctly than it would to convert things over to a Bible Module/ptx2pdf system. Plus a ptx2pdf system would allow me to bring the most recent changes to the Paratext drafts into the document.

Knowing that, is using \esb sidebars the best way to go? I found the documentation at but it doesn’t have any examples on how the \esb marker is actually used or the syntax for its usage. I’m at a technical level where I can usually look at examples and convert them to my own use, but I can’t read code and figure out what the syntax should be.

Would you be able to give me some examples of how I might type things to get them to show up?

Well, my intention is that sidebars will do exactly what you want, eventually - be the equivalent of a hand-crafted tex/latex document for a study booklet, I’m not sure it’s there yet for what you want but it might be.

As a first example for usage, you might like to take a look at this directory, which contains a miniature ‘is it all working properly’ file:

The result of running it looks roughly like this:

Oops, sorry, I hit reply too soon.

Styling of stuff in a side bar uses the \cat ... \cat* USFM marker to pick a category (see also and a stylesheet-like file to define what that category of sidebar looks like, see mycats.sty in the above directory.
If you load it with this command, below, rather than \stylesheet then it takes care of some house-keeping for you.


Alternatively, make sure your stylesheet ends with \EndCategory
I don’t think the GUI has much support for editing category sheets by hand, but notice that you can - within a category - redefine how a (any!) marker behaves - thus the \p markers in the pink-background boxes are centred, but normal \p markers are not.

Background images and the \FgImage ‘category marker’ mentioned in the document you found are not yet implemented, but borders and background colour are. So far turning on \Breakable has been an unmitigated disaster… I think I understand why the disaster happens, just not how to resolve it.

To add to David’s excellent examples, you can also use a Paratext Module. that would allow you to write your questions and then pull in passages from your project rather than having to intersperse questions in scripture. This keeps things cleaner. And you may also decide to put your scripture in the sidebars and the questions as the main text. But that’s your call and design.