简历中的空间问题

简历中的空间问题

我在简历中将地址、作品集网站字段放在我的名字旁边。虽然我使用了 flushleft 命令来显示包含联系信息等的表格,但它们似乎并没有出现在简历中分配给各部分的边距之外。我在下面显示了一个 MWE,突出显示了相关方面。

突出显示此问题的输出屏幕截图可供快速参考。在此处输入图片描述

\documentclass[resmargin,line]{res}
    \usepackage{enumitem}


    \def \address{Auckland\\Portfolio : https://github.com/XYTE}
    \def \author{\textbf{{XTZ}}}
    \def \email{[email protected]}
    \def \phnum{222-914-3572}

    \usepackage{setspace}                                    % Allows for custom margins, etc.
    \usepackage{enumitem}
    \usepackage{textcomp}
    \usepackage{fullpage}                                    % Use the full page
    \usepackage[latin9]{inputenc}                            % Font definition and input type
    \usepackage[T1]{fontenc}                                 % Font output type 
    \usepackage{mmap}                                        % Allows glyphs (e.g. ff) to copy properly (ASCII)
    \usepackage{textcomp}                                    % Supports many symbols such as copyright
    \usepackage{color}                                       % Allow for colored text, etc.
    \usepackage[]{hyperref}                                  % Allow hyperlinks (internal and external)
    \hypersetup{                                             % Custom hyperlink settings
        pdffitwindow=false,                                  % Window fit to page when opened
        pdfstartview={XYZ null null 1.00},                   % Fits the zoom of the page to 100%
        pdfnewwindow=true,                                   % Links in new window
        colorlinks=true,                                     % false: boxed links; true: colored links
        linkcolor=black,                                     % Color of internal links (black is necessary for printing quality)
        citecolor=black,                                     % Color of links to bibliography
        urlcolor=black,                                      % Color of external links
        pdfauthor = {XYZW},
        pdfkeywords = {},
        pdftitle = {XYZW: Resume},
        pdfsubject = {Resume},
        pdfpagemode = UseNone}

    \reversemarginpar    
    \oddsidemargin -0.4in
    \evensidemargin -0.4in
    \textwidth=6.3in
    \itemsep=0in
    \parsep=0in
    % if using pdflatex:
    \setlength{\pdfpagewidth}{\paperwidth}
    \setlength{\pdfpageheight}{\paperheight}

        \addtolength{\topmargin}{-0.1in}
        \addtolength{\textheight}{0.6in} 



    \usepackage{datetime}                                    % Custom date format for date field
    \newdateformat{mydate}{\monthname[\THEMONTH] \THEYEAR}   % Defining month year date format

    \usepackage{mathtools}
    \usepackage{blindtext}
    \usepackage{setspace}
    \usepackage{fancyhdr}                                    % Used for custom page headers
    \pagestyle{fancy}
    \fancyhf{}
    \renewcommand{\headrulewidth}{0.5pt} 
    \rhead{\footnotesize \thepage} %header at the right
    \headsep = 0.5cm
    % FIRST PAGE ONLY (redefine the plain pagestyle)
    \fancypagestyle{plain}{
    \fancyhf{}
    \renewcommand{\headrulewidth}{0pt} 
    \headsep = 0.0cm
    \rhead{}
    }
    \usepackage[paper=letterpaper,
                marginparwidth=5mm,       % Length of section titles
                marginparsep=0.1mm,       % Space between titles and text
                margin=20mm,              % margins
                %includemp,
          noheadfoot,
          top=0.8in,left=0.5in,right=1.4in,bottom=0in,
          pdftex
                ]{geometry}
    \begin{document}
    \thispagestyle{plain} % to use first page footer
    \begin{tabular} {
      p{\textwidth/3-\marginparwidth+2mm}
      p{\textwidth/3-\marginparwidth+2mm}
      p{\textwidth/3-\marginparwidth+2mm}}
      \begin{flushleft}
        \address
      \end{flushleft}
      &
      \begin{center}
      \normalsize{\author}
      \end{center}
      &
      \begin{flushright}
        {\phnum}
          {\email}   
      \end{flushright}
    \end{tabular}
    \section{\sc Education}
    \begin{enumerate}[leftmargin=0.12cm, itemsep=2pt]
    \item[] \textbf{University of Auckland}\hfill {\textbf{May 2017}} \\
     Master of Science, Computer Science \hfill {\textbf{GPA : 3.81/4.0}}
     \end{enumerate}
    \end{document}

答案1

编辑:在SE上搜索类似问题后,我发现了很多,从中我了解到:

  • 软件包res不兼容geometry
  • \begin{resume}简历内容请附上\end{resume}
  • margin边距中的参数推送部分
  • \renewcommand\sectionfont{...}可以全局定义部分的字体属性

考虑到上述情况,经过一些调整,我成功获得:

在此处输入图片描述

新代码:

\documentclass[margin]{res}
    \def \address{Auckland\newline
                  Portfolio : https://github.com/XYTE}
    \def \author{\textbf{{XTZ}}}
    \def \email{[email protected]}
    \def \phnum{222-914-3572}

    \usepackage{enumitem}
    \usepackage[latin9]{inputenc}   % Font definition and input type
    \usepackage[T1]{fontenc}        % Font output type     
    \usepackage[]{hyperref}         % Allow hyperlinks (internal and external)
    \usepackage{datetime}           % Custom date format for date field
    \newdateformat{mydate}{\monthname[\THEMONTH] \THEYEAR}   

    \usepackage{fancyhdr}
    \pagestyle{fancy}
    \fancyhf{}
    \renewcommand{\headrulewidth}{0.5pt}
    \rhead{\footnotesize \thepage} %header at the right
    \headsep = 0.5cm
    % FIRST PAGE ONLY (redefine the plain pagestyle)
    \fancypagestyle{plain}{
        \fancyhf{}
        \renewcommand{\headrulewidth}{0pt}
        \headsep = 0.0cm
        \rhead{}
                            }
% new package                
    \usepackage{calc}                
    \usepackage{tabularx}
    \usepackage[strict]{changepage}
\renewcommand\sectionfont{\large\scshape}

    \begin{document}
    \thispagestyle{plain} % to use first page footer

\begin{adjustwidth}{-1.5in}{}
\noindent\begin{tabularx}{\textwidth+1.5in}{
        >{\raggedright\arraybackslash}X
        >{\centering\arraybackslash}X
        >{\raggedleft\arraybackslash}X}
\address    & \author   &   \phnum\quad\email   \\
    \end{tabularx}
\end{adjustwidth}

    \section{Education}
\begin{enumerate}[leftmargin=0.2in,topsep=-2pt,itemsep=2pt]
    \item[] \textbf{University of Auckland}\hfill \textbf{May 2017} \\
     Master of Science, Computer Science \hfill   \textbf{GPA : 3.81/4.0}
\end{enumerate}
    \end{document}

如您所见,我添加了三个包:calc、changepage andtabularx`。在它们的帮助下,我设法为表格及其在页面上的位置编写了一致的代码。

相关内容