5

Related question: Changing a4paper to letterpaper

I used to type all my LaTeX in letter size. Example:

\documentclass{article}

\begin{document}    asdf    \end{document}

However, we switched printers, and now I need everything to be A4 size. I tried

\documentclass[a4paper]{article}

\begin{document}    asdf    \end{document}

However, it still resulted in letter-sized articles.

So I asked a colleague how he did his size change. His response was astonishing:

\documentclass{article}
\usepackage{typearea}

\begin{document}    asdf    \end{document}

Even though he did not specify the A4 paper size anywhere, this command already changed the paper size to A4. On the other hand,

\documentclass[letterpaper]{article}
\usepackage{typearea}

\begin{document}    asdf    \end{document}

allows him to quickly change back to letter.

My question is: what is the "normal" way of modifying the paper size of an article? Surely, it cannot be by including this obscure package in the headers, and never referring to it again.

p.s., I'm compiling this PDF on an embedded device, and therefore including the package {geometry} makes my PDF compile more slowly; I'd prefer a solution without it, if there's a simple one.

4
  • You need to change the default paper size to A4. What TeX distribution are you using?
    – egreg
    Commented Jan 20, 2020 at 16:45
  • I am using pdflatex. So the answer below would work.
    – Alex
    Commented Jan 20, 2020 at 17:56
  • pdflatex is not the TeX distribution. With TeX Live, for instance, it's easy to change the default paper size to A4.
    – egreg
    Commented Jan 20, 2020 at 18:07
  • ... Oh. How do I find out what TeX distribution I'm using? Totally a side question, since my problem is already solved.
    – Alex
    Commented Jan 21, 2020 at 10:00

1 Answer 1

5

You need code to set the pdf paper size. article is too old, and so doesn't it on its own. The needed code depends on the engine/backend. E.g. for pdflatex this would work:

\documentclass[a4paper]{article}
\pdfpagewidth=\paperwidth
\pdfpageheight=\paperheight
\begin{document}
abc

\end{document}

This is a bit cumbersome so a number of packages do this for you. typearea is one of them but will (probably) change also other layout values. graphicx is another one which I normally would use:

\documentclass[a4paper]{article}
\usepackage{graphicx}
\begin{document}
abc

\end{document}
2
  • Thanks for including the top method: it is definitely a lot faster on the embedded system that I am using.
    – Alex
    Commented Jan 20, 2020 at 17:59
  • Ulrike, would this approach work for any size? For instance, I'm trying b7paper and getting Unused global option(s): [b7paper]. Thanks!
    – PatrickT
    Commented Sep 1, 2021 at 15:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .