0

My assignment requires me to have top and bottom margins of 2cm, and left and right of 3cm. Left and right perfectly work, but when using the geometry package as seen below, my top and bottom margins are 3,7cm instead of 2cm in size.

My preamble looks as follows:

\documentclass[a4paper,12pt]{article}

\usepackage[a4paper, portrait, top=20mm, bottom=20mm, right=30mm, left=30mm]{geometry}

% Times New Roman
\usepackage{mathptmx}
\usepackage[T1]{fontenc}

\usepackage[onehalfspacing]{setspace}

\usepackage{babel}[ngerman]

\renewcommand\refname{Literaturverzeichnis}

\begin{document}

when using showframe, I get the following output: showframe generated pdf

but I want it to look like this:

desired look

The whole document's code can be found here:

\documentclass[a4paper,12pt]{article}

\usepackage[a4paper, portrait, top=20mm, bottom=20mm, right=30mm, left=30mm, showframe]{geometry}

% Times New Roman
\usepackage{mathptmx}
\usepackage[T1]{fontenc}

\usepackage[onehalfspacing]{setspace}

\usepackage{babel}[ngerman]
\addto\captionsngerman{\renewcommand\refname{Literaturverzeichnis}}

\begin{document}

\title{Beweis des Satz des Pythagoras nach An-Nairizi und Versuys sowie Kritik und Vergleich beider Verfahren}
\date{17.12.2020}
\author{timlwsk\\ Gymnasium Lorem ipsum,\\ Qualifikationsphase 1, Seminarfachkurs SF6}
\maketitle

Lorem ipsum dolor sit amet, \emph { consectetur adipiscing elit}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\section{Einleitung}
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi.

\section{Beweis eins}
We explain in this section how to obtain headings
for the various sections and subsections of our
document.

\subsection{Historische Einordnung}
Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?

\section{Beweis zwei}
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.

\subsection{Biographische Einordnung}
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

\section{Vergleich}
Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

\section{Beispiele}
Fließtext funktioniert offensichtlich wunderbar, doch die Frage ist nun, wie es mit einer Gleichung aussieht. Ein gutes Beispiel wäre: $1+e^\pi \cdot i=0$. Und wie sieht es mit Zitaten aus? \glqq Daß die Elektrodynamik Maxwells -- wie dieselbe gegenwärtig aufgefaßt zu  werden  pflegt -- in ihrer Anwendung auf bewegte Korper zu Asymmetrien führt, welche den Phänomenen nicht anzuhaften scheinen,  ist  bekannt.\grqq{} \cite{einstein}. Alles scheint also zu funktionieren.

% Zeilenumbruch
\newpage

%Literaturverzeichnis
\bibliographystyle{alphadin}
\bibliography{document}

\end{document}
10
  • 1
    Welcome to TeX SX! Adding the showframe option to geometry shows a 2cm vertical margin.
    – Bernard
    Dec 6 '20 at 11:28
  • 1
    Please explain exactly how you have measured this length? Note that certain PDF viewers are known to scale down documents even if they are A4 to be printed on A4, thus your measuring method is rather important. Also please extend your example to a full minimal example (note that kantlipsum package provides the \kant macro that outputs a lot of English text, useful for testing).
    – daleif
    Dec 6 '20 at 12:16
  • 1
    Unrelated, babel options goes before {babel} not after and under babel a redefinition like \renewcommand\refname{Literaturverzeichnis} is overwritten by babel, use \addto\captionsngerman{\renewcommand\refname{Literaturverzeichnis}} for the correct method
    – daleif
    Dec 6 '20 at 12:19
  • @daleif I directly printed the export I got
    – timlwsk
    Dec 6 '20 at 13:19
  • @Bernard I added a screenshot!
    – timlwsk
    Dec 6 '20 at 13:24
1

You can load the titling package and use \setlength{\droptitle}{-12ex} (value found by trial and error) in the preamble:

enter image description here

4
  • Thank you very very much! Do you have a clue why "Excepteur" overshoots on the right hand side tho?
    – timlwsk
    Dec 6 '20 at 19:56
  • Yes: that's because you didn't load the Latin hyphenation patterns, and latex has no rule to hyphenate such a word by default. Will you defend a thesis in Latin, as was the case in Germany up to the beginning of the 20th century? ;o)
    – Bernard
    Dec 6 '20 at 20:06
  • Would be pretty cool to hand it in in Latin tbh :D
    – timlwsk
    Dec 6 '20 at 21:01
  • Personally, I tend to replace QED at the end of a proof with ΕΟΔ.
    – Bernard
    Dec 6 '20 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.