四周留出 1 英寸的边距

四周留出 1 英寸的边距
  1. 大家好,我创建了一个帐户就是为了问这个问题,因为它真的很重要。我申请的几个地方都要求我的简历四周都有 1 英寸的边距。我使用在线找到的 LaTeX 模板来输入我的简历,因为我真的很喜欢它的外观。但是,在评论中的模板上,它说 %adjust 所有边距为 0.5,所以我认为这个模板的边距是 0.5 英寸。但是(非常重要)我需要所有边距都是 1 英寸。这是源代码(注意:此处简历中的信息只是随机信息):
  2. 现在遵循代码块:

    \documentclass[letterpaper,10pt]{article}
    %-----------------------------------------------------------
    \usepackage[empty]{fullpage}
    \usepackage{color}
    \definecolor{mygrey}{gray}{0.80}
    \raggedbottom
    \raggedright
    \setlength{\tabcolsep}{0in}
    
    % Adjust margins to 0.5in on all sides
    \addtolength{\oddsidemargin}{-0.5in}
    \addtolength{\evensidemargin}{-0.5in}
    \addtolength{\textwidth}{1.0in}
    \addtolength{\topmargin}{-0.5in}
    \addtolength{\textheight}{1.0in}
    
    %-----------------------------------------------------------
    %Custom commands
    \newcommand{\resitem}[1]{\item #1 \vspace{-2pt}}
    \newcommand{\resheading}[1]{{\large \colorbox{mygrey} 
    {\begin{minipage}{\textwidth}{\textbf{#1 \vphantom{p\^{E}}}}\end{minipage}}}}
    \newcommand{\ressubheading}[4]{
    \begin{tabular*}{7.0in}{l@{\extracolsep{\fill}}r}
    \textbf{#1} & \textit{#4} \\
    \end{tabular*}\vspace{-6pt}}
    
    \newcommand{\ressubheadinged}[4]{
    \begin{tabular*}{7.0in}{l@{\extracolsep{\fill}}r}
    \textbf{#1} & #2 \\
    \textit{#3} & \textit{#4}\\
    \end{tabular*}\vspace{-6pt}}
    %-----------------------------------------------------------
    \begin{document}
    
    \begin{tabular*}{7.5in}{l@{\extracolsep{\fill}}r}
    \textbf{\large Bob Mars}\\
    888.888.8888\\
    [email protected]
    \end{tabular*}
    \\
    
    \vspace{0.1in}
    
    \resheading{Education}
    \begin{itemize}
    \item
    \ressubheading{University}{}{}{September 2000 - June 2004}
    \begin{itemize}
    \item B.S., Engineering
    \end{itemize}
    \end{itemize}
    
    \resheading{Work Experience}
    
    \begin{itemize}
    \item
    \ressubheading{Company 1}{Seattle, WA}{Engineer}{Engineer, June 
    2016 - Present}
    \begin{itemize}
    \item Engineer for Company 1
    \item Did engineering work for Company 1.
    \item Investigated different things. Overall, a great experience 
    that I truly valued and enjoyed.  The projects I worked on were 
    my favorites.
    \end{itemize}
    \item
    \ressubheading{Company 2}{Seattle,WA}{Engineer}{June 2014- June 
    2015}
    \begin{itemize}
    \item Worked on various projects
    \item Used various programs. The programs I used were difficult 
    to learn at first but I soon adapted and things came more 
    naturally to me.
    \item Received high marks for all my work. My work was 
    collaborative and highly enjoyable.  The best experience of my 
    life.
    \item Worked for several years. A rigorous and difficult, but 
    pleasant experience. Overall, the best experience of my life. 
    Highly enjoyed.
    \item Employee of the month twice. Both were my highest-achieving 
    awards during the job. Truly enjoyed the entire experience.
    \end{itemize}
    \item
    \ressubheading{Company 3}{Seattle,WA}{Engineer}{Engineer, June 
    2012- June 2014}
    \begin{itemize}
    \item Engineer for Company 3 for over two years.  A rigorous but 
    pleasant experience.
    \item Worked on 3 projects.  All three projects were nuanced but 
    highly interesting in their own right.  A wonderful experience 
    that I truly enjoyed.
    \item Used various programs. The programs I used were difficult 
    to learn at first but I soon adapted and things came more 
    naturally to me.
    \item Discovered important relationships between various things.
    \item Worked for several years on various projects. A rigorous, 
    but pleasant experience. Overall, the best experience of my life.  
    \item Figured out things nicely.
    \item Promoted twice.
    \item won award.
    \end{itemize}
    
    \item
    \ressubheading{Company 4}{Seattle,WA}{Engineer}{Engineer, June 
    2010-June 2012}
    \begin{itemize}
    \item{Engineer for Company 4.}
    \item{Awarded best employee twice.}
    \item{Used various programs. Was a great experience, that I 
    valued greatly.  Company 4 is a great company to work for. I love 
    the projects that I worked on.}
    \item{Won awards for my work. Worked on various projects with 
    various people. Overall, a great experience that I truly valued 
    and appreciated. }
    \item{A pleasant experience.}
    \end{itemize}
    \end{itemize}
    
    \resheading{Volunteer}
    \begin{itemize}
    \item
    \ressubheading{Organization 1}{Seattle,WA}{Volunteer}{June 2016}
    \begin{itemize}
    \item{Recycled and helped the community in organization 1 on many 
    things. Was a great experience that I really enjoyed.  }
    \item{Worked for over two years in the same organization. We did 
    many things including beach cleanups, recycling events, various 
    events for the community.}
    \item{Set up various events for the community and played a huge 
    role in leading this organization. Had several leadership 
    positions}.
    \end{itemize}
    
    \item
    \ressubheading{Organization 2}{Seattle, WA}{Volunteer}{June 2015}
    \begin{itemize}
    \item{Worked for this organization for over 3 years. We cleaned 
    up trash in the community and hosted several events.}
    \item{A great experience.  Some of the best memories of my life 
    occurred while  volunteering for this organization.}
    \end{itemize}
    
    \end{itemize}
    
    
    \end{document}
    

3.文档目前的样子:在此处输入图片描述

4.我只需要将边距设置为 1 英寸,这样文档看起来就不会很奇怪。非常感谢!!

5.如果我尝试使用 \usepackage[margin=1in]{geometry}:,文档的外观将如下所示(几乎就像所有内容都左对齐): 在此处输入图片描述

6.有没有办法通过改变代码将边距设为 1 英寸:

   \addtolength{\oddsidemargin}{-0.5in}
   \addtolength{\evensidemargin}{-0.5in}
   \addtolength{\textwidth}{1.0in}
   \addtolength{\topmargin}{-0.5in}
   \addtolength{\textheight}{1.0in}
  1. 在此处输入图片描述

答案1

  1. 删除行

     \usepackage{fullpage}
    
  2. 删除所有修改边距的行(在问题中的 6. 中)。

  3. 添加线条

     \usepackage[margin=1in]{geometry}
     \pagestyle{empty}
    
  4. 全局替换7.0in\linewidth

  5. 替换\begin{minipage}{\textwidth}\begin{minipage}{\dimexpr\textwidth-2\fboxsep}(感谢 Max 发现这个问题。)

  6. 重新编译。

一些解释

fullpage包是一个相当老的包,用于将边距设置为 1 英寸或 1.5 英寸,以及一些与页面样式相关的其他设置。该选项[empty]将文档页面样式设置为empty(即无页码)。由于它geometry是一个更通用的包,因此使用它来代替它是有意义的。因此,我们必须添加一个显式\pagestyle命令来模拟该fullpage选项。

您复制的模板还对边距进行了手动更正,使边距达到 0.5 英寸,这fullpage在某种程度上违背了使用的目的。

然后,它将tabular文档中构造的值硬编码为文本的宽度,假设边距为 .5 英寸。通过更改此硬编码值,\linewidth您可以使 tabluar 独立于边距设置进行调整。

Max 的建议改变了另一个设置,以确保\resheading命令不会产生过满的框,即超出实际的文本宽度。

这是一个完整的例子:

\documentclass[letterpaper,10pt]{article}
%-----------------------------------------------------------
% Delete this line
%\usepackage[empty]{fullpage}

% Add these lines:
\usepackage[margin=1in]{geometry}
\pagestyle{empty}


\usepackage{color}
\definecolor{mygrey}{gray}{0.80}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}

% Delete these lines
% Adjust margins to 0.5in on all sides
%\addtolength{\oddsidemargin}{-0.5in}
%\addtolength{\evensidemargin}{-0.5in}
%\addtolength{\textwidth}{1.0in}
%\addtolength{\topmargin}{-0.5in}
%\addtolength{\textheight}{1.0in}

%-----------------------------------------------------------
%Custom commands
\newcommand{\resitem}[1]{\item #1 \vspace{-2pt}}
\newcommand{\resheading}[1]{{\large \colorbox{mygrey} 
{\begin{minipage}{\dimexpr\textwidth-2\fboxsep}{\textbf{#1 \vphantom{p\^{E}}}}\end{minipage}}}}
\newcommand{\ressubheading}[4]{
\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}
\textbf{#1} & \textit{#4} \\
\end{tabular*}\vspace{-6pt}}

\newcommand{\ressubheadinged}[4]{
\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{#3} & \textit{#4}\\
\end{tabular*}\vspace{-6pt}}
%-----------------------------------------------------------
\begin{document}

\begin{tabular*}{7.5in}{l@{\extracolsep{\fill}}r}
\textbf{\large Bob Mars}\\
888.888.8888\\
[email protected]
\end{tabular*}
\\

\vspace{0.1in}

\resheading{Education}
\begin{itemize}
\item
\ressubheading{University}{}{}{September 2000 - June 2004}
\begin{itemize}
\item B.S., Engineering
\end{itemize}
\end{itemize}

\resheading{Work Experience}

\begin{itemize}
\item
\ressubheading{Company 1}{Seattle, WA}{Engineer}{Engineer, June 
2016 - Present}
\begin{itemize}
\item Engineer for Company 1
\item Did engineering work for Company 1.
\item Investigated different things. Overall, a great experience 
that I truly valued and enjoyed.  The projects I worked on were 
my favorites.
\end{itemize}
\item
\ressubheading{Company 2}{Seattle,WA}{Engineer}{June 2014- June 
2015}
\begin{itemize}
\item Worked on various projects
\item Used various programs. The programs I used were difficult 
to learn at first but I soon adapted and things came more 
naturally to me.
\item Received high marks for all my work. My work was 
collaborative and highly enjoyable.  The best experience of my 
life.
\item Worked for several years. A rigorous and difficult, but 
pleasant experience. Overall, the best experience of my life. 
Highly enjoyed.
\item Employee of the month twice. Both were my highest-achieving 
awards during the job. Truly enjoyed the entire experience.
\end{itemize}
\item
\ressubheading{Company 3}{Seattle,WA}{Engineer}{Engineer, June 
2012- June 2014}
\begin{itemize}
\item Engineer for Company 3 for over two years.  A rigorous but 
pleasant experience.
\item Worked on 3 projects.  All three projects were nuanced but 
highly interesting in their own right.  A wonderful experience 
that I truly enjoyed.
\item Used various programs. The programs I used were difficult 
to learn at first but I soon adapted and things came more 
naturally to me.
\item Discovered important relationships between various things.
\item Worked for several years on various projects. A rigorous, 
but pleasant experience. Overall, the best experience of my life.  
\item Figured out things nicely.
\item Promoted twice.
\item won award.
\end{itemize}

\item
\ressubheading{Company 4}{Seattle,WA}{Engineer}{Engineer, June 
2010-June 2012}
\begin{itemize}
\item{Engineer for Company 4.}
\item{Awarded best employee twice.}
\item{Used various programs. Was a great experience, that I 
valued greatly.  Company 4 is a great company to work for. I love 
the projects that I worked on.}
\item{Won awards for my work. Worked on various projects with 
various people. Overall, a great experience that I truly valued 
and appreciated. }
\item{A pleasant experience.}
\end{itemize}
\end{itemize}

\resheading{Volunteer}
\begin{itemize}
\item
\ressubheading{Organization 1}{Seattle,WA}{Volunteer}{June 2016}
\begin{itemize}
\item{Recycled and helped the community in organization 1 on many 
things. Was a great experience that I really enjoyed.  }
\item{Worked for over two years in the same organization. We did 
many things including beach cleanups, recycling events, various 
events for the community.}
\item{Set up various events for the community and played a huge 
role in leading this organization. Had several leadership 
positions}.
\end{itemize}

\item
\ressubheading{Organization 2}{Seattle, WA}{Volunteer}{June 2015}
\begin{itemize}
\item{Worked for this organization for over 3 years. We cleaned 
up trash in the community and hosted several events.}
\item{A great experience.  Some of the best memories of my life 
occurred while  volunteering for this organization.}
\end{itemize}

\end{itemize}


\end{document}

代码输出

答案2

我修改了模板。它能产生你想要的结果吗?

\documentclass[letterpaper,10pt]{article}
%-----------------------------------------------------------
\usepackage[empty]{fullpage}
\usepackage{color}
\definecolor{mygrey}{gray}{0.80}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
\usepackage[margin = 1in]{geometry}

%-----------------------------------------------------------
%Custom commands
\newcommand{\resitem}[1]{\item #1 \vspace{-2pt}}
\newcommand{\resheading}[1]{{\large \colorbox{mygrey}
{\begin{minipage}{\dimexpr\linewidth-2\fboxsep}{\textbf{#1 \vphantom{p\^{E}}}}\end{minipage}}}}
\newcommand{\ressubheading}[4]{%
\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}
\textbf{#1} & \textit{#4} \\
\end{tabular*}\vspace{-6pt}}

\newcommand{\ressubheadinged}[4]{
\begin{tabular*}{l\linewidth}{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{#3} & \textit{#4}\\
\end{tabular*}\vspace{-6pt}}
%-----------------------------------------------------------
\begin{document}
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\textbf{\large Bob Mars}\\
888.888.8888\\
[email protected]
\end{tabular*}
\\

\vspace{0.1in}

\resheading{Education}
\begin{itemize}
\item
\ressubheading{University}{}{}{September 2000 - June 2004}
\begin{itemize}
\item B.S., Engineering
\end{itemize}
\end{itemize}

\resheading{Work Experience}

\begin{itemize}
\item
\ressubheading{Company 1}{Seattle, WA}{Engineer}{Engineer, June
2016 - Present}
\begin{itemize}
\item Engineer for Company 1
\item Did engineering work for Company 1.
\item Investigated different things. Overall, a great experience
that I truly valued and enjoyed. The projects I worked on were
my favorites.
\end{itemize}
\item
\ressubheading{Company 2}{Seattle,WA}{Engineer}{June 2014- June
2015}
\begin{itemize}
\item Worked on various projects
\item Used various programs. The programs I used were difficult
to learn at first but I soon adapted and things came more
naturally to me.
\item Received high marks for all my work. My work was
collaborative and highly enjoyable. The best experience of my
life.
\item Worked for several years. A rigorous and difficult, but
pleasant experience. Overall, the best experience of my life.
Highly enjoyed.
\item Employee of the month twice. Both were my highest-achieving
awards during the job. Truly enjoyed the entire experience.
\end{itemize}
\item
\ressubheading{Company 3}{Seattle,WA}{Engineer}{Engineer, June
2012- June 2014}
\begin{itemize}
\item Engineer for Company 3 for over two years. A rigorous but
pleasant experience.
\item Worked on 3 projects. All three projects were nuanced but
highly interesting in their own right. A wonderful experience
that I truly enjoyed.
\item Used various programs. The programs I used were difficult
to learn at first but I soon adapted and things came more
naturally to me.
\item Discovered important relationships between various things.
\item Worked for several years on various projects. A rigorous,
but pleasant experience. Overall, the best experience of my life.
\item Figured out things nicely.
\item Promoted twice.
\item won award.
\end{itemize}

\item
\ressubheading{Company 4}{Seattle,WA}{Engineer}{Engineer, June
2010-June 2012}
\begin{itemize}
\item{Engineer for Company 4.}
\item{Awarded best employee twice.}
\item{Used various programs. Was a great experience, that I
valued greatly. Company 4 is a great company to work for. I love
the projects that I worked on.}
\item{Won awards for my work. Worked on various projects with
various people. Overall, a great experience that I truly valued
and appreciated. }
\item{A pleasant experience.}
\end{itemize}
\end{itemize}

\resheading{Volunteer}
\begin{itemize}
\item
\ressubheading{Organization 1}{Seattle,WA}{Volunteer}{June 2016}
\begin{itemize}
\item{Recycled and helped the community in organization 1 on many
things. Was a great experience that I really enjoyed. }
\item{Worked for over two years in the same organization. We did
many things including beach cleanups, recycling events, various
events for the community.}
\item{Set up various events for the community and played a huge
role in leading this organization. Had several leadership
positions}.
\end{itemize}

\item
\ressubheading{Organization 2}{Seattle, WA}{Volunteer}{June 2015}
\begin{itemize}
\item{Worked for this organization for over 3 years. We cleaned
up trash in the community and hosted several events.}
\item{A great experience. Some of the best memories of my life
occurred while volunteering for this organization.}
\end{itemize}

\end{itemize}

\end{document} 

在此处输入图片描述

相关内容