
테마 는 마음에 드는데 moderncv
casual
, 사진 순서와 이름/제목을 변경하고 싶습니다.
이 질문에 설명된 솔루션을 시도했습니다.
! Undefined control sequence.
\maketitle ->{{\firstnamestyle
{\@firstname}~\familynamestyle {\@familyname}...
l.33 \maketitle
예제 코드:
\documentclass[11pt,a4paper]{moderncv}
% moderncv themes
\moderncvtheme[blue]{casual}
\AtBeginDocument
{
% reverse the name and photo
\makeatletter
% maketitle
\renewcommand*{\maketitle}{%
{%
{\firstnamestyle{\@firstname}~\familynamestyle{\@familyname}}}%
\hfill%
\ifthenelse{\isundefined{\@photo}}%
{}%
{{\color{firstnamecolor}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}\\[-.35em]}%
{\color{firstnamecolor}\rule{\textwidth}{.25ex}\\[2.5em]}%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
\par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle
\makeatother
}
\firstname{John}
\familyname{Doe}
\title{Curriculum Vitae}
\address{Example Street}{12345 Exampe Town}
\photo{picture}
\begin{document}
\maketitle
\end{document}
답변1
moderncv
해당 클래스가 변경된 문제를 해결하는 한 가지 방법 은 다음 MWE일 수 있습니다. 이후 부분은 \AtBeginDocument
에서 원래 정의를 다시 작성합니다 moderncv
.
명심하세요: 클래스가 moderncv
다시 변경되면 수정사항을 다시 변경해야 할 수도 있습니다. 아마도 의 작성자에게 moderncv
이름과 그림의 위치를 변경할 수 있는 옵션을 통합해 달라고 요청하는 것이 좋을 것입니다 .
변경된 MWE:
\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\firstname{John}
\familyname{Doe}
\title{Resumé title}
\address{street and number}{postcode city}
\mobile{+1~(234)~567~890}
\phone{+2~(345)~678~901}
\fax{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\extrainfo{additional information}
\photo[64pt][0.4pt]{picture}
\quote{Some quote}
\makeatletter
%\AtBeginDocument
%{
% reverse the name and photo
\renewcommand*{\makecvtitle}{%
\recomputecvlengths%
\makecvfooter%
% define optional picture
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{
\@initializelength{\makecvtitlepicturewidth}% Damit Länge bekannt bei Name
\settowidth{\makecvtitlepicturewidth}{0pt}%
}%
{%
\setlength\fboxrule{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
{\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}
\@initializelength{\makecvtitlepicturewidth}% Damit Länge bekannt bei Name
\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
}%
% end define optional picture
% name
% \parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
{ \raggedright\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}%\lastname -> error
\hfill\usebox{\makecvtitlepicturebox}%
% \parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
% \raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@lastname}}%\familyname
\\[-.35em]%
{\color{color2!50}\rule{\textwidth}{.25ex}}%
% optional title
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\hfill\titlestyle{\@title}}\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\null\hfill\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%
\par}%
%}% AtBeginDocument ende
\makeatother
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{ \textit{Grade} }{Description} % arguments 3 to 6 can be left empty
\cvitem{title}{ \emph{Title} }
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvdoubleitem{category X}{XXX, YYY, ZZZ}{category Y}{XXX, YYY, ZZZ}
\cvlistitem{Item 1}
\cvlistdoubleitem{Item 2}{Item 3}
\end{document}
결과는 다음과 같습니다.
2.0.0 으로 업데이트 moderncv
:
위에서 이미 언급했듯이 클래스가 moderncv
변경되었으므로 클래스 버전을 사용하는 다음 코드가 필요합니다 2.0.0
.
현재 버전에서는 이 질문에서 원하는 대로 이름을 왼쪽에 인쇄하고 이미지를 CV 제목에 오른쪽으로 가져오는 추가 옵션을 사용하여 moderncv 2015/07/28 v2.0.0 modern curriculum vitae and letter document class
스타일을 정의할 수 있습니다 .casual
[left]
linkedin
전화번호 등을 정의하고 또는 github
... 과 같은 새로운 정보를 추가하는 데 사용할 수 있는 새로운 명령이 있는지 확인하세요.
다음 MWE(로 표시된 새 코드 <======
)를 참조하세요.
\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle[left]{casual} % <========================================
\moderncvcolor{blue}
\name{John}{Doe} % <====================================================
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890} % <====================================
\phone[fixed]{+2~(345)~678~901} % <=====================================
\phone[fax]{+3~(456)~789~012} % <=======================================
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe} % <=========================================
\social[twitter]{jdoe} % <==============================================
\social[github]{jdoe} % <===============================================
\extrainfo{additional information}
\photo[64pt][0.4pt]{picture}
\quote{Some quote}
\setlength{\footskip}{84pt} % <=========================================
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{ \textit{Grade} }{Description} % arguments 3 to 6 can be left empty
\cvitem{title}{ \emph{Title} }
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvdoubleitem{category X}{XXX, YYY, ZZZ}{category Y}{XXX, YYY, ZZZ}
\cvlistitem{Item 1}
\cvlistdoubleitem{Item 2}{Item 3}
\end{document}
\setlength{\footskip}{84pt}
바닥글에 더 많은 개인 정보를 추가했기 때문에 해당 줄만 필요하다는 점을 참고하시기 바랍니다 . CV의 경우 이 줄을 추가하지 말고 *.log
경고 파일을 컴파일하고 확인하십시오. footskip is too small.
CV에 대한 해당 경고에 제공된 반올림 값을 사용하십시오.
답변2
moderncv의 업데이트된 버전에서는 이 기능이 더 이상 사용되지 않습니다. 이를 변경하기 위한 옵션이 패키지에 포함되어 있습니다. \moderncvstyle을 로드할 때 다음과 같이 [왼쪽] 옵션을 포함하세요.
\moderncvstyle[left]{casual}