精彩简历:删除页面之间的空格或方框

精彩简历:删除页面之间的空格或方框

我正在使用 Awesome CV,我对其进行了足够的编辑,获得了令我满意的良好结果。唯一无法修复的是,每个部分都有一个“个人框”,用于写入条目。这导致文本在上一页实际填满之前进入下一页。以下是 2 个示例:

例 1

部分名称和条目之间的空格,以及

例 2

子部分和条目之间的空格。

有办法解决这个问题吗?这是 .cls 文件。谢谢。

\ProvidesClass{aw-cv}[2017/02/05 v1.6.1 Awesome Curriculum Vitae Class] \NeedsTeXFormat{LaTeX2e}

\DeclareOption{draft}{\setlength\overfullrule{5pt}}% Options for draft or final \DeclareOption{final}{\setlength\overfullrule{0pt}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}% Inherit options of article \ProcessOptions\relax \LoadClass{article}

\RequirePackage{array}% Needed to make fixed length table \RequirePackage{enumitem}% Needed to handle list environment \RequirePackage{ragged2e}% Needed to handle text alignment \RequirePackage{geometry}% Needed to configure page layout \RequirePackage{fancyhdr}% Needed to make header & footer efficiently \RequirePackage{xcolor}% Needed to manage colors \RequirePackage{ifxetex}% Needed to use \ifxetex-\else-\fi statement \RequirePackage{xifthen}% Needed to use \if-\then-\else statement \RequirePackage{etoolbox}% Needed to use a toolbox of programming tools \RequirePackage{setspace}% Needed to change line spacing in specific environment \RequirePackage[quiet]{fontspec}% Needed to manage fonts % \defaultfontfeatures{Ligatures=TeX}% To support LaTeX quoting style \RequirePackage{unicode-math}% Needed to manage math fonts \RequirePackage{fontawesome}% Needed to use icons from font-awesome \RequirePackage[default,opentype]{sourcesanspro} \RequirePackage[skins]{tcolorbox}% Needed for the photo ID \RequirePackage{parskip}% Needed to deal a paragraphs \RequirePackage[hidelinks,unicode]{hyperref}% Needed to deal hyperlink \hypersetup{pdftitle={}, pdfauthor={}, pdfsubject={}, pdfkeywords={}}

