将 CV 标题向上移动

将 CV 标题向上移动

我正在学习通过为 CV 制作类文件来创建自定义类文件。在下面的例子中,我尝试使用命令将 CV 标题(即姓名和联系人)向上移动\vspace{}。但只有联系人向上移动,姓名没有向上移动。我怎样才能将它们都向上移动?这里是cv.tex

\documentclass{my_cv} 
\begin{document}

    \name{\vspace{-2cm}John Smith}

    \contact{\vspace{-1cm}123 Broadway}{London}{UK 12345}{\faLinkedin {}{}  [email protected]}{(000)-111-1111}

    \section{Education}
    \datedsubsection{University of Nowhere}{2004-2008}

    \section{Work}
    \datedsubsection{ABC Limited}{2008-Now}
    \workitems
    {Developed new product}
    {Improved productivity by 20\%}
    {Decreased costs by \$10,000}

    \section{Skills}

    \begin{tabular}{l l l l}
        C\# & T-SQL & Javascript & HTML \\
        XML & JSON & SOAP & REST
    \end{tabular}

\end{document}

这是my_cv.cls

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{my_cv}[6/6/2013 custom CV class]
\LoadClass{article}
\RequirePackage{titlesec}
\RequirePackage{fontawesome}
\titleformat{\section}
{\Large\scshape\raggedright}
{}{0em}
{}
[\titlerule]

\titleformat{\subsection}
{\large\scshape\raggedright}
{}{0em}
{}

\newcommand{\datedsection}[2]{
    \section[#1]{#1 \hfill #2}
}
\newcommand{\datedsubsection}[2]{
    \subsection[#1]{#1 \hfill #2}
}

\newcommand{\name}[1]{
    \centerline{\Huge{#1}}
}

\newcommand{\contact}[5]{
    #1 {\large\textperiodcentered} #2 {\large\textperiodcentered} #3
    {\Large} #4 \ {\Large} #5
}

\newcommand{\longcontact}[5]{
    \center{#1 \hfill {\large\textperiodcentered} \hfill #2 \hfill {\large\textperiodcentered} \hfill #3}
    \center{ {\Large} #4 \hfill {\Large} #5}
}

\newcommand{\workitems}[3]{
    \begin{itemize}
        \item #1
        \item #2
        \item #3
    \end{itemize}
}

相关内容