我正在尝试格式化我的论文以供 ETD 提交。一个要求是左、右、底部和顶部边距都必须正好是 1 英寸。我已在 Latex 代码中指定了这一点,当它显示在屏幕上时,要求看起来是正确的,但是当我打印文档时,左/右侧边距不是 1 英寸边距(它稍微大一点)。顶部/底部边距正好是 1 英寸。我正在从 Adobe pdf 中按要求打印文档。我如何才能使边距按照代码中指定的格式打印出来?我已将纸张尺寸类型从 a4paper 更改为 letter,但这并没有改变任何东西。
在一些页面上,例如致谢/目录,我需要从顶部留出 2 英寸的边距,但我不知道如何指定,所以我使用“vspace”将文本向下推,所以我知道我的代码不是很好。感谢您的帮助。
\linespread{1.5}
\documentclass[a4paper,11pt]{article}
\usepackage{mathtools}
\usepackage{afterpage}
\usepackage{mathrsfs,amsmath}
\usepackage{csvsimple}
%\usepackage{adjustbox}
\usepackage{rotating}
\usepackage{qtree}
\usepackage{tikz}
\usepackage{booktabs,tabularx}
\usepackage{xltabular}
\usepackage[toc,page]{appendix}
\usepackage{lipsum}
\setlength{\parskip}{1em}
%Margin was changed here
\usepackage[a4paper, total={6.5in, 8in},margin=1in]{geometry}
\usepackage{pgfplots}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage{setspace}
\doublespacing
\apptocmd{\thebibliography}{\csname phantomsection\endcsname\addcontentsline{toc}{chapter}{\bibname}}{}{}
\addto\captionsenglish{% Replace "english" with the language you use
\renewcommand{\contentsname}%
{ \center \vspace{15mm} \normalsize TABLE OF CONTENTS}%
}
\makeatletter
\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}}
\makeatother
\pagenumbering{roman}
\begin{document}
\long\def\/*#1*/{}
\linespread{1.1}
\vspace{200mm}
\begin{center}
\textbf{ \hphantom{Thesis Title}}
\vspace{1.6cm}
\textbf{ Thesis on Weather Modeling }
\large
\vspace{2.1cm}
Jess Gradstudent
\vspace{1.2cm}
\end{center}
\singlespacing
A dissertation submitted to the faculty of the University of Nottingham in partial fulfillment of the requirements for the degree of Doctor of Philosophy in the Department of Mathematics.
\doublespacing
\begin{center}
\large
\vspace{2cm}
University of Nottingham
\vspace{-0.7cm}
2021
\vspace{2.4cm}
\setlength{\leftskip}{12.5cm}
Approved by: \\ \vspace{0.35cm}
Professor Johnson \\ \vspace{0.35cm}
Professor Smith \\ \vspace{0.35cm}
Professor Brown \\ \vspace{0.35cm}
Professor Jones \\ \vspace{0.35cm}
Professor Williams \\
\end{center}
\vspace{200mm}
\vspace{20cm}
\textbf{ \hphantom{Thesis Title}}
\begin{center}
\vspace{18.9 cm}
\singlespace
© 2021\\
Jess Gradstudent\\
ALL RIGHTS RESERVED
\end{center}
\vspace{200mm}
\vspace{200mm}
\begin{center}
\Large
\textbf{ \hphantom{Thesis Title}}
\vspace{1.9cm}
\normalsize
\textbf{ ABSTRACT }
\large
\vspace{0.3cm}
Jess Gradstudent: Thesis on Weather Modeling
(Under the direction of Professor Johnson)
\vspace{0.0cm}
\end{center}
\lipsum[2-10]
\vspace{200mm}
\vspace{200mm}
\begin{center}
\textbf{ \hphantom{Thesis Title}}
\vspace{1.8cm}
\textbf{ ACKNOWLEDGEMENTS }
\end{center}
\lipsum[1]
\vspace{200mm}
%\singlespacing
\tableofcontents
%\doublespacing
\vspace{200mm}
\begin{center}
\renewcommand{\listtablename}{\normalsize LIST OF TABLES}
\listoftables
\renewcommand{\listfigurename}{\normalsize LIST OF FIGURES}
\listoffigures
\end{center}
\vspace{200mm}
\section{ Introduction}
\pagenumbering{arabic}
\lipsum[2-10]
\section{Data}
\lipsum[2-10]
\section{Model}
\end{document}$
答案1
我记得您说过您选择了 Adobe 的打印适合选项?这就是问题所在,Adobe 无法识别 LaTeX 创建的边距,默认情况下它会缩小(自动缩放)打印页面以适合打印机可以使用的可用打印区域。
Adobe 默认采用此行为,因此用户必须在打印时禁用“缩小以适合”选项。
如果需要,您可以让 LaTeX 在 PDF 中包含命令来禁用自动缩放