\newcommand*{\fontdir}[1][fonts/]{\def\@fontdir{#1}} \fontdir

%------------------------------------------------------------------------------- %                LAYOUT %------------------------------------------------------------------------------- \geometry{left=2cm, top=2cm, right=2cm, bottom=2cm, footskip=.5cm}

%% Header & Footer \fancyhfoffset{0em}% Set offset to each header and footer \renewcommand{\headrulewidth}{0pt}% Remove head rule \fancyhf{}% Clear all header & footer fields \pagestyle{fancy}% Enable if you want to make header or footer using fancyhdr

%------------------------------------------------------------------------------- %                COLORS %------------------------------------------------------------------------------- \definecolor{darktext}{HTML}{414141} \colorlet{text}{darkgray} \colorlet{graytext}{gray} \colorlet{lighttext}{lightgray} \definecolor{awesome-red}{HTML}{DC3522} \definecolor{blue}{HTML}{2932B2} \colorlet{awesome}{awesome-red} \colorlet{blue}{blue} \newbool{acvSectionColorHighlight} \setbool{acvSectionColorHighlight}{true} \def\@sectioncolor#1#2#3#4#5{\ifbool{acvSectionColorHighlight}{{\color{awesome}#1#2#3#4#5}}{#1#2#3#4#5}}

%------------------------------------------------------------------------------- %                FONTS %------------------------------------------------------------------------------- \setfontfamily\headerfont[Path=\@fontdir, UprightFont=*-Regular, ItalicFont=*-Italic, BoldFont=*-Bold, BoldItalicFont=*-BoldItalic,]{Roboto} \setfontfamily\headerfontlight[ Path=\@fontdir, UprightFont=*-Thin, ItalicFont=*-ThinItalic, BoldFont=*-Medium, BoldItalicFont=*-MediumItalic,]{Roboto} \newcommand*{\footerfont}{\sourcesanspro} \newcommand*{\bodyfont}{\sourcesanspro} \newcommand*{\bodyfontlight}{\sourcesansprolight}

%------------------------------------------------------------------------------- %                Configuration for styles %------------------------------------------------------------------------------- % LAYOUT \newcommand*{\headerfirstnamestyle}[1]{{\fontsize{32pt}{1em}\headerfontlight\color{graytext}
#1}} \newcommand*{\headerlastnamestyle}[1]{{\fontsize{32pt}{1em}\headerfont\bfseries\color{text}
#1}} \newcommand*{\headerpositionstyle}[1]{{\fontsize{7.6pt}{1em}\bodyfont\scshape\color{awesome}
#1}} \newcommand*{\headeraddressstyle}[1]{{\fontsize{8pt}{1em}\headerfont\itshape\color{graytext}
#1}} \newcommand*{\headersocialstyle}[1]{{\fontsize{7pt}{1em}\bodyfont\color{text}
#1}} \newcommand*{\headerquotestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\itshape\color{darktext}
#1}} \newcommand*{\footerstyle}[1]{{\fontsize{8pt}{1em}\footerfont\scshape\color{lighttext}
#1}} \newcommand*{\sectionstyle}[1]{{\fontsize{16pt}{1em}\bodyfont\bfseries\color{text}\@sectioncolor
#1}} \newcommand*{\subsectionstyle}[1]{{\fontsize{12pt}{1em}\bodyfont\scshape\textcolor{text}{#1}}} \newcommand*{\paragraphstyle}{\fontsize{9pt}{1em}\bodyfontlight\upshape\color{text}} % ENTRIES \newcommand*{\entrytitlestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\scshape\color{graytext}
#1}} \newcommand*{\entrypositionstyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext}
#1}} \newcommand*{\entrydatestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext}
#1}} \newcommand*{\entrylocationstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\slshape\color{awesome}
#1}} \newcommand*{\thesis}[1]{{\fontsize{8pt}{1em}\bodyfont\scshape\color{text}
#1}} \newcommand*{\entrysinglestyle}[1]{{\fontsize{8pt}{1em}\bodyfont\textit\color{text}
#1}} \newcommand*{\entryalbumstyle}[1]{{\fontsize{8pt}{1em}\bodyfont\textit\color{text}
#1}} % PROJECTS \newcommand*{\projecttitlestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\scshape\color{graytext}
#1}} \newcommand*{\projectpositionstyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext}
#1}} \newcommand*{\projectdatestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext}
#1}} % HONORS \newcommand*{\honortitlestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext}
#1}} \newcommand*{\honorpositionstyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext}
#1}} \newcommand*{\honordatestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext}
#1}} \newcommand*{\honorlocationstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\slshape\color{awesome}
#1}} % SKILLS \newcommand*{\skilltypestyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext}
#1}} \newcommand*{\skillsetstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\scshape\color{text}
#1}} %------------------------------------------------------------------------------- %                Commands for personal information %------------------------------------------------------------------------------- % Define photo ID % Usage: \photo[circle|rectangle,edge|noedge,left|right]{<path-to-image>} \newcommand{\photo}[2][circle,edge,left]{\def\@photo{#2}\@for\tmp:=#1\do{\ifthenelse{\equal{\tmp}{circle} \or \equal{\tmp}{rectangle}}
      {\let\@photoshape\tmp}{}\ifthenelse{\equal{\tmp}{edge} \or \equal{\tmp}{noedge}}
      {\let\@photoedge\tmp}{}\ifthenelse{\equal{\tmp}{left} \or \equal{\tmp}{right}}
      {\let\@photoalign\tmp}{}}} \def\@photoshape{circle} \def\@photoedge{edge} \def\@photoalign{left}

\newcommand*{\name}[2]{\def\@firstname{#1}\def\@lastname{#2}}   % Usage: \name{<firstname>}{<lastname>} \newcommand*{\firstname}[1]{\def\@firstname{#1}}                % Usage: \firstname{<firstname>} \newcommand*{\lastname}[1]{\def\@lastname{#1}}                  % Usage: \lastname{<lastname>} \newcommand*{\address}[1]{\def\@address{#1}} \newcommand*{\position}[1]{\def\@position{#1}} \newcommand*{\mobile}[1]{\def\@mobile{#1}} \newcommand*{\email}[1]{\def\@email{#1}} \newcommand*{\facebook}[1]{\def\@facebook{#1}} \newcommand*{\instagram}[1]{\def\@instagram{#1}} \newcommand*{\spotify}[1]{\def\@spotify{#1}} \newcommand*{\skype}[1]{\def\@skype{#1}}            % Usage: \skype{<skype account>} \newcommand*{\youtube}[1]{\def\@youtube{#1}}

%------------------------------------------------------------------------------- %                Commands for extra %------------------------------------------------------------------------------- %% Define helper macros a user can change easily % Header \newcommand{\acvHeaderNameDelim}{\space} \newcommand{\acvHeaderAfterNameSkip}{.4mm} \newcommand{\acvHeaderAfterPositionSkip}{.4mm} \newcommand{\acvHeaderAfterAddressSkip}{.4mm} \newcommand{\acvHeaderIconSep}{\space\space} \newcommand{\acvHeaderSocialSep}{\quad\textbar\quad} \newcommand{\acvHeaderAfterSocialSkip}{6mm} \newcommand{\acvHeaderAfterQuoteSkip}{5mm}

% Others \newcommand{\acvSectionTopSkip}{3mm} \newcommand{\acvSectionContentTopSkip}{2.5mm}


%------------------------------------------------------------------------------- %                Commands for utilities %------------------------------------------------------------------------------- % Use to align an element of tabular table \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}} \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}} \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

% Use to draw horizontal line with specific thickness \def\vhrulefill#1{\leavevmode\leaders\hrule\@height#1\hfill \kern\z@}

% Use to execute conditional statements by checking empty string \newcommand*{\ifempty}[3]{\ifthenelse{\isempty{#1}}{#2}{#3}}

%------------------------------------------------------------------------------- %                Commands for elements of CV structure %------------------------------------------------------------------------------- % Define a header for CV % Usage: \makecvheader \newcommand*{\makecvheader}[1][C]{\newcommand*{\drawphoto}{\ifthenelse{\isundefined{\@photo}}{}{\newlength{\photodim}
      \ifthenelse{\equal{\@photoshape}{circle}}
        {\setlength{\photodim}{1.3cm}}
        {\setlength{\photodim}{1.8cm}}
      \ifthenelse{\equal{\@photoedge}{edge}}
        {\def\@photoborder{darkgray}}
        {\def\@photoborder{none}}
      \begin{tikzpicture}
        \node[\@photoshape, draw=\@photoborder, line width=0.3mm, inner sep=\photodim, fill overzoom image=\@photo] () {};
      \end{tikzpicture}}}   \newlength{\headertextwidth}   \newlength{\headerphotowidth}   \ifthenelse{\isundefined{\@photo}}{
    \setlength{\headertextwidth}{\textwidth}
    \setlength{\headerphotowidth}{0cm}}
    {\setlength{\headertextwidth}{0.76\textwidth}
    \setlength{\headerphotowidth}{0.24\textwidth}}
       \begin{minipage}[c]{\headerphotowidth}
    \ifthenelse{\equal{\@photoalign}{left}}{\raggedright\drawphoto}{}   \end{minipage}   \begin{minipage}[c]{\headertextwidth}
    \ifthenelse{\equal{#1}{L}}{\raggedright}{\ifthenelse{\equal{#1}{R}}{\raggedleft}{\centering}}
    \headerfirstnamestyle{\@firstname}\headerlastnamestyle{{}\acvHeaderNameDelim\@lastname}%
    \\[\acvHeaderAfterNameSkip]%
    \ifthenelse{\isundefined{\@position}}{}{\headerpositionstyle{\@position\\[\acvHeaderAfterPositionSkip]}}%
    \ifthenelse{\isundefined{\@address}}{}{\headeraddressstyle{\@address\\[\acvHeaderAfterAddressSkip]}}%
    \headersocialstyle{%
      \newbool{isstart}%
      \setbool{isstart}{true}%
      \ifthenelse{\isundefined{\@mobile}}%
        {}%
        {\faWhatsapp\acvHeaderIconSep\@mobile\setbool{isstart}{false}}%
      \ifthenelse{\isundefined{\@email}}%
        {}%
        {\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
          \href{mailto:\@email}{\faEnvelopeO\acvHeaderIconSep\@email}%
        }%
      \ifthenelse{\isundefined{\@skype}}%
        {}%
        {\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
          \faSkype\acvHeaderIconSep\@skype}%        
        \ifthenelse{\isundefined{\@facebook}}%
        {}%
        {\ifbool{isstart}{\setbool{isstart}{false}}{\\}
          \href{facebook/\@facebook}{\faFacebookSquare\acvHeaderIconSep\@facebook}}%
        \ifthenelse{\isundefined{\@instagram}}%
        {}%
        {\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
          \href{instagram/\@instagram}{\faInstagram\acvHeaderIconSep\@instagram}}% \ifthenelse{\isundefined{\@youtube}}%
        {}%
        {\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
          \href{youtube/channel/}{\faYoutubePlay\acvHeaderIconSep\@youtube}}% \ifthenelse{\isundefined{\@spotify}}%
        {}%
        {\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
          \href{spotify/artist/}{\faSpotify\acvHeaderIconSep\@spotify}}% \ifthenelse{\isundefined{\@extrainfo}}%
        {}%
        {\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
          \@extrainfo}} 
          \\[\acvHeaderAfterSocialSkip]%   \end{minipage}%   \begin{minipage}[c]{\headerphotowidth}%
    \ifthenelse{\equal{\@photoalign}{right}}{\raggedleft\drawphoto}{}   \end{minipage}}

\newcommand*{\makecvfooter}[3]{\fancyfoot{}\fancyfoot[L]{\footerstyle{#1}}\fancyfoot[C]{\footerstyle{#2}}\fancyfoot[R]{\footerstyle{#3}}} \newcommand{\cvsection}[1]{\vspace{\acvSectionTopSkip}\sectionstyle{#1}\phantomsection \color{gray}\vhrulefill{0.9pt}} \newcommand{\cvsubsection}[1]{\vspace{\acvSectionContentTopSkip}\vspace{-3mm}\subsectionstyle{#1}\phantomsection} \newenvironment{cvparagraph}{\vspace{\acvSectionContentTopSkip}\vspace{-3mm}\paragraphstyle}{\par \vspace{2mm}}

\newenvironment{cventries}{\vspace{\acvSectionContentTopSkip}\vspace{-2mm}
    \begin{center}\setlength\tabcolsep{5pt}\setlength{\extrarowheight}{0pt}
    \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} R{2.2cm} L{\textwidth}}}
    {\end{tabular*}
    \end{center}} \newcommand*{\cventry}[4]{\entrydatestyle{#4} & \entrypositionstyle{#1} \\ & \entrytitlestyle{#2}, \entrylocationstyle{#3} \\} \newcommand*{\cventryb}[6]{\entrydatestyle{#5} & \entrypositionstyle{#1} \\ \entrydatestyle{#6} & \thesis{#2} \\ & \entrytitlestyle{#3}, \entrylocationstyle{#4} \\} \newcommand*{\cventryc}[8]{\entrydatestyle{#1} & \entrypositionstyle{#2} \\ \entrydatestyle{#3} & \thesis{#4} \\ \entrydatestyle{#5} & \thesis{#6} \\ & \entrytitlestyle{#7} \\} \newcommand*{\cventryd}[6]{\entrydatestyle{#1} & \entrypositionstyle{#2} \\ \entrydatestyle{#3} & \thesis{#4} \\ & \entrytitlestyle{#5} \\}


\newenvironment{cvprojects}{\vspace{\acvSectionContentTopSkip}   \vspace{-2mm}   \begin{center}
    \setlength\tabcolsep{5pt}
    \setlength{\extrarowheight}{0pt}
    \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} R{2.2cm} L{\textwidth}}}{%
    \end{tabular*}   \end{center}} \newcommand*{\cvproject}[3]{\projectdatestyle{#3} & \projectpositionstyle{#1} \\ & \projecttitlestyle{#2} \\}

\newenvironment{cvhonors}
    {\vspace{\acvSectionContentTopSkip}
    \vspace{-2mm}
    \begin{center}
    \setlength\tabcolsep{5pt}
    \setlength{\extrarowheight}{0pt}
    \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} R{2.2cm} L{\textwidth}}}
    {\end{tabular*}
    \end{center}} \newcommand*{\cvhonor}[4]{\honordatestyle{#4} & \honorpositionstyle{#1} \\ & \honortitlestyle{#2}, \honorlocationstyle{#3} \\}

\newenvironment{cvskills}
    {\vspace{\acvSectionContentTopSkip}
    \vspace{-2.0mm}
    \begin{center}
    \setlength\tabcolsep{1ex}
    \setlength{\extrarowheight}{9pt}
    \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} R{2.2cm} L{\textwidth * \real{0.9}}}}
    {\end{tabular*}
    \end{center}} \newcommand*{\cvskill}[2]{\skilltypestyle{#1} & \skillsetstyle{#2} \\}

相关内容