子章节和项目列表的右对齐方式不同

子章节和项目列表的右对齐方式不同

我正在创建我的简历背页(复制模板)并列出要包含的长项目清单,并将日期对齐到右侧。

对于某些事项(例如我的资格),我使用 命令列出它们\subchap以突出它们。然后对于其他一些领域,我有一个\suchap标题(没有日期),但使用\item\hfill命令列出较少的项目。

\subchap不幸的是,和命令的日期\hfill不一致。 在此处输入图片描述

你能帮忙吗?

这是一个 MWE(我希望):

\documentclass[10pt]{article}
\usepackage[english]{babel}
\usepackage[backend=biber,style=nejm]{biblatex}
\renewcommand*{\revsdnamepunct}{}
\usepackage[hidelinks]{hyperref}
\hypersetup{      
    urlcolor=black,
}
\addbibresource{Mendeley_My_publications.bib}
\input{config/minimal-resume-config}

\begin{document}

% ------------------
% Personal (includes three rows: Name, Address, Contact)
% ------------------

\personal{
  % Name
   DR \, BOY\, NAME
  }{

  BSci, PhD
  }{

  M: {1234567}\hspace{\sizethree}E: [email protected]
}


% ------------------
% Chapter: Qualifications
% ------------------

\chap{QUALIFICATIONS}{

  \subchap{Fellow of The College}{2020}{
  }

  \subchap{PhD `Trials and tribulations', University of Somewhere}{2015}{
  }

% ------------------
% Chapter: Teaching experience
% ------------------

\chap{TEACHING \& SUPERVISION}{

  \subchap{Professional Teaching}{}{
    \begin{newitemize}
    \item Online College Learning Series contributor \hfill{2019-current}

    \item Big presentation-- Update,  Some location \hfill{ 2019}

    \item Another case contributor \hfill{2018}
   \end{newitemize}
  }

  \subchap{Postgraduate Teaching}{}{
    \begin{newitemize}
     \item  Lecturer (Level B-6), School of Learning, The University of Here\hfill{2019-current}



     \item Tutor for the Postgraduate Program, The University of Here\hfill{2010}
    \end{newitemize}
  }


\centering
End of document
\\
\resizebox{12mm}{\height}{$\large \sim$}\hspace{ -7.3mm }$\scriptstyle \not\,\not$ \hspace{5mm}


\end{document}

感谢 Mensch 的评论。我不确定如何最好地提供您要求的信息,但尝试将其包含在下面(如果我做得不好,请告诉我)。

minimal-resume-config包含以下代码


\usepackage{config/minimal-resume}

% custom command and packages

\input{config/custom-command}

minimal-resume.sty包含以下内容:


% margin
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}

% minimal custom packages
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage[babel=true]{microtype}
\usepackage[fontsize=10.75pt]{scrextend}
\usepackage{enumitem}

\defaultfontfeatures{Ligatures=TeX}

% font families
\newfontfamily{\montserratfont}[Path=fonts/,BoldFont=Montserrat-Bold]{Montserrat-Regular}
\newfontfamily{\crimsonfont}[Path=fonts/,ItalicFont=CrimsonText-Italic]{CrimsonText-Roman}

% main font for the document
\setmainfont[Path=fonts/, ItalicFont=CrimsonText-Italic]{CrimsonText-Roman}

% font sizes
\newcommand{\sizeone}{1.618em}
\newcommand{\sizetwo}{1.318em}
\newcommand{\sizethree}{1em}
\newcommand{\sizefour}{0.618em}
\newcommand{\sizefive}{0.382em}
\newcommand{\sizesix}{0.236em}

% line spaces
\newcommand{\linespaceone}{1}

\newenvironment{newitemize}
  {\itemize[nolistsep,topsep=\sizefive,itemsep=\sizefive,labelsep=\sizefour,leftmargin=*]}
  {\enditemize}

\newcommand{\personal}[3]{
  \begin{center}
    % name
    {
      \fontsize{\sizeone}{\sizeone}\fontspec[Path = fonts/,LetterSpace=15]{Montserrat-Regular}#1
    }\\
    % address
    \vspace{\sizethree}
    {
      \fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/,LetterSpace= 10]{Montserrat-Light}#2
    }\\
    % contact
    \vspace{\sizefive}
    {
      \fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{Montserrat-Light}#3
    }
  \end{center}
}

\newcommand{\chap}[2]{
  \vspace{\sizethree}
  \raggedright
  {\hrule height 0.5pt}
  \vspace{\sizefive}
  \begin{addmargin}[\sizefive]{\sizefive}{
  {
  \fontsize{\sizefour}{\sizefour}\fontspec[Path = fonts/,LetterSpace=10]{Montserrat-Bold}
  \textbf{#1}
  }
  \vspace{\sizefour}
  {#2}
  }
  \end{addmargin}
}

\newcommand{\subchap}[3]{
  \vspace{\sizefive}
  {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-Roman} #1} \hfill {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-Roman} #2}
  {#3}
  \vspace{\sizefive}
}

再次感谢您的帮助!

答案1

嗯,您使用的这个模板不是最好的。您考虑过使用其他模板吗?

然而,我发现这里有三个主要问题:

  1. 您需要将调用\subcap改为

    \subchap{Fellow of The College}{Feb}{%
    2020}% <==============================================================
    

    请注意,我将年份数字移到了第三个参数并添加Feb到第二个参数中......

  2. 您需要重新定义命令\subcap以摆脱一些虚假的空白,例如(请参阅标有的重要代码更改<======):

    \renewcommand{\subchap}[3]{% <========================================== \re
      \vspace{\sizefive}
      {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-Roman} #1} \hfill {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-Roman} #2}
      {#3}% <=============================================================== %
      \vspace{\sizefive}% <================================================= %
    }
    

    请参阅第一条评论:我曾经\renewcommand重新定义一个现有命令,请参阅第二条和第三条评论:添加%以摆脱空白......

  3. 我注释了该行,\resizebox因为该命令未在您的代码中定义...

请参阅完整的 MWE

\documentclass[10pt]{article}

\usepackage[english]{babel}
\usepackage[backend=biber,style=nejm]{biblatex}
\addbibresource{Mendeley_My_publications.bib}
\renewcommand*{\revsdnamepunct}{}

\usepackage{showframe} % <==============================================
\usepackage[hidelinks]{hyperref}
\hypersetup{      
    urlcolor=black,
}

%\input{config/minimal-resume-config}
\usepackage{config/minimal-resume}

\renewcommand{\subchap}[3]{% <==========================================
  \vspace{\sizefive}
  {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-Roman} #1} \hfill {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-Roman} #2}
  {#3}% <===============================================================
  \vspace{\sizefive}% <=================================================
}


\begin{document}

% ------------------
% Personal (includes three rows: Name, Address, Contact)
% ------------------

\personal{
  % Name
   DR \, BOY\, NAME
  }{

  BSci, PhD
  }{

  M: {1234567}\hspace{\sizethree}E: [email protected]
}


% ------------------
% Chapter: Qualifications
% ------------------

\chap{QUALIFICATIONS}{%

  \subchap{Fellow of The College}{Feb}{%
  2020}% <==============================================================

  \subchap{PhD `Trials and tribulations', University of Somewhere}{2015}{%
  }%
} % <===================================================================

% ------------------
% Chapter: Teaching experience
% ------------------

\chap{TEACHING \& SUPERVISION}{

  \subchap{Professional Teaching}{}{
    \begin{newitemize}
    \item Online College Learning Series contributor \hfill 2019-current

    \item Big presentation-- Update,  Some location \hfill 2019

    \item Another case contributor \hfill 2018
   \end{newitemize}
  }

  \subchap{Postgraduate Teaching}{}{
    \begin{newitemize}
     \item  Lecturer (Level B-6), School of Learning, The University of Here\hfill{2019-current}



     \item Tutor for the Postgraduate Program, The University of Here\hfill{2010}
    \end{newitemize}
  }
} % <===================================================================


\centering
End of document
\\
%\resizebox{12mm}{\height}{$\large \sim$}\hspace{ -7.3mm }$\scriptstyle \not\,\not$ \hspace{5mm}


\end{document}

及其结果:

在此处输入图片描述

相关内容