Moderncv 類別 - \cvitem 從第二行縮排

Moderncv 類別 - \cvitem 從第二行縮排

Class moderncv, stylebanking的縮排\cvitem設定為:

Title: very long description that runs to the next line very long description 
that runs to the next line very long description that runs to the next line
very long description that runs to the next line

我希望第二行縮排一點,如下:

Title: very long description that runs to the next line very long description 
  that runs to the next line very long description that runs to the next line
  very long description that runs to the next line

我希望這是一個全域修改,而不必在每次新增新的\cvitem.

這是一個 MWE:

\documentclass[11pt, letterpaper, sans]{moderncv}
\moderncvstyle{banking}
\usepackage[scale=0.75]{geometry}
\name{first}{last}
\begin{document}
\makecvtitle
\section{Publications}
\cvitem{Title}{very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line}
\end{document}

答案1

您的一種可能性是縮排“非常長的描述...”以獲得

Title: very long description that runs to the next line very long description 
       that runs to the next line very long description that runs to the next 
       line very long description that runs to the next line

如果你想得到這個,請關注我的回答在這裡。這裡的優點是每個都\mycvitem縮排給定的長度Title:

如果您 - 正如您的問題所示 - 只想將整個段落縮排一小段,您可以使用以下解決方案:

\newcommand*{\mycvitem}[3][.25em]{%
  \begin{description}
    \item[\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }] #3
  \end{description}% 
  \par\addvspace{#1}}

然後你可以\mycvitem在你的履歷中使用指令來獲得你想要的東西,例如:

\documentclass[11pt, letterpaper, sans]{moderncv}

\moderncvstyle{banking}
\usepackage[scale=0.75]{geometry}
\name{first}{last}

\newcommand*{\mycvitem}[3][.25em]{%
  \begin{description}
    \item[\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }] #3
  \end{description}% 
  \par\addvspace{#1}}


\begin{document}
\makecvtitle
\section{Publications}
\cvitem{Title}{very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line}
\mycvitem{Title}{very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line}
\cvitem{Title}{very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line very long description that runs to the next line}
\end{document}

結果:

由此產生的履歷

相關內容