Page Geometry 101

An A7 page with 1cm margins and 1cm paragraph indentation.

sile

Download: ( source | pdf )

Input document

\begin[papersize=a7]{document}
\nofolios
\begin[first-content-frame=content]{pagetemplate}
\frame[id=content,left=1cm,right=right(page)-1cm,top=1cm,bottom=bottom(page)-1cm]
\end{pagetemplate}
\set[parameter=document.parindent,value=1cm]
An A7 page with 1cm margins and 1cm paragraph indentation.
\end{document}

Render command

sile -o page-geometry-sile.pdf page-geometry-sile.sil

typst

Download: ( source | pdf )

Input document

#set page(
  paper: "a7",
  margin: 1cm,
)
#set par(
  first-line-indent: 1cm,
  justify: true,
)
// Note the manual glue node here is a hack around first
// paragraph in block not respecting first-line-indent:
// https://github.com/typst/typst/issues/311
#h(1cm)An A7 page with 1cm margins and 1cm paragraph indentation.

Render command

typst compile page-geometry-typst.typ page-geometry-typst.pdf

xelatex

Download: ( source | pdf )

Input document

\documentclass{article}
\usepackage[paperheight=105mm,paperwidth=74mm,margin=1cm]{geometry}
\pagenumbering{gobble}
\usepackage{indentfirst}
\setlength{\parindent}{1cm}
\begin{document}
An A7 page with 1cm margins and 1cm paragraph indentation.
\end{document}

Render command

xelatex -interaction=batchmode -halt-on-error -jobname data/page-geometry-xelatex page-geometry-xelatex.tex

groff

Download: ( source | pdf )

Input document

.nr HM 1cm
.nr PO 1cm
.nr LL 5.4cm
.nr PI 1cm
.PP
An A7 page with 1cm margins and 1cm paragraph indentation.

Render command

groff -ms -P-pA7 -T pdf page-geometry-groff.ms > page-geometry-groff.pdf

pagedjs

Download: ( source | pdf )

Input document

<html>
	<head>
		<style>
		@page {
			size: A7;
			/* Work around a bug in paged.js, if bleed is not specified the
			   paper size doesn't fully take effect:
			   https://gitlab.coko.foundation/pagedjs/pagedjs/-/issues/450 */
			bleed: 0;
			margin: 1cm;
		}
		p {
			text-indent: 1cm;
			text-align: justify;
		}
		</style>
	</head>
	<p>
		An A7 page with 1cm margins and 1cm paragraph indentation.
	</p>
</html>

Render command

pagedjs-cli -i page-geometry-pagedjs.html -o page-geometry-pagedjs.pdf