texish

Parameters and Variables

Every engine parameter is an ordinary variable. Read one with \the\name (or bare \name), set one with \set name {value}, and use it in arithmetic with \calc{…}. Assignments are local…

Every engine parameter is an ordinary variable. Read one with \the\name (or bare \name), set one with \set name {value}, and use it in arithmetic with \calc{…}. Assignments are local to the current group unless made \global; \setlength / \addtolength are the LaTeX-named forms for the dimension-valued ones.

Dimensions accept any unit (pt, in, cm, mm, em, ex); a bare number is points. Glue is a natural size with optional plus/minus stretch and shrink (\set parskip {0pt plus 1pt}). The defaults below are the values a fresh document starts with.

Page and text area

VariableDefaultMeaning
hsize6.5inwidth of the text block (the line width)
vsize9inheight of the text block (the page body)
paperwidth8.5inphysical sheet width (LaTeX/pdfTeX; classic TeX has none)
paperheight11inphysical sheet height
hoffset1inleft margin — the text block’s x offset from the sheet corner
voffset1intop margin — the text block’s y offset from the sheet corner
pageno1the current page number (folio), advanced as pages ship
topskip10ptglue from the page top to the first baseline
raggedbottom0nonzero: pad short page bottoms with fil instead of stretching their glue

The far margins are whatever is left over: paperwidth − hoffset − hsize and likewise vertically. The \geometry primitive sets these as a group from margin/size options.

Running heads and feet

VariableDefaultMeaning
headsep0.25ingap from the bottom of the running header to the top of the body
footskip0.25ingap from the bottom of the body to the top of the running footer
topmark""the last \mark of the previous page
firstmark""the first \mark on the page being shipped
botmark""the last \mark on the page being shipped

A document supplies the header/footer content by defining headline / footline macros; \the\pageno inside them is always the shipping page’s number. The mark variables drive running heads that track the section a page covers.

Paragraph shape

VariableDefaultMeaning
parindent20ptfirst-line indent of a paragraph
parskip0pt plus 1ptvertical glue between paragraphs
leftskip0ptglue added at the left of every line
rightskip0ptglue added at the right of every line
parfillskip0pt plus 1filglue that fills out a paragraph’s last line
hangindent0pthanging-indent width (negative indents the right)
hangafter1apply the hanging indent after this many lines

Inter-line and inter-word spacing

VariableDefaultMeaning
baselineskip1.2 × font sizetarget distance between consecutive baselines
lineskip1ptbaseline glue used when lines would otherwise be closer than lineskiplimit
lineskiplimit0ptthe closeness threshold below which lineskip replaces baselineskip
spaceskipfont spaceinterword glue (reset when the font changes)
xspaceskip1.5 × font spaceinterword glue at a wider (sentence) space

Line breaking (Knuth–Plass)

VariableDefaultMeaning
tolerance200maximum acceptable line badness
pretolerance100first-pass tolerance, before hyphenation is tried
hyphenpenalty50penalty for breaking at a discretionary hyphen
exhyphenpenalty50penalty for breaking at an explicit hyphen
linepenalty10penalty charged per line, to prefer fewer lines
adjdemerits10000demerits for visually adjacent tight and loose lines
emergencystretch0ptextra per-line stretch in a final pass for paragraphs that will not justify

Page breaking

The page builder breaks by cost (badness + penalty); 0–9999 biases against a break here, 10000 forbids one, -10000 forces one.

VariableDefaultMeaning
clubpenalty10000against breaking after a paragraph’s first line (orphans)
widowpenalty10000against breaking before a paragraph’s last line (widows)
interlinepenalty0against breaking between any other two lines
wrappenalty10000against a break inside a wrapped figure’s band

Display math

VariableDefaultMeaning
abovedisplayskip0.83em plus/minus 0.17emglue set above a displayed formula
belowdisplayskip0.83em plus/minus 0.17emglue set below a displayed formula

Footnotes

VariableDefaultMeaning
footnotesep1emspace above the footnote separator rule
footnotesize0.8footnote text size, as a fraction of the surrounding font
footnoteno0the footnote counter, advanced by each \footnote

Floats

VariableDefaultMeaning
floatsep0.85emspace between two floats stacked in a page’s float area
textfloatsep1.4emspace between the float area and the body text
wrapsep12ptgutter between a wrapped figure and the text flowing around it

Images

VariableDefaultMeaning
imageScaling1.0a global multiplier applied to placed image sizes
imagessupportedbackendread-only 1/0 flag: can this backend rasterize images?

A document can branch on imagessupported to choose an inline bitmap where it is available and a drawn fallback where it is not.

Frame and rule lengths

These have no engine default; the document package and the framing primitives read them when set, falling back to the LaTeX values shown.

VariableFallbackMeaning
fboxsep3ptpadding between content and rule in \fbox / \colorbox
fboxrule0.4ptrule thickness for \fbox / \fcolorbox

Units

pt (the base unit, 1/72 in), in, cm, mm, em (the current font size), ex (its x-height).

Search

Esc
to navigate to open Esc to close