我找到一份简历的截图,明显是该moderncv
课程的改编,casual
内容如下:
与正常设置的两个不同之处casual
在于,照片位于姓名和头衔下方,而不是左上角。此外,标题“履历”的位置也不同。虽然我设法将标题移到左侧,但我仍然不知道如何移动照片。
您能帮我将moderncv
类示例调整为如图所示的样子吗?提前谢谢您!(为了简单起见,我没有将 MWE 中的标题向左移动)
梅威瑟:
\documentclass[11pt,a4paper,roman]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\name{John}{Doe}
%\title{Curriculum Vitae} % Commented it out, as most important step would be photo
\photo[80pt][0.4pt]{foto.png}
% document
\begin{document}
\makecvtitle
\section{Personal Data}
\cvitem{Name}{John}
\cvitem{Surname}{Doe}
\cvitem{...}{...}
\end{document}
答案1
\documentclass[11pt,a4paper,roman]{moderncv}
% moderncv themes
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\name{John}{Doe}
\title{Curriculum Vitae}
\photo[80pt][0.4pt]{example-image-A}
%%%%%% The following passage moves 'Curriculum Vitae' from right to left:
\renewcommand*{\titlefont}{\LARGE\mdseries\upshape}
\makeatletter
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% ensure footer with personal information
\makecvfoot%
% optional picture
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\setlength\fboxrule{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
{\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}%
\hfill%\usebox{\makecvtitlepicturebox}%
% name
\@initializelength{\makecvtitlepicturewidth}%
\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
\raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\\ [-.35em]%
{\color{color2!50}\rule{\textwidth}{.25ex}}%
% optional title
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\titlestyle{\@title}}
\hfill\smash{\raisebox{\dimexpr-\ht\makecvtitlepicturebox+\baselineskip\relax}{%
\usebox{\makecvtitlepicturebox}}}\\[2.5em] % optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\null\hfill\begin{minipage} {\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%
\par}%
\makeatother
%%%%%%% End of passage
% document
\begin{document}
\makecvtitle
\section{Personal Data}
\cvitem{Name}{John}
\cvitem{Surname}{Doe}
\cvitem{...}{...}
\end{document}
我不确定您想要与您显示的图像进行多少字体匹配,但这里还有一些其他可能的更改:
获得
\documentclass[11pt,a4paper,roman]{moderncv}
% moderncv themes
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\name{John}{Doe}
\title{\textsf{\textit{Curriculum Vitae}}}
\photo[80pt][0.4pt]{example-image-A}
%%%%%% The following passage moves 'Curriculum Vitae' from right to left:
\renewcommand*{\titlefont}{\LARGE\mdseries\upshape}
\makeatletter
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% ensure footer with personal information
\makecvfoot%
% optional picture
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\setlength\fboxrule{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
{\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}%
\hfill%\usebox{\makecvtitlepicturebox}%
% name
\@initializelength{\makecvtitlepicturewidth}%
\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
\raggedleft\namefont{\color{color2!50}\textsf{\@firstname}} {%
\color{color2}\textsf{\@familyname}}}\\ [-.35em]%
{\color{color2!50}\rule{\textwidth}{.25ex}}%
% optional title
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\titlestyle{\@title}}
\hfill\smash{\raisebox{\dimexpr-\ht\makecvtitlepicturebox+\baselineskip\relax}{%
\usebox{\makecvtitlepicturebox}}}\\[0.5em] % optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\null\hfill\begin{minipage} {\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%
\par}%
\makeatother
%%%%%%% End of passage
% document
\begin{document}
\makecvtitle
\section{Personal Data}
\cvitem{Name}{John}
\cvitem{Surname}{Doe}
\cvitem{...}{...}
\end{document}