moderncv 2.0:银行风格 - 左对齐标题

moderncv 2.0:银行风格 - 左对齐标题

我更喜欢现代银行风格的标题。基本上,我希望我的名字包含在简历标题中,在顶部居中显示(类似于银行风格)

但是所有其他信息都应该很好地左对齐,包括附加信息和社交标签(linkedin等)。我希望在右侧有一张大照片,并可以改变 x 位置和大小。

我找到了一些解决方案旧解决方案 旧解决方案2但它们不适用于更新的 moderncv。

编辑:

本质上它应该是这样的:

在此处输入图片描述

这是这里发布内容的变体解决方案1。但这只适用于旧版本的 moderncv。我希望简历的标题与银行风格一样,但居中。本质上,我想要的是银行风格的简历,但图片的位置要好。没有图片看起来不错。有图片看起来就很杂乱。

如果可能的话,我希望有这个选项!将附加信息块放在中间。那么它将是一个 3 列设计。这样我可能会误用这个文件来记录婚姻状况和其他内容,这只是欧洲的标准,类似于它的做法这里

此外,如果可以选择在邮政编码/城市和其余部分之间添加一行,或者不添加,那就更好了。

任何帮助,将不胜感激!

先感谢您

答案1

好吧,为了最终解决您的几个问题,需要重新创建banking类的样式头部,版本 2.1.0。moderncv

姓名和标题用居中线书写,然后我们需要一个表格环境来显示详细信息,其中包含一个表格minipage和一个用于图像的框。最后,如果需要,我们需要一条新的居中线来显示引文...

请参阅以下 MWE(重要的代码更改以 标记<=======

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{banking}
\moderncvcolor{blue}

\usepackage[scale=0.75]{geometry}
\usepackage{adjustbox}

\makeatletter
\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape}
\renewcommand*{\titlefont}{\LARGE\mdseries\slshape}
\renewcommand*{\addressfont}{\small\mdseries\slshape}
\renewcommand*{\quotefont}{\large\slshape}

% styles
\renewcommand*{\namestyle}[1]{{\namefont\textcolor{color0}{#1}}}
\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2}{#1}}}
\renewcommand*{\addressstyle}[1]{{\addressfont\textcolor{color1}{#1}}}
\renewcommand*{\quotestyle}[1]{{\quotefont\textcolor{color1}{#1}}}
%
\newlength{\makecvheadnamewidth}
\setlength{\makecvheadnamewidth}{0pt}% dummy value
\renewcommand*{\makecvtitle}{%
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputecvlengths%
  % optional detailed information box
  \newbox{\makecvtitledetailsbox}%
  \savebox{\makecvtitledetailsbox}{%
    \addressfont\color{color2}%
    \begin{tabular}[t]{@{}l@{}}%
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}\\[1.5em]}% if \addresstreet is defined, \addresscity will always be defined but could be empty
      \ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile}%
      \ifthenelse{\isundefined{\@phone}}{}{\makenewline\phonesymbol\@phone}%
      \ifthenelse{\isundefined{\@fax}}{}{\makenewline\faxsymbol\@fax}%
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
    \end{tabular}
  }%
  % optional photo (pre-rendering)
  \newbox{\makecvtitlepicturebox}%
  \savebox{\makecvtitlepicturebox}{%
    \ifthenelse{\isundefined{\@photo}}%
    {}%
    {%
      \hspace*{\separatorcolumnwidth}%
      \color{color1}%
      \setlength{\fboxrule}{\@photoframewidth}%
      \ifdim\@photoframewidth=0pt%
        \setlength{\fboxsep}{0pt}\fi%
      \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
  % name and title
  \newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%
  \newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
  \ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)
    {\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitlepicturewidth}}%
    {}%
  \begin{minipage}[b]{\textwidth}%
    \centering \namestyle{\@firstname\ \@familyname}% <=================
    \ifthenelse{\equal{\@title}{}}{}{\namestyle{~|~}\titlestyle{\@title}}\\[2.5em]% <================
    \begin{tabular}[t]{@{}l}
      \usebox{\makecvtitledetailsbox}%
    \end{tabular}
    \hfill
    \begin{adjustbox}{valign=T}
      \usebox{\makecvtitlepicturebox}%
    \end{adjustbox}
  \end{minipage}%
  \par\vspace{2.5em}
  % optional quote
  \ifthenelse{\isundefined{\@quote}}%
    {}%
    {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
  \par}%
\makeatother

% personal data
\name{John}{Doe}% <=====================================================
\title{Resume 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[94pt][0pt]{example-image-golden-upright} % <===================== 0pt for no rule around the image
\quote{`` A witty and playful quote''}

%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}
\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}

\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
  \begin{itemize}%
  \item Sub-achievement (a);
  \item Sub-achievement (b), with sub-sub-achievements (don't do this!);
    \begin{itemize}
    \item Sub-sub-achievement i;
    \item Sub-sub-achievement ii;
    \item Sub-sub-achievement iii;
    \end{itemize}
  \item Sub-achievement (c);
  \end{itemize}
\item Achievement 3.
\end{itemize}}
\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}
\end{document}

及其生成的 pdf

产生的简历

相关内容