1.)页码和文本边距之间的间距太小,我想调整它。
有人推荐几何包,例如
\usepackage[
top = 2.75cm,
bottom = 5.50cm,
left = 3.00cm,
right = 2.50cm]{geometry}
但这不起作用。
2.)左右边距似乎不正确。左边距比右边距长一点。如何不手动修复?我有点困惑,为什么这个功能不能自动工作。
这是我在工作中使用的原始代码,其中包含一个用于查看对齐方式和底部边距的小示例:
\documentclass[11pt, psamsfonts]{amsart}
%\documentclass[a4paper,11pt]{article}
\usepackage[english]{babel}
\usepackage{graphicx}
%\usepackage{subcaption}
%\usepackage{caption}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{ulem}
\usepackage{multirow}
\usepackage{eurosym}
\usepackage{pgfgantt}
\renewcommand{\baselinestretch}{1.50}
\theoremstyle{definition}
\newtheorem{defi1}{Definition}[section]
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}{Lemma}[section]
\newtheorem{cond}{Condition}[section]
\pagestyle{plain}
\textheight=230mm
\topmargin=3mm
\oddsidemargin=4mm
\evensidemargin=4mm
\textwidth=160mm
\parindent=0cm
\parskip=3mm
\begin{document}
The book centers on a boy, Bastian Balthazar Bux, who is neglected by
his father (who has sunken into despair after his wife's death) and is
bullied by his schoolmates. Whilst running from some of them, Bastian
bursts into the antique book store of Carl Conrad Coreander. Bastian
steals a book from the store called The Neverending Story which
Coreander has been reading; he hides in his school's attic, where he
proceeds to read the story through the rest of the day and the night,
not realizing that he has effectively become a part of it. After a while
of reading he is magically transfixed and is brought into the book.\\[15cm]
Bastian comes to Fantastica and meets the empress; she asks
him to help re-build Fantastica with his imagination, and he subsequently
has many adventures of his own in his new world. With the help of
AURYN, a medallion that links him to the empress, that grants all of the
boy's wishes and, thus, gives him power over all the inhabitants of
Fantastica, Bastian explores the Desert of Colors, battles the evil witch
Xayide, and meets the three deep thinkers. In the Desert of Colors,
he is told that the inscription of The Gem ("Do what thou wilt[1]")
means it is his job to find out his own True Will ("and nothing is
more difficult"); certainly not wishing whatever comes to his mind, even
though The Gem does fulfil these wishes.
\end{document}
答案1
您需要在设置页面参数后amsart
发出命令。\calclayout
页边距的差异是因为您指定了\oddsidemargin
:由于默认纸张为美国信纸,宽度为 215.9 毫米,宽度\oddsidemargin
为 4 毫米,加上 1 英寸(始终会加上),宽度\textwidth
为 160 毫米,因此总共有
4 + 25.4 + 160 = 189.4
因此右边距为 26.5 毫米,左边距为 29.4 毫米。
\oddsidemargin
只需删除和的设置\evensidemargin
。该类将计算它们为 7.25546pt = 2.55mm。上述计算变为
2.55 + 25.4 + 160 = 187.95
右边距为
215.9-187.95=27.95
恰好等于右边距。
因此
\textheight=230mm
\textwidth=160mm
\calclayout
会满足您的要求。如果使用 A4 纸,计算也会给出相等的边距。
您还必须考虑到amsart
计算中的标题\textheight
,因此您的设置不会给出 230 毫米高的类型区域,而是更低。如果您不需要标题,只需设置
\headheight=0pt
\headsep=0pt
之前\calclayout
。我不会碰\topmargin
。
首页页码与正文过于接近是一个众所周知的缺陷,amsart
并且在某种程度上是不可避免的。
不要使用过时的psamsfonts
选项。
答案2
您的示例中有两个 documentclass 命令,第一个命令使用美国信纸,第二个注释掉的命令使用 A4。由于在 TeX 中您只指定左边距和文本宽度,所以右边距是隐式的,取决于纸张大小。您还没有说明您使用的尺寸。
如果你添加
\typeout{
[\the\paperwidth]
[\the\dimexpr 1in +\oddsidemargin\relax]
[\the\dimexpr\paperwidth- 1in -\oddsidemargin-\textwidth\relax]
}
您的 MWE 您将获得
[614.295pt] [83.65108pt] [75.39984pt]
这表明,在美国信件上,左边距比右边距大约 8 个点
如果你添加a4paper
到文档选项,你会得到
[597.50787pt] [83.65108pt] [58.61272pt]
这表明 A4 的右边距减少了。
由于这些是您在序言中设置的明确长度的结果,因此除了设置不同的值之外,没有太多的建议可以提供。
geometry
帮助您进行更自然地取决于页面大小的设置。