2

I know that there are a lot of similar questions, but sadly, none of which solved my problem.

I want an A4 page with the textbox exactly 10mm margins to all sides (to the edges of the paper). But everytime I try something like

top=10mm, bottom=10mm, left=10mm, right=10mm            // or
tmargin=10mm, bmargin=10mm, lmargin=10mm, rmargin=10mm  // or
margin=10mm

etc.

with geometry it destroys my page as soon as i set it to something other than 1in.

Pic 1 (messed up):

enter image description here

Pic 2 (default):

enter image description here

I also tried setting total, heigth, width, hmarginratio, vmarginratio, marginparsep, bindingoffset, footskip, textwidth, textheight, \setlrmarginsandblock, \setulmarginsandblock ... and a few others.

Code for Pic 1:

\documentclass[
    12pt,
    a4paper,
    ngerman
]{minimal}
% i use minimal because i don't need header, footer, page number etc.
% i just need a simple textbox

\usepackage{lipsum}
\usepackage{showframe}

\usepackage[
    top=10mm,
    bottom=10mm,
    left=10mm,
    right=10mm
]{geometry}

\begin{document}

\lipsum[1-8] % corrected

\end{document}

Code for Pic 2:

\documentclass[
    12pt,
    a4paper,
    ngerman
]{minimal}
% i use minimal because i don't need header, footer, page number etc.
% i just need a simple textbox

\usepackage{lipsum}
\usepackage{showframe}

\begin{document}

\lipsum[1-8] % corrected

\end{document}

I use Texmaker on Ubuntu with TexLive (installed because of an error with ngerman)

Maybe notable: everytime i use heightrounded i get an Arithmetic overflow


UPDATE: Thanks for your answers! I finally solved my problem. With ShareLaTeX i get the same result as you (and what i want). I also tried different other clients (LyX, gedit-latex-plugin and TeXstudio). LyX and gedit have the same problem, but TeXstudio finally works after i made a full install of TeXLive. Still don't know whats wrong, but at least it works.

2
  • \lipsum{1-8} is wrong. It should be \lipsum[1-8]. Your 'Pic 1' example compiles fine for me with correct margins.
    – Milo
    Commented May 20, 2018 at 14:08
  • 1
    Don't ever use minimal. It is not for minimal examples.
    – egreg
    Commented May 20, 2018 at 15:39

2 Answers 2

2

No problem here either. I just simplified the code to set margins and used the showframe option of geometry:

\documentclass[12pt, a4paper, ngerman]{minimal}
% I use minimal because i don't need header, footer, page number etc.
% I just need a simple textbox
\usepackage{babel}
\usepackage{lipsum}
\usepackage[margin=10mm, showframe]{geometry}

\begin{document}

\lipsum[1-8]

\end{document} 

enter image description here

0

Compiles fine for me. (this was done using ShareLaTeX)

\documentclass[
    12pt,
    a4paper,
    ngerman
]{minimal}
% i use minimal because i don't need header, footer, page number etc.
% i just need a simple textbox

\usepackage{lipsum}
\usepackage{showframe}

\usepackage[
    top=10mm,
    bottom=10mm,
    left=10mm,
    right=10mm
]{geometry}

\begin{document}

\lipsum[1-8] % Not \lipsum{1-8}

\end{document}

enter image description here

You must log in to answer this question.

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