
Als ich meinen Lebenslauf in das moderncv
Paket schrieb, war ich hin- und hergerissen zwischenklassischStil für den Hauptteil undBankwesenStil für die Überschrift/den Titel. Ich bin nicht sicher, wie ich die beiden Formate zusammenführen soll. Außerdem möchte ich der Überschrift im Banking-Stil ein zusätzliches Element für LinkedIn hinzufügen.
Beim Durchsehen anderer Fragen habe ich Empfehlungen zum Hinzufügen eines MWE gesehen, bin mir aber auch nicht sicher, wie das geht, da ich noch relativ neu in der Verwendung von LaTeX bin. Ich kann es hinzufügen, wenn mir jemand den richtigen Weg weist.
Jede Hilfe wird geschätzt.
Antwort1
moderncvstylebanking.sty
Sie können die Teile, die für die Formatierung des Titels zuständig sind, übernehmen und sie .tex
mit dem casual
Stil in Ihrer Datei verwenden. Um Ihre LinkedIn-Informationen hinzuzufügen, können Sie Folgendes verwenden \social[linkedin]{john.doe}
:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\makeatletter
% commands from moderncvstylebanking.sty to have the title
% from that style
\newcommand*{\maketitlesymbol}{%
{~~~{\rmfamily\textbullet}~~~}}% the \rmfamily is required to force Latin Modern fonts when using sans serif, as OMS/lmss/m/n is not defined and gets substituted by OMS/cmsy/m/n
% internal command to add an element to the footer
% it collects the elements in a temporary box, and checks when to flush the box
\newsavebox{\maketitlebox}%
\newsavebox{\maketitletempbox}%
\newlength{\maketitlewidth}%
\newlength{\maketitleboxwidth}%
\newif\if@firstmaketitleelement\@firstmaketitleelementtrue%
% adds an element to the maketitle, separated by maketitlesymbol
% usage: \addtomaketitle[maketitlesymbol]{element}
\newcommand*{\addtomaketitle}[2][\maketitlesymbol]{%
\if@firstmaketitleelement%
\savebox{\maketitletempbox}{\usebox{\maketitlebox}#2}%
\else%
\savebox{\maketitletempbox}{\usebox{\maketitlebox}#1#2}\fi%
\settowidth{\maketitleboxwidth}{\usebox{\maketitletempbox}}%
\ifnum\maketitleboxwidth<\maketitlewidth%
\savebox{\maketitlebox}{\usebox{\maketitletempbox}}%
\@firstmaketitleelementfalse%
\else%
\flushmaketitle{}\\%
\savebox{\maketitlebox}{#2}%
\savebox{\maketitletempbox}{#2}%
\settowidth{\maketitleboxwidth}{\usebox{\maketitlebox}}%
\@firstmaketitleelementfalse\fi}
% internal command to flush the maketitle
\newcommand*{\flushmaketitle}{%
\strut\usebox{\maketitlebox}%
\savebox{\maketitlebox}{}%
\savebox{\maketitletempbox}{}%
\setlength{\maketitleboxwidth}{0pt}}
\renewcommand*{\maketitle}{%
\setlength{\maketitlewidth}{0.8\textwidth}%
\hfil%
\parbox{\maketitlewidth}{%
\centering%
% name and title
\namestyle{\@firstname~\@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title)
% detailed information
\addressfont\color{color2}%
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtomaketitle{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtomaketitle[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtomaketitle[~--~]{\@addresscountry}}%
\flushmaketitle\@firstmaketitleelementtrue\\}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomaketitle{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomaketitle{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtomaketitle{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomaketitle{\@extrainfo}}%
\flushmaketitle}\\[2.5em]}% need to force a \par after this to avoid weird spacing bug at the first section if no blank line is left after \maketitle
\renewcommand*{\namefont}{\Huge\bfseries\upshape}
\renewcommand*{\titlefont}{\Huge\mdseries\upshape}
\renewcommand*{\addressfont}{\normalsize\mdseries\upshape}
\renewcommand*{\quotefont}{\large\slshape}
% styles
\renewcommand*{\namestyle}[1]{{\namefont\textcolor{color1}{#1}}}
\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2!85}{#1}}}
\renewcommand*{\addressstyle}[1]{{\addressfont\textcolor{color1}{#1}}}
\renewcommand*{\quotestyle}[1]{{\quotefont\textcolor{color1}{#1}}}
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
\maketitle%
% 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
% personal data
\name{John}{Doe}
\title{The 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}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\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}
\end{document}
Die Ausgabe: