ModernCV 将名称添加到页脚

ModernCV 将名称添加到页脚

我正在使用 ModernCV,网址为:https://ctan.org/pkg/moderncv?lang=en。我使用的是“休闲”设置,该设置将您的姓名放在简历的右上角,将您的信息放在页脚(电子邮件、linkedin、地址等)。

我如何将我的名字以粗体形式添加到页脚顶部?我有一张我希望它看起来的照片:

https://i.imgur.com/KMckdjV.png

目前的情况如下:

https://i.imgur.com/GU7Edms.png

(我稍后会添加 linkedin 部分)。我希望在 moderncv 格式中显示缺少的 firstname 和 lastname 部分。

答案1

将您的姓名添加到页脚需要更改页脚命令的内部定义:

\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman
\usepackage[utf8]{inputenc}

\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\makeatletter
% This code is from moderncvfooti.sty
\renewcommand*{\makecvfoot}{%
  \recomputecvfootlengths{}%
  \fancypagestyle{plain}{%
    \fancyfoot[c]{%
      \parbox[b]{\footwidth}{%
        \centering%
        \color{color2}\addressfont%
        \vspace{\baselineskip}% forces a white line to ensure space between main text and footer (as footer height can't be known in advance)
        \ifthenelse{\isundefined{\@lastname}}{}{\addtofoot[]{\bfseries\@firstname~\@lastname}% added name to footer
        \flushfoot\@firstfootelementtrue\\%
        \ifthenelse{\isundefined{\@addressstreet}}{}{\addtofoot[]{\addresssymbol\@addressstreet}%
          \ifthenelse{\equal{\@addresscity}{}}{}{\addtofoot[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
          \ifthenelse{\equal{\@addresscountry}{}}{}{\addtofoot[~--~]{\@addresscountry}}%
          \flushfoot\\}%
        \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
          \addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
        \ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
        \ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httpslink{\@homepage}}}%
        \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
          \addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
        \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}%
        \ifthenelse{\lengthtest{\footboxwidth=0pt}}{}{\flushfoot}% the lengthtest is required to avoid flushing an empty footer, which could cause a blank line due to the \\ after the address, if no other personal info is used
        }}}}%
  \pagestyle{plain}}
\makeatother

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{Lonnie} % Your first name
\familyname{Andersen} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{Curriculum Vitae}
\address{Gladsaxevej 78, st tv, 2860}{Søborg}
\mobile{+45 31444177}
\email{[email protected]}
\extrainfo{additional information}
%\photo[70pt][0.4pt]{pictures/Lonnie} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)
%\quote{"A witty and playful quotation" - John Smith}

%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle % Print the CV title

%----------------------------------------------------------------------------------------
%   EDUCATION SECTION
%----------------------------------------------------------------------------------------

\section{Education}

\cventry{2009--2013}{Ph.D student}{DTU Wind Energy}{}{Currently finishing thesis}{}
\cventry{2003--2009}{Cand. Scient in Biomedical engineering}{DTU}{}{\textit{GPA -- 8.4}}{}


\end{document}

修改页脚的图像

相关内容