Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Having a blank PDF file may be useful for a certain situation that I don't know.

Neither

\documentclass{minimal}
\begin{document}
\end{document}

nor

\documentclass{article}
\begin{document}
\end{document}

produce a page when each of them is compiled using either pdflatex or latex.

Note: [pdf]latex can produce a blank single-page PDF with the following trick:

\documentclass{minimal}
\begin{document}
\  
\end{document}

Questions

Why does [pdf]latex not produce a blank single-page PDF when nothing is the input file body?

share|improve this question
5  
a general rule: nothing in the body, no output –  Herbert Jul 16 '11 at 10:17
3  
Put \leavevmode or something inside to get an empty document. –  Andrey Vihrov Jul 16 '11 at 10:59
2  
@xport ~ is more minimal: it's a non-breaking space. –  Seamus Jul 16 '11 at 13:37
    
@Seamus: It works. Excellent optimizer. :-) –  xport Jul 16 '11 at 13:38
2  
The shortest named macro might be \null. :-) –  xport Jul 16 '11 at 13:53

1 Answer 1

up vote 12 down vote accepted

TeX works (conceptually) by adding material to a 'scroll', then cutting pages from this. Until you add something, there is no scroll to cut material off. As the comments have made clear, there are several ways to force printing a blank page by adding something invisible to the 'scroll'. However, that is very different from expecting blank pages. I wonder how you would differentiate between the case you outline and what happens after the last page of an normal (text-containing) document.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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