# How to fix the top and bottom margins in Lyx in order to conform to standard ERC proposal?

I need to write a document with specific margins (well, I admit, a grant proposal). They want :

The minimum font size allowed is 11 points, line spacing single. The page size is A4, and all margins (top, bottom, left, right) should be at least 15 mm (not including any footers or headers). Ensure that the font chosen is clearly readable (e.g. Arial or Times New Roman).

Literature references should be listed in footnotes, font size 8 or 9. However, regardless of the format used, all footnotes will count towards the page limit.

Say, I want to make the document with maximum words, so I want to follow exactly their recommendations. I know how to ask Lyx/LaTeX to do a 11pt document, single line spacing, in Times New Roman. I put in bold what bother me.

How to be sure I have 15 mm top and bottom margins when header and footer are present, and margins exclude them ?

The problem is that on Lyx -> Document -> Settings I have the following possibilities

• Top
• Bottom
• Inner
• Outer
• Foot skip
• Column Sep

For left and right margin I understand that putting 15 mm in Inner and Outer will do the job (one-side document, but here it's not so important since it's symmetric).

Column Sep has a clear meaning (and actually is unimportant, even if they forget to impose one-column I believe they want a one-column document)

Now when I modify the Top, Bottom, Head-Sep, Head-Height and Foot-Skip it results totally random things: sometimes the footnotes overlap with the footer, sometimes the footer is clearly not at 15 mm from the bottom of the page, sometimes the header overlaps with the first line, ...) Also, the Wikibooks web-page is totally obscure for me (there is no bottom margin at all ... the Top entry in Lyx does not correspond to TopMargin-point-4 on the Wikibooks ... ).

Any help to be sure the document will end-up with 15mm Bottom and Top margins is welcome. Especially, the header, footer and footnotes should be outside the 15mm margins.

Alternatively, can someone confirm a 12pt document (standard article class) gives 9pt footnotes, and a 11pt document produces some 8 pt footnotes ?

NB: It exists an alternative way to ensure that the margins include the header and footer. It consists in calling

as explained in this post (I found this post after posting the question actually). Despite this sounds to be the simplest solution, it might be interesting to know how to do the same using only Lyx commands ?

There are not random results but inconsistent settings. Please use the option showframe in the package geometry and see the log file to understand what happen with your settings.

Take into account that top margin in Lyx should be 15 mm plus headheight plus headsep and that header text should be enough small to fit in the headheight, otherwise LaTeX will change his setting trying to do the best.

In the same way, bottom margin should be 15 mm plus the footskip, but the footer text must fit within the foot skip.

Taking this into account, you can already fix without problems the margins using the normal menu of LyX (Documents>Settings...>Page Margins), but there are nothing wrong checking "Defaults Margins" box and using the package geometry directly in Documents>Settings...>LaTeX preamble. This allow you to use options of geometry that LyX cannot manage, or use dynamic dimensions, so the margins are calculated correctly independently of the default font size:

\documentclass{article}
\usepackage[paperheight=16cm,paperwidth=14cm,showframe]{geometry}
\geometry{
lmargin=15mm,
rmargin=15mm,
tmargin=\dimexpr15mm+1.5\baselineskip,
bmargin=\dimexpr15mm+1.5\baselineskip,,
footskip=1.5\baselineskip}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
\section{Testing margins}
\lipsum*[1]\footnote{A foonote}
\lipsum*[2]\footnote{A foonote}
\lipsum*[3-5]
\end{document}


Some like \chead{\Huge A} just at the end of the preamble will ruin this layout, but LaTeX warn you in the .log file:

Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 30.0pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.


Also, as you can see in this MWE, the footnotes are not a problem at all, since they are included in the text area, not in the margins.

On the other hand, for a 12pt article the default font size in footnotes (\footnotesize) is 10pt, so you must use a \scriptsize. See What point (pt) font size are \Large etc.? and Set font size for footnotes.