1

This question already has an answer here:

There is a way to dynamically enlarge a page in a LaTeX document? the thing I want is to have a document which will always have a single page, so the page should increase in height to hold all the document contents.

marked as duplicate by siracusa, user156344, Stefan Pinnow, Mensch, TeXnician Mar 8 at 7:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Of course it is possible :)

You can use the standalone class with the varwidth option to make the size automatically adjustable.

It can't get infinitely big (no computer can handle infinity) but this example code makes a 2.1 m wide and 5.6 m high page (in less than 7 seconds):

\documentclass[varwidth=500cm,margin=1cm]{standalone}
\usepackage{lipsum}
\begin{document}
\lipsum[1-150]
\lipsum[1-150]
\lipsum[1-150]
\lipsum[1-150]
\lipsum[1-150]
\lipsum[1-150]
\lipsum[1-150]
\lipsum[1-150]
\lipsum[1-150]
\end{document}

The argument you pass to varwidth is the width of the page, and its height grows dynamically.

If the page goes beyond 5.7 m tall TeX will complain, but long before that your PDF viewer will hang and you won't be able to read anything:

enter image description here

enter image description here

Your turn MS Office :)

  • 1
    wow, that is just what I was looking for, perfect. Thanks. – Alysson Cirilo Mar 8 at 12:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.