使用最后一个版本的TeXStudio(和moderncv),我无法识别用于在页脚上添加额外行的命令makecvfooter(error \ makecvfooter undefined。\ renewcommand * {\ makecvfooter})。我怎么解决?
我的代码:
\makeatletter
% defines one's skype (optional)
% usage: \skype{<email adress>}
\newcommand*{\skype}[1]{\def\@skype{#1}}
\renewcommand*{\makecvfooter}{%
\setlength{\footerwidth}{0.8\textwidth}%
\fancypagestyle{plain}{%
\fancyfoot[c]{%
\parbox[b]{\footerwidth}{%
\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{\@addressstreet}}{}{\addtofooter[]{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtofooter[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtofooter[~--~]{\@addresscountry}}%
\flushfooter\@firstfooterelementtrue\\}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofooter{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}%
\ifthenelse{\isundefined{\@skype}}{}{\addtofooter{\includegraphics[height=.7\baselineskip]{skype_gray}~\@skype}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtofooter{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofooter{\@extrainfo}}%
\ifthenelse{\lengthtest{\footerboxwidth=0pt}}{}{\flushfooter}% 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}
答案 0 :(得分:4)
这与TeXStudio无关。但是底层(La)TeX安装。即moderncv类。 在moderncv 2.0.0(2015-07-28发布)中,您的命令有一个新名称:
\renewcommand*{\makecvfoot}{%
}%
老了:
\renewcommand*{\makecvfooter}{%
}%
来源: https://answers.launchpad.net/moderncv/+question/275714 https://github.com/xdanaux/moderncv/blob/master/moderncvfooti.sty
答案 1 :(得分:1)
作为修复,我还需要改变:
\makeletterfooter
到
\makeletterfoot
和
\renewcommand*{\makeletterfooter}{%
到
\renewcommand*{\makeletterfoot}{%
在文件moderncv.cls和moderncvstylecasual.sty中,让事情再次发挥作用。