3

I'd like to know how to change the separator between address and city in moderncv theme\moderncvtheme[blue]{casual} you can see in the figure further down. I know the bullets can be modified by \footersymbol but this does not affect the hyphens above. And so far I did not find a solution. I'd like to have the hyphens replaced by the bullets. Would anyone help, please.

enter image description here

\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}

Edit 1:

I modified the suggestion by Torbjørn T. which gives me the following result:

enter image description here

I replaced [~\textbullet~] by [\footersymbol] adapting the different spacing between the bullets in the first and the following lines. Simultaneously I was able to modify the bullets color globaly by \renewcommand*{\footersymbol}{{~~~{\rmfamily\textcolor{color1}{\textbullet}}~~~}}. As far it is exactly what I want, even a bit more ;). Thanks for your help :)

\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}

1 Answer 1

2

The dashes seem to be 'hardcoded' in the \makecvfooter macro. Below I copied the definition of that macro from moderncvstylecasual.sty and changed ~--~ to ~\textbullet~ in two places.

enter image description here

\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}
6
  • I just posted the same answer
    – touhami
    Feb 18, 2015 at 15:00
  • @touhami I see. What do you expect me to do about that? Feb 18, 2015 at 15:04
  • Nothing. It just anthor way to say sorry i didn't see your answer first
    – touhami
    Feb 18, 2015 at 15:15
  • @touhami Oh, no need to apologize. You could consider deleting your own answer though. (Up to you of course, but as you say your answer was basically the same as mine.) Feb 18, 2015 at 15:36
  • i will delete the answer
    – touhami
    Feb 18, 2015 at 15:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .