当我使用 res.cls 边距选项时,如何获得信纸大小的纸张

当我使用 res.cls 边距选项时,如何获得信纸大小的纸张

这是我的代码的第一部分,抱歉,我是 TeX 的新手,但这真的很烦人,而且使用该geometry包也不起作用,也不起作用

\documentclass[margin, letterpaper]{res}
...
...
% LaTeX resume using res.cls
\documentclass[margin]{res}
%\usepackage{helvetica} % uses helvetica postscript font (download helvetica.sty)
%\usepackage{newcent}   % uses new century schoolbook postscript font 

\setlength{\textwidth}{5.2in} % set width of text portion
\usepackage{enumitem}
\addtolength{\textwidth}{.5in}
\addtolength{\textheight}{2in}
\addtolength{\leftmargin}{-.1in}
\begin{document}

% Center the name over the entire width of resume:
 \moveleft.5\hoffset\centerline{\large\bf Stephen Leone}

% address begins here
% Again, the address lines must be centered over entire width of resume:
\raggedright \hspace*{-\sectionwidth}{287 Warren Avenue}\hfill [email protected]\\
\raggedright \hspace*{-\sectionwidth} {Hawthorne, NY 10532}\hfill (914) 980-4235\\
\vspace{4mm}
% Draw a horizontal line the whole width of resume:
\moveleft\hoffset\vbox{\hrule width 505 pt height 1pt}\smallskip

\begin{resume}


\section{EDUCATION} {\sl Bachelor of Engineering} in Electrical Engineering, Expected Spring 2016\\ 

答案1

这就是我要做的,以使您的上述代码正常工作。我不确定您打算通过尺寸/边距实现什么目的,请根据需要进行编辑。

\documentclass{article}
\usepackage[letterpaper,top=3cm,bottom=3cm,left=2cm,right=2cm]{geometry}

\usepackage{helvet} % uses helvetica postscript font (download helvetica.sty)
\renewcommand{\familydefault}{\sfdefault}

\usepackage[parfill]{parskip}

\usepackage{titling}
\author{Stephen Leone}
\title{Resume}

\begin{document}
    \pagestyle{empty}
    \begin{center} \large\textbf{\theauthor} \end{center}

    \begin{minipage}{0.2\textwidth}287 Warren Avenue\\[email protected]\end{minipage}%
    \hspace{0.6\textwidth}
    \begin{minipage}{0.2\textwidth}Hawthorne, NY 10532\\(914) 980-4235\end{minipage}%
    \smallskip
    \hrule

\section*{EDUCATION} \textit{Bachelor of Engineering} in Electrical Engineering, Expected Spring 2016

\end{document}

答案2

我尝试尽可能简化。默认为我提供字母...请检查您前端的设置:

\documentclass[margin]{res}

\begin{document}

% Establish mywidth as width of entire resume (since res.cls co-opts textwidth!):
\newlength\mywidth
\setlength\mywidth\textwidth
\addtolength\mywidth{\sectionwidth}

% Center the name over the entire width of resume:
\moveleft0.5\hoffset\centerline{\Large Stephen Leone}

% Contact info centered over entire width of resume:
\raggedright \hspace*{-\sectionwidth}{287 Warren Avenue}\hfill [email protected]\\
\raggedright \hspace*{-\sectionwidth}{Hawthorne, NY 10532}\hfill (914) 980-4235

% Draw a horizontal line the whole width of resume:
\moveleft\hoffset\vbox{\hrule width \mywidth}

% Begin the resume environment:
\begin{resume}
\section{EDUCATION} {\sl Bachelor of Engineering} in Electrical Engineering, Expected Spring 2016.
\section{HOBBIES} {\sl Engineering} I do engineering in my free time as well!
\section{LOVES, LUSTS, \& ALLEGIANCES}  Just engineering.  Engineering, engineering, engineering.

\end{resume}
\end{document}

相关内容