# MiKTeX “default papersize” setting

Now MiKTeX has the following setting:

I have it set to A4 (A4size) all the time. But I don't really understand what this setting is supposed to do. When I compile

\documentclass{book}
%\usepackage{fullpage}
\begin{document}
Hello World!
\end{document}


I get an A4 document, however uncommenting the fullpage package changes it to lettersize. The package documentation says that it needs the appropriate documentclass option, but I thought that is passed to the class by the MiKTeX default setting.

So what exactly does that setting do? Also, why are there two options for Letter, A4 and A6?

-

Generally when using LaTeX classes (article, book, report) you can explicitly specify the kind of paper size to use, a4paper or letterpaper, for example:

\documentclass[a4paper,11pt]{report}


However, when you convert a DVI file to PostScript there is again a choice of paper sizes. The conversion program (dvips) doesn't know the paper size specified in the original LaTeX file, but will assume its own default paper size unless told otherwise by a command such as:

    dvips -t a4 mydocdoc.dvi -o mydoc.ps


MikTeX settings will cater for the latter and set the paper size correctly to simplify the commands. It saves the setting in C:\MiKTeX\dvips\config\config.ps

Since you are using the MikTeX menus and pdfLaTeX to compile the document, this setting of the program does nothing i.e., you are not producing a postcript file, but a pdf directly. What is important in this case is that the class you are using sets \pdfpageheight and \pdfpagewidth.

-
Do you know what happens when I set dvips with -t unknown? Will it take the size specified in the LaTeX input file? –  I am who I say I am Jun 21 '13 at 22:51
dvips will never read the size from the LaTeX file, its input is the dvi i.e., the device independent file, which doesn't have any physical paper size info. –  Yiannis Lazarides Jun 21 '13 at 22:53
So the settings do not affect pdfTeX at all. Why are there two menu items for A4, A6 and Letter? –  marczellm Jun 22 '13 at 8:46

Traditional (La)TeX has no direct contact with printing on a physical paper.

 \documentclass[a4paper]{book}


and

 \documentclass{book}% US Letter


set up the width of the the text area and its offset from a notional reference pint 1in in from the top left corner of the page. But it would be the job of the .dvi driver to insert commands and perhaps further offset the text, for printing at a physical paper size.

pdfTeX combines the roles of TeX and the driver so has additional parameters \pdfpageheight and \pdfpagewidth that tell a .pdf reader what size to show the page boundaries. But by default LaTeX does not set these. (They are set by several packages including geometry and hyperref). So many tools in the TeX distribution will need a default page layout (almost always A4 or Letter) however for historical compatibility reasons the default behaviour for most people that have A4 printers is that the default physical paper size is A4 but the default text width and margins for latex are set for US Letter. LaTeX does not give a way to change that default, Documents not aimed at US Letter should use an explicit option so that they remain portable.

Apart from the screenshot of the menu, this applies to any TeX distribution not just MikTeX (in fact I personally use TeX Live but the issues are the same).

-
So if I understand correctly, the MiKTeX setting affects the papersize known to the driver, but not the papersize known to the documentclass and packages. This way if a package/class tries to 'detect' the papersize it will assume letterpaper. But why are there more than one options called A4, Letter and A6 in the menu? –  marczellm Feb 3 '13 at 21:10
sorry I don't use miktex so I'm not sure of the details of that menu, you might want to wait for a miktex user to answer:-) –  David Carlisle Feb 3 '13 at 21:36