Ich würde gerne wissen, wie ich das Trennzeichen zwischen Adresse und Stadt im moderncv
Thema ändern \moderncvtheme[blue]{casual}
kann, das Sie in der Abbildung weiter unten sehen können. Ich weiß, dass die Aufzählungszeichen geändert werden können, \footersymbol
aber dies hat keine Auswirkungen auf die Bindestriche oben. Und bisher habe ich keine Lösung gefunden. Ich möchte die Bindestriche durch Aufzählungszeichen ersetzen lassen. Kann mir bitte jemand helfen?
\documentclass[12pt,a4paper,sans]{moderncv}
\moderncvtheme[blue]{casual}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\name{John}{Doe}
\title{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]}
\begin{document}
\maketitle
\section{test}
\end{document}
Bearbeitung 1:
Ich habe den Vorschlag von Torbjørn T. abgewandelt und erhalte folgendes Ergebnis:
Ich habe es ersetzt, [~\textbullet~]
indem [\footersymbol]
ich den unterschiedlichen Abstand zwischen den Aufzählungszeichen in der ersten und den folgenden Zeilen angepasst habe. Gleichzeitig konnte ich die Farbe der Aufzählungszeichen global ändern \renewcommand*{\footersymbol}{{~~~{\rmfamily\textcolor{color1}{\textbullet}}~~~}}
. Soweit ist es genau das, was ich will, sogar noch ein bisschen mehr ;). Danke für deine Hilfe :)
\documentclass[12pt,a4paper,sans]{moderncv}
\moderncvtheme[blue]{casual}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\name{John}{Doe}
\title{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]}
\renewcommand*{\footersymbol}{{~~~{\rmfamily\textcolor{color1}{\textbullet}}~~~}}
\makeatletter
\renewcommand*{\makecvfooter}{%
\setlength{\footerwidth}{0.8\textwidth}%
\fancypagestyle{plain}{%
\fancyfoot[c]{%
\parbox[b]{\footerwidth}{%
\centering%
\color{color2}\addressfont%
\vspace{\baselineskip}% forces a white line to ensure space between main text and footer (as footer height can't be known in advance)
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtofooter[]{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtofooter[\footersymbol]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtofooter[\footersymbol]{\@addresscountry}}%
\flushfooter\@firstfooterelementtrue\\}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofooter{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtofooter{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofooter{\@extrainfo}}%
\ifthenelse{\lengthtest{\footerboxwidth=0pt}}{}{\flushfooter}% the lengthtest is required to avoid flushing an empty footer, which could cause a blank line due to the \\ after the address, if no other personal info is used
}}}%
\pagestyle{plain}}
\makeatother
\begin{document}
\maketitle
\section{test}
\end{document}
Antwort1
Die Bindestriche scheinen im \makecvfooter
Makro „fest codiert“ zu sein. Unten habe ich die Definition dieses Makros kopiert moderncvstylecasual.sty
und an zwei Stellen ~--~
in geändert.~\textbullet~
\documentclass[12pt,a4paper,sans]{moderncv}
\moderncvtheme[blue]{casual}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\name{John}{Doe}
\title{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]}
\makeatletter
\renewcommand*{\makecvfooter}{%
\setlength{\footerwidth}{0.8\textwidth}%
\fancypagestyle{plain}{%
\fancyfoot[c]{%
\parbox[b]{\footerwidth}{%
\centering%
\color{color2}\addressfont%
\vspace{\baselineskip}% forces a white line to ensure space between main text and footer (as footer height can't be known in advance)
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtofooter[]{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtofooter[~\textbullet~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtofooter[~\textbullet~]{\@addresscountry}}%
\flushfooter\@firstfooterelementtrue\\}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofooter{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtofooter{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofooter{\@extrainfo}}%
\ifthenelse{\lengthtest{\footerboxwidth=0pt}}{}{\flushfooter}% the lengthtest is required to avoid flushing an empty footer, which could cause a blank line due to the \\ after the address, if no other personal info is used
}}}%
\pagestyle{plain}}
\makeatother
\begin{document}
\maketitle
\section{test}
\end{document}