 | Text in red represents the portion of the setup parameter syntax which can be configured by the typesetter. Where applicable, default values are indicated in parentheses at the end of the definition. |
Paratext Stylesheet
- \stylesheet{usfm.sty} – Define the Paratext stylesheet to be used as a basis for formatting (default=usfm.sty)
You can read multiple stylesheets (to override primary stylesheet values)
For example:
In the file mods.sty, add standard Paratext marker style definition parameters to override the default stylesheet definitions provided through \stylesheet{...} (above)
Page Setup
Dimensions
- \PaperWidth=148.5mm – Page width (default = 148.5mm – A5)
- \PaperHeight=210mm – Page height (default = 210mm – A5)
Crop Marks
- \CropMarkstrue – Add crops marks to the PDF output? (default = false)
Margins
- \MarginUnit=12mm – Basic unit for margins; changing this will alter them all. (default = 1in)
Note: The following top and bottom margin settings adjust the the size of margins around the body text area. You will need to keep in mind that adequate space needs to be provided for and headers and/or footers.
- \def\TopMarginFactor{1.15} – Relative size of the top margin based on MarginUnit (default = 1.0)
- \def\BottomMarginFactor{1.0} – Relative size of the bottom margin based on MarginUnit. If undefined, the \TopMarginFactor will be used for both top and bottom margins.
- \def\SideMarginFactor{1.0} – Relative size of side margin based on MarginUnit (default = 0.7)
- \BindingGutter=4mm – Amount for an additional margin on the binding side of the page (default = 5mm)
- \BindingGuttertrue must be specified for the \BindingGutter amount to be applied (default = false)
Columns
- \TitleColumns=1 – Number of columns used to typeset the main title (default = 1)
- \IntroColumns=1 – Number of columns used to typeset introduction material. Introduction material is defined by USFM markers beginning with \i (default = 1)
- \BodyColumns=1 – Number of columns used to typeset the body text (default = 1)
- \def\ColumnGutterFactor{15} – Used to set the size of the gutter between columns; relative to font size
- \ColumnGutterRuletrue – Place a vertical line between the columns in the column gutter? (default = false)
Fonts
- \FontSizeUnit=0.75 – Scaling factor for interpreting font sizes in the stylesheet. Changing this will scale all text proportionately (default = 0.9)
Faces
- \def\regular{"Times New Roman"} – Font to use for text where the marker does not define a font style in the Paratext stylesheet (result is "plain" text)
- \def\bold{"Times New Roman/B"} – Font to use for text where the marker is defined as "\Bold" in the Paratext stylesheet
- \def\italic{"Times New Roman/I"} – Font to use for text where the marker is defined as "\Italic" in the Paratext stylesheet
- \def\bolditalic{"Times New Roman/BI"} – Font to use for text where the marker is defined as "\Bold" + "\Italic" in the Paratext stylesheet
 | Script specific features for fonts supporting the selected script can be enabled by adding a "script=" parameter to the end of the font name. For example, in the case of typesetting Arabic script, we might have:
\def\regular{"Scheherazade:script=arab"}
The script parameter is an OpenType script tag. A list of common script tags is presented in an appendix at the end of this document.)
You can also specify a font definition like this directly in a stylesheet marker definition. For example:
\Marker p
\FontName Scheherazade:script=arab |
Text Spacing
- \def\LineSpacingFactor{1} – Scaling factor used to adjust line spacing (leading); relative to font size (default = 1.2)
- \def\VerticalSpaceFactor{1.0} – Scaling factor used to adjust amount of vertical spaces applied for usfm.sty SpaceBefore and SpaceAfter values (default = 0.2}
Chapters & Verses
- \OmitVerseNumberOnetrue – Omit the first verse number in every chapter? (default = false)
Running Header/Footer
Header/Footer Position
- \def\HeaderPosition{0.7} – Position of the baseline of the header relative to the top edge of the paper (not the text area) (default = 0.5)
- \def\FooterPosition{0.5} – Position of the baseline of the footer relative to the bottom edge of the paper (not the text area) (default = 0.5)
The following parameters are used to specify the information to include in the running header (at top of pages, except title pages). Set the items to print at left/center/right of odd and even pages separately.
Odd Header
- \def\RHoddleft{\empty}
- \def\RHoddcenter{\rangeref}
- \def\RHoddright{\pagenumber}
Even Header
- \def\RHevenleft{\pagenumber}
- \def\RHevencenter{\rangeref}
- \def\RHevenright{\empty}
Title-page Header
- \def\RHtitleleft{\empty}
- \def\RHtitlecenter{\empty}
- \def\RHtitleright{\empty}
Odd, Even, and Title-page Footer
Nine similar \def commands are available, beginning with \RF instead of \RH.
 | Header/Footer Content Parameters
