Warum bringt das Geometriepaket meine Ränder durcheinander?

Warum bringt das Geometriepaket meine Ränder durcheinander?

Ich möchte ein Dokument schreiben, das so viel wie möglich von der Seite nutzt. Der Code, den ich verwende, ist dieser (Haftungsausschluss: Ich habe den Beispieltext vonHier):

\documentclass[12pt, oneside, a4paper]{memoir}

\usepackage{layout}
\usepackage{showframe}

%\usepackage[a4paper]{geometry}

\usepackage{amssymb, amsfonts, amsthm}
\newtheorem{problem}{Problem}

\begin{document}
\title{Sample Document}
\author{John Doe}
\maketitle

\layout{}

Here is some sample text to show you what LaTeX does. 

To start a new paragraph, you need to leave a line of white space in your tex file.

To include math, you have two options. The first is called ``in line,'' and you do this by putting your math between two dollar signs (\$). For example, Fermat's Little Theorem tells us that if $p$ is a prime and $a$ is an integer such that $p \nmid a$, then $a^{p-1} \equiv 1 \pmod{p}$. Note that the exponent on $a$ has to go in braces (in the tex file). 

But if you really want an equation (or congruence) to stand out, then you ``display'' the math. It looks like this:
\[
    a^{p-1} \equiv 1 \pmod{p}.
\]
Nice, right?

Finally, we can make things look really nice for homeworks as follows:

\begin{problem}
    Let $X$ and $Y$ be blah blah blah \ldots
\end{problem}

\begin{problem}
    Let $X$ and $Y$ be as in the previous problem. What is $Z$?
\end{problem}

Notice that LaTeX automatically numbers the problems for us. 

\end{document}

Es sieht nett aus, hat aber an den Seiten viel unbenutztes Papier: Keine Geometrie

Sobald ich jedoch die Zeile mit dem Aufruf des Geometriepakets auskommentiere, geraten die Ränder durcheinander, obwohl ich nicht einmal einen Befehl zum Ändern eingegeben habe. Geometrie

Ich habe versucht, mir einige Quellen anzusehen, aber dort wird nicht erwähnt, dass so etwas passiert. Deshalb würde ich gerne verstehen, warum sich die Geometrie so verhält.

Außerdem kann, wenn möglich, dabei geholfen werden, den Code richtig zu formulieren, um so wenig ungenutzten Papierplatz wie möglich zu hinterlassen.

Antwort1

memoirhat seine eigene Methode, das Seitenlayout zu definieren, und sollte am besten nicht geometryzusammen mit dieser verwendet werden. Das folgende MWE vergrößert den Textblock, indem es die Ränder verkleinert.

% memgeomprob.tex  SE 562072

\documentclass[12pt, oneside, a4paper]{memoir}

\setlrmarginsandblock{0.8in}{*}{1.0} % set left/right margins to 0.8in
\setulmarginsandblock{1in}{*}{1.0}   % set upper/lower margins to 1in
\checkandfixthelayout

\usepackage{layout}
\usepackage{showframe}

%\usepackage[a4paper]{geometry}
%\usepackage{geometry}

\usepackage{amssymb, amsfonts, amsthm}
\newtheorem{problem}{Problem}

\begin{document}
\title{Sample Document}
\author{John Doe}
\maketitle

\layout{}

Here is some sample text to show you what LaTeX does. 

To start a new paragraph, you need to leave a line of white space in your tex file.

To include math, you have two options. The first is called ``in line,'' and you do this by putting your math between two dollar signs (\$). For example, Fermat's Little Theorem tells us that if $p$ is a prime and $a$ is an integer such that $p \nmid a$, then $a^{p-1} \equiv 1 \pmod{p}$. Note that the exponent on $a$ has to go in braces (in the tex file). 

But if you really want an equation (or congruence) to stand out, then you ``display'' the math. It looks like this:
\[
    a^{p-1} \equiv 1 \pmod{p}.
\]
Nice, right?

Finally, we can make things look really nice for homeworks as follows:

\begin{problem}
    Let $X$ and $Y$ be blah blah blah \ldots
\end{problem}

\begin{problem}
    Let $X$ and $Y$ be as in the previous problem. What is $Z$?
\end{problem}

Notice that LaTeX automatically numbers the problems for us. 

\end{document}

> texdoc memoirWeitere Informationen finden Sie im Handbuch ( ).

verwandte Informationen