0

I'm trying to create a basic template for an A4 paper document. As always when I try to do any sort of precision in Latex, there seem to be annoying random margins popping up.

A4 paper is exactly 297mm high and 210mm wide. I'm using the fullpage package with [cm], hence I should have a remaining usable height of 277mm and width of 190mm. However, if I create one or several minipages (above each other) I'd expect their cumulative height to have 277mm available and their cumulative width (on each row) 190mm. However, a \begin{minipage}[c][277mm][c]{190mm} causes Latex to emit a warning that

  • the \hbox is 28.45273pt too wide (this is precisely 1cm) and
  • the \vbox is 53.45273pt too high (1.89cm)

and distributing that width/height among several minipages causes newlines and newpages.

How can I get rid of all these margins, to allow a precise template down to the mm. I will later add appropriate margins, but I want to be able to control them.

Perhaps there is a better documentclass for (fairly naked) one-page documents? I think beamerposter would be overkill for what I want to do.


Here is a MWE:

\documentclass[a4paper]{article}
\usepackage[cm]{fullpage}
\usepackage{ngerman}
\usepackage[utf8]{inputenc}

\pagestyle{empty}
\pagenumbering{gobble}
\setlength{\parindent}{0pt}

\begin{document}

\begin{minipage}[c][277mm][c]{190mm}
\it Lorem ipsum
\end{minipage}

\end{document}
1
  • 1
    Side note: Never use the long outdated ngerman package but rather \usepackage[ngerman]{babel}.
    – TeXnician
    Feb 25, 2020 at 15:14

2 Answers 2

1

Your minipage is bigger than text area of your document. To see this add showframe package and \fbox around ``minipage`:

\documentclass[a4paper]{article}
\usepackage[cm]{fullpage}
\usepackage{ngerman}
\usepackage[utf8]{inputenc}

\pagestyle{empty}
\pagenumbering{gobble}
\setlength{\parindent}{0pt}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}

\fbox{\begin{minipage}[c][277mm]{190mm}
\it Lorem ipsum
\end{minipage}%
    }
\end{document}

lower part of page is:

enter image description here

(red lines shows page layout, black ones border of minipage drawn by \fbox{...})

Since minipage is bigger than text area, it is pushed to the next page.

Why you like to have such big page, is unclear. However this warning you can remove with following size of minipaeYou can reduce/remove t

\setlength\fboxsep{0pt}
\addtolength\fboxsep{-2\fboxrule}
\fbox{\begin{minipage}[c][\textheight]{\textwidth}
\it Lorem ipsum
\end{minipage}%
    }
0

It turns out that fullpage[1cm] doesn't do it's job as expected. It works correctly when setting the margin with the -- apparently -- more precise geometry package:

\documentclass[a4paper]{article}
\usepackage[margin=1cm]{geometry}
\usepackage{ngerman}
\usepackage[utf8]{inputenc}
\usepackage{units}
\usepackage{calc}

\pagestyle{empty}
\pagenumbering{gobble}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt}
% these are not strictly necessary
\setlength{\footskip}{0pt}
\setlength{\marginparwidth}{0pt}

You must log in to answer this question.

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