- \rangeref – Scripture reference of the range of text on the page
- \firstref – reference of the first verse on the page
- \lastref – reference of the last verse on the page
- \pagenumber – the page number
- \empty – print nothing in this position
|
Literal text can also be included (e.g., to add dashes around a centered page number, like - \pagenumber -).
Other Header Setup
- \RHruleposition=6pt – Position of a rule below the running header (default = 10pt)
- \VerseRefstrue – Whether to include verse numbers in header/footer references, or only chapter numbers (default = false)
Notes
- \AutoCallerStartChar=97 – Unicode value of first character to use for auto-generated callers (default = 97 = 'a')
- \AutoCallerNumChars26 – Number of caller characters to generate before restarting sequence (default = 26)
- \AutoCallers{f|x}{callers csv} – Make the specified note class use a specific sequence of symbols
- \AutoCallers{f}{*,+,¶,§,**,++,¶¶,§§}
- \AutoCallers{x}{} (this configuration would suppress callers for cross-references)
- \NumericCallers{f} – Make the note class use numeric (instead of alphabetic) callers (specify f or x)
- \PageResetCallers{f} – Restart numbering for the notes class on each page (specify f or x)
- \OmitCallerInNote{x} – To omit callers from the note class at the bottom of the page (specify f or x)
- \ParagraphedNotes{x} – Format the note class as a single paragraph, with larger space between note items (specify f or x)
For now, if you want to change the appearance of (or remove) the footnote rule, redefine \def\footnoterule
- \def\footnoterule{} – No footnote rule will be applied if the definition is empty (as in this example)
Illustrations (Figures)
- \IncludeFigurestrue – Output illustrations (figures) marked in the text with USFM \fig...\fig* markup? (default = true)
- \FigurePlaceholdersfalse – Operate in "figure placeholders" mode? If true, the macros will read your picture definitions, but only render a rectangular frame containing the text of the filename, rather than the actual graphic. (default = false)
Hooks
Hooks can insert something (text, or any valid TeX instruction/control sequence) to the output, at selected marker (style) location(s).
- \sethook{location}{marker}{insert}
Example: \sethook{start}{s1}{~}
Valid locations are:
- before – prior to the start of the par or style run containing the selected style text (before its definition is applied)
- after – after the end of the par or style run containing the selected style text (after its definition is terminated)
- start – before the start of the selected style text (but after the paragraph or character style definition is applied)
- end – after the end of the selected style text (but before the paragraph or character style definition is terminated)
 | A useful hook is the command to "hang" verse numbers into the paragraph indent, often wanted on poetry styles:
\sethook{start}{q1}{\hangversenumber}
\sethook{start}{q2}{\hangversenumber} |
Appendix: Common OpenType script tags
| Tag |
Script |
| arab |
Arabic |
| armn |
Armenian |
| beng |
Bengali |
| bopo |
Bopomofo |
| cans |
Canadian Syllabics |
| cher |
Cherokee |
| hani |
CJK Ideographic |
| cyrl |
Cyrillic |
| deva |
Devanagari |
| ethi |
Ethiopic |
| geor |
Georgian |
| grek |
Greek |
| gujr |
Gujarati |
| guru |
Gurmukhi |
| jamo |
Hangul Jamo |
| hang |
Hangul |
| hebr |
Hebrew |
| kana |
Hiragana |
| knda |
Kannada |
| kana |
Katakana |
| khmr |
Khmer |
| lao |
Lao |
| mlym |
Malayalam |
| mong |
Mongolian |
| mymr |
Myanmar |
| orya |
Oriya |
| sinh |
Sinhala |
| syrc |
Syriac |
| taml |
Tamil |
| telu |
Telugu |
| thaa |
Thaana |
| thai |
Thai |
| tibt |
Tibetan |
| yi |
Yi |