# Warning message: “The marginal notes overrun the paper”

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[a4paper]{geometry}
\pagestyle{empty}
\setlength{\parskip}{0bp}
\setlength{\parindent}{0pt}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{babel}
\begin{document}

\end{document}


I've been using TexMaker 4.0.1 since this morning. It keeps giving me this warning message whenever I compile my document. I don't understand the terminology (marginal notes) in the message. I guess this warning is due to the values specified along with the \geometry command. However, there is no negative value written there. Also I tried making those zeros ones, but it still gave this same warning.

What is the cause of this warning message, and how do I fix it?

-
i think a4paper and \geometry are redundant, retain only one. –  texenthusiast Apr 11 '13 at 20:50
The problem is that your left and right margins are so tiny that there is no space for the \marginparsep and \marginparwidth. You should add nomarginpar as an option to geometry if you really want those settings. –  jon Apr 11 '13 at 21:38
@texenthusiast I'm not so sure about that... You can specify the paper size from the beginning with \documentclass[a4paper]{report}, but \usepackage{geometry} allows you to define page layout –  Mario S. E. Apr 11 '13 at 21:52
See egreg's answer to Using 'Letter' paper with pdflatex, It's really clear. –  texenthusiast Apr 11 '13 at 22:13
May I ask why you want so small margins? The result will be too many characters per line and is hard to read ... –  Kurt Apr 12 '13 at 0:27

I just added package showframe to your MWE to show you the resulting margins of your MWE.

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{showframe}          % http://www.ctan.org/pkg/showframe
\usepackage[a4paper]{geometry}  % change later to \usepackage{geometry}
\pagestyle{empty}
\setlength{\parskip}{0bp}
\setlength{\parindent}{0pt}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{babel}
\begin{document}
Text
\end{document}


To produce one page I added just "Text" as content of your document. The result is then:

Now comment the line starting with \geometry and check the result. Finaly delete the option a4paper for package geometry and compile again.

I think after that the error message is clear ;-)

On page 10 of the documentation of package geometry you find the description for 3 options to control the margins of your page. I included this options (no margins and very small, I think nearly useless? margins) in the following MWE (play with the comment signs %). You have now papersize a4 without an error message.

The new MWE:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{showframe}            % http://www.ctan.org/pkg/showframe
\usepackage{geometry}             % change later to \usepackage{geometry}
\pagestyle{empty}
\setlength{\parskip}{0bp}
\setlength{\parindent}{0pt}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{babel}
\begin{document}
Text
\end{document}

-
If I make that change, it will turn the page from 'A4, Portrait (210 × 297 mm)' to 'US Letter, Portrait (216 × 279 mm)'. So I need to specify A4 if I want an A4 page. –  jon Apr 11 '13 at 21:34
@jon: So your tex distribution is configured to print US letter. You can change this (depends on your distribution) or better do not use the margins of 1 cm. May I ask why you want this margins? Typographicaly not beutiful ... –  Kurt Apr 11 '13 at 21:39
True: I don't want these margins; but as I live in North America, it is better for me to default to 'letterpaper' than to A4. All I meant was that when I want to use A4, I need to specify it (e.g., when in Europe, or when sending documents to European colleagues). –  jon Apr 11 '13 at 21:46
@jon: see my updated answer with second MWE –  Kurt Apr 11 '13 at 22:02
Yes, that is better. However, I still think the option nomarginpar is appropriate for virtually any document that has such small margins. –  jon Apr 12 '13 at 0:14

I would rewrite your minimal file as follows:

% \documentclass[english]{article} % <-- load language options with babel
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{showframe}          % http://www.ctan.org/pkg/showframe
\usepackage{geometry}
\geometry{verbose,
tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm,
nomarginpar % <-- comment out this option to see the difference
}
\pagestyle{empty}
\setlength{\parskip}{0bp}
\setlength{\parindent}{0pt}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage[english]{babel}
\begin{document}
Text
\end{document}


If you comment out nomarginpar, you'll see the difference (thanks to the package showframe). Note also that depending on your settings, you may not need to specify that you want to use A4 paper. The default is either A4 or 'letterpaper' (i.e., the 8.5'x11' paper common only to North America). If your setup defaults to the wrong kind of paper, you can change this, but it depends on your system and setup.

-