下の図で確認できるように、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
、2 か所で に~--~
変更しました。~\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}