你好,我想移动上面的引文,使其与上面提供的信息保持一致,而不是作为单独的段落开始。我该怎么做?我使用moderncv
banking
样式。
\documentclass[11pt,a4paper,sans, dvipsnames]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[scale=0.80]{geometry}
\begin{picture}(0,0)
\put(0,-90){\includegraphics[scale=0.55]{images/CV_image.jpg}}
\end{picture}
\patchcmd{\makehead}
{\hfil}
{\hspace*{0.2\textwidth}}
{}
{}
\name{Filip}{xxx}
\title{CV}
\address{ xxxxxxx 00, 0000 xxxxx }{}{}
\quote{\small A data scientist with dedication for research and passion for its applications. }
\phone[mobile]{+41 1234567}
\email{[email protected]}
\begin{document}
\makecvhead
\end{document}
答案1
您需要修补\makehead
以添加如下引文:
\patchcmd{\makehead}
{\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}}
{\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}
\flushmakeheaddetails\par\ifthenelse{\isundefined{\@quote}}{}%
{{\begin{minipage}{0.4\textwidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
}
{}
{}
现在我们必须从命令中删除引文,\makecvhead
如下所示:
\renewcommand*{\makecvhead}{% TODO: use \@initializecommand, which requires modifying its definition to handle \par
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
\makehead%
}
通过以下 MWE 您将获得期望的结果:
\documentclass[11pt,a4paper,sans, dvipsnames]{moderncv}
\moderncvstyle{banking} % head 3 body 3
\moderncvcolor{blue}
\usepackage[scale=0.80]{geometry}
\patchcmd{\makehead}
{\hfil}
{\hspace*{0.2\textwidth}}
{}
{}
\makeatletter % <=======================================================
\patchcmd{\makehead}
{\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}}
{\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}
\flushmakeheaddetails\par\ifthenelse{\isundefined{\@quote}}{}%
{{\begin{minipage}{0.4\textwidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
}
{}
{}
\renewcommand*{\makecvhead}{% TODO: use \@initializecommand, which requires modifying its definition to handle \par
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
\makehead%
}
\makeatother % <========================================================
\name{Filip}{xxx}
\title{CV}
\address{ xxxxxxx 00, 0000 xxxxx }{}{}
\quote{\small A data scientist with dedication for research and passion for its applications. }
\phone[mobile]{+41 1234567}
\email{[email protected]}
\begin{document}
\begin{picture}(0,0)
\put(0,-90){\includegraphics[scale=0.55]{example-image}}
\end{picture}
\makecvhead
\end{document}
结果如下: