기하학 패키지가 내 여백을 엉망으로 만드는 이유는 무엇입니까?

기하학 패키지가 내 여백을 엉망으로 만드는 이유는 무엇입니까?

페이지를 최대한 활용하여 문서를 작성하고 싶습니다. 내가 사용하고 있는 코드는 다음과 같습니다(면책조항: 샘플 텍스트를 다음에서 가져왔습니다.여기):

\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}

보기에는 좋지만 측면에 사용하지 않은 종이가 많이 있습니다. 기하학 없음

그러나 기하학 패키지를 호출하는 줄의 주석 처리를 제거하자마자 여백을 변경하라는 명령을 실행하지 않았음에도 불구하고 여백이 엉망이 됩니다. 기하학

일부 소스를 살펴보았지만 이런 일이 발생하는 것에 대해 언급하지 않았으므로 기하학이 왜 그런 식으로 동작하는지 이해하고 싶습니다.

또한 가능하다면 사용되지 않는 종이 공간을 최대한 적게 남겨두기 위해 코드를 올바르게 작성하는 데 도움이 됩니다.

답변1

memoirgeometry페이지 레이아웃을 정의하는 자체 수단이 있으므로 함께 사용하지 않는 것이 가장 좋습니다 . 아래 MWE는 여백을 줄여 텍스트 블록의 크기를 늘립니다.

% 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 memoir자세한 내용은 설명서( )를 읽어보세요 .

관련 정보