帮助在信纸上使用 1 英寸边距和花式页眉(带有两行页眉)

帮助在信纸上使用 1 英寸边距和花式页眉(带有两行页眉)

我无法使用几何图形或手动布局在信纸上获得 1 英寸的边距,并且页眉为两行。除了将页眉设为一行之外,我还能做什么吗?

如果可能的话,我想使用几何包来更改边距,但是,使用几何包打印时它们总是大于一英寸,所以我只能手动操作它们。

%---------------------------------------------------------------------
%   PACKAGES AND DOCUMENT PREAMBLE
%---------------------------------------------------------------------
\documentclass[letterpaper, 12pt]{article}
%---------------------------------------------------------------------
%   SET MARGINS MAUNALLY %\usepackage[margin=1in]{geometry} %showframe
%---------------------------------------------------------------------
\addtolength{\oddsidemargin}{-.875in}
\addtolength{\evensidemargin}{-.875in}
\addtolength{\textwidth}{1.75in}
\addtolength{\topmargin}{-.875in}
\addtolength{\textheight}{1.75in}

%\usepackage{mathptmx}          % http://ctan.org/pkg/mathptmx (Similar to Times New Roman)
\usepackage{fontspec}           % Allows Custom Font (Needed for Times New Roman)
\setmainfont{Times New Roman}   % Set Times New Roman as Font
\usepackage{parskip}            % http://ctan.org/pkg/parskip
\usepackage{titlesec}
\usepackage{datetime2}

\newcommand{\showprivates}[1]{#1}                           % Shows Personal Information
%   \newcommand{\showprivates}[1]{Redacted for Web Publication} % Hides Personal Information

\usepackage{fancyhdr}
\fancyhf{}                                  % Clears the header and the footer
\fancyhead[R]{First M. Last \\ Page \thepage} % Top right header, name and page number
\fancyfoot[C]{\the\month-\the\day-\the\year} % Sets the footer in the center with the date
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt} % Removes Fancyhdr header line
\renewcommand{\footrulewidth}{0pt} % Removes Fancyhdr footer line

\title{First M Last CV}
\author{First Middle Last}

\titlespacing{\section}{0pt}{\parskip}{-\parskip}
\titlespacing{\subsection}{0pt}{\parskip}{-\parskip}
\titlespacing{\subsubsection}{0pt}{\parskip}{-\parskip}
\setlength{\headheight}{28pt} % Fixes Fancyhdr Warning (Caused by the two line footer)
%---------------------------------------------------------------------
%   HEADING: NAME, ADDRESS, EMAIL, PHONE, DOCUMENT TITLE
%---------------------------------------------------------------------
 \begin{document}\thispagestyle{empty} % removes header and footer on first page
\begin{center}
\Large\textbf{First Middle Last}

\normalsize \showprivates{123 Main Street} \hfill \showprivates{(800) 567-0000}\\
\normalsize \showprivates{City, State 12345} \hfill 
\showprivates{[email protected]}\\

\begin{center}
\textit{Curriculum Vitae}
\end{center}

\end{center}
%---------------------------------------------------------------------
%   EDUCATION
%---------------------------------------------------------------------
\section*\normalsize{\textbf{EDUCATION}}
\begin{flushleft}
X University, City, State\\
Ph.D. in X, Area of Specialization: X, Month 20XX\\
Dissertation: “Title: Subtitle”\\
GPA: 3.X

X University, City, State\\
MS in X, May 20XX\\
Thesis: “Title Goes Here”\\
GPA: 3.X

X University, City, State\\
B.S. in Neuroscience and Behavior, minor in Mathematics, May 20XX\\
Dual Honors, Thesis: “Title Goes Here”\\
GPA: 3.68
\end{flushleft}
%---------------------------------------------------------------------
%   ALL CONTENT SECTIONS
%--------------------------------------------------------------------

%---------------------------------------------------------------------
%   REFERENCES
%---------------------------------------------------------------------
\newpage
\section*\normalsize{\textbf{{REFERENCES}}
\begin{flushleft}
Mike Pence, Ph.D.\\
Associate Professor\\
Dept. of X and X\\
X University\\
Building, Room XXX\\
City, State ZIP \\
\showprivates{703-219-8307}\\
\showprivates{[email protected]}\\
\end{flushleft}

\begin{flushleft}
Jane Doe, Ph.D.\\
Associate Scientist\\ 
Department of X\\
X University\\
X Sciences, Room XXX\\
City, State ZIP\\
\showprivates{703-317-5289}\\
\showprivates{Jane [email protected]}\\
\end{flushleft}

\begin{flushleft}
Stacy Noll, Ph.D.\\
Assistant Program Director\\
Office of X and Y\\
Building, Room XXX\\
X University\\
City, State ZIP\\
\showprivates{703-219-3334}\\
\showprivates{[email protected]}\\
\end{flushleft}

\begin{flushleft}
Michael Edward Moore, Ph.D.\\
Research Scientist\\
The Center for X and Z\\
X Sciences, Room XXX\\
X University\\
City, State ZIP\\
\showprivates{703-218-1299}\\
\showprivates{[email protected]}\\
\end{flushleft}

%---------------------------------------------------------------------
%   FIN
%---------------------------------------------------------------------
\end{document}

答案1

正如我在上面的评论中指出的那样,以下设置按预期工作:

\documentclass[12pt]{article}
%---------------------------------------------------------------------
%   SET MARGINS MAUNALLY %
\usepackage[letterpaper,
            margin=1in,
            headheight=28pt,
            showframe
            ]{geometry}
%---------------------------------------------------------------------

%\usepackage{mathptmx}          % http://ctan.org/pkg/mathptmx (Similar to Times New Roman)
\usepackage{fontspec}           % Allows Custom Font (Needed for Times New Roman)
\setmainfont{Times New Roman}   % Set Times New Roman as Font
\usepackage{parskip}            % http://ctan.org/pkg/parskip
\usepackage{titlesec}
\usepackage{datetime2}

\newcommand{\showprivates}[1]{#1}                           % Shows Personal Information
%   \newcommand{\showprivates}[1]{Redacted for Web Publication} % Hides Personal Information

\usepackage{fancyhdr}
\fancyhf{}                                  % Clears the header and the footer
\fancyhead[R]{First M. Last \\ Page \thepage} % Top right header, name and page number
\fancyfoot[C]{\the\month-\the\day-\the\year} % Sets the footer in the center with the date
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt} % Removes Fancyhdr header line
\renewcommand{\footrulewidth}{0pt} % Removes Fancyhdr footer line

\title{First M Last CV}
\author{First Middle Last}

\titlespacing{\section}{0pt}{\parskip}{-\parskip}
\titlespacing{\subsection}{0pt}{\parskip}{-\parskip}
\titlespacing{\subsubsection}{0pt}{\parskip}{-\parskip}
%---------------------------------------------------------------------
%   HEADING: NAME, ADDRESS, EMAIL, PHONE, DOCUMENT TITLE
%---------------------------------------------------------------------
 \begin{document}
...

您可以看到,所有手动页面布局设置都已被删除,并且仅使用geometry包来确定您的页面布局。

编辑: 如果打印的文档边距增加,则这是由于 pdf 查看器中打印机的设置所致。例如,在 Adob​​e Reader 中,在“页面大小和处理”选项中选择“适合”(100% 缩放)。

相关内容