moderncv:주소와 도시 사이의 구분 기호를 변경하는 방법

moderncv:주소와 도시 사이의 구분 기호를 변경하는 방법

아래 그림에 보이는 moderncv테마 에서 주소와 도시 사이의 구분 기호를 변경하는 방법을 알고 싶습니다 . \moderncvtheme[blue]{casual}글머리 기호를 다음으로 수정할 수 있다는 것을 알고 있지만 \footersymbol위의 하이픈에는 영향을 미치지 않습니다. 그리고 지금까지 나는 해결책을 찾지 못했습니다. 하이픈을 글머리 기호로 바꾸고 싶습니다. 누구든지 도와주세요.

여기에 이미지 설명을 입력하세요

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

편집 1:

나는 Torbjørn T.의 제안을 수정하여 다음과 같은 결과를 얻었습니다.

여기에 이미지 설명을 입력하세요

첫 번째 줄과 다음 줄의 글머리 기호 사이의 다른 간격을 조정 [~\textbullet~]하여 교체했습니다 . [\footersymbol]동시에 \renewcommand*{\footersymbol}{{~~~{\rmfamily\textcolor{color1}{\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]}

\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

대시는 매크로에서 '하드코드'된 것 같습니다 \makecvfooter. 아래에서는 해당 매크로의 정의를 복사하여 두 곳에서 변경 moderncvstylecasual.sty했습니다 .~--~~\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}

관련 정보