I would like to create with LaTeX a PDF document whose pages have prescribed dimensions. For instance, I would like to create a document whose pages have dimension 5cm x 5cm.
Is it possible, and if yes how would do that?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI would like to create with LaTeX a PDF document whose pages have prescribed dimensions. For instance, I would like to create a document whose pages have dimension 5cm x 5cm.
Is it possible, and if yes how would do that?
The answer is : with the geometry
package.
For instance,
\documentclass{article}
\usepackage[paperheight=5cm,
paperwidth=5cm]{geometry}
\begin{document}
test
\end{document}
will make it.
geometry
package. It has lots of options. – David Carlisle Jun 19 '13 at 11:57\documentclass{article} \usepackage[height=5cm, width=5cm, top=1cm, bottom=1cm, left=1cm, right=1cm]{geometry} \begin{document} test \end{document}
won't do it, unfortunately. The size of the page seems to depend more on theclass
used. – Colas Jun 19 '13 at 12:08\documentclass{article} \usepackage[paperheight=5cm, paperwidth=5cm, top=1cm, bottom=1cm, left=1cm, right=1cm]{geometry} \begin{document} test \end{document}
is working perfectly ! – Colas Jun 19 '13 at 12:10