From ce1251dbd6cdf8db925bad5a229c98b8dd5c699a Mon Sep 17 00:00:00 2001 From: LLdaniel Date: Mon, 8 Apr 2024 22:32:56 +0200 Subject: [PATCH] space control between list symbol and text feature (#74) --- moderncvbodyi.sty | 6 +++--- moderncvbodyiii.sty | 5 +++-- moderncvbodyiv.sty | 5 +++-- moderncvbodyv.sty | 5 +++-- template.tex | 9 +++++++++ 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/moderncvbodyi.sty b/moderncvbodyi.sty index 5099ad2..e71084b 100644 --- a/moderncvbodyi.sty +++ b/moderncvbodyi.sty @@ -19,7 +19,7 @@ % provides the commands for the skillmatrix as well as the command % \recompute@cvskillmatrix@lengths \RequirePackage[moderncvbodyi]{moderncvskillmatrix} - +\RequirePackage{xargs} %------------------------------------------------------------------------------- % overall body definition %------------------------------------------------------------------------------- @@ -97,8 +97,8 @@ \hspace*{\separatorcolumnwidth}% \begin{minipage}[t]{\doubleitemcolumnwidth}#5\end{minipage}}} -\renewcommand*{\cvlistitem}[2][.25em]{% - \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemcolumnwidth}#2\end{minipage}}} +\renewcommandx*{\cvlistitem}[3][1=.25em, usedefault, 2=0em]{% + \cvitem[#1]{}{\listitemsymbol\hspace{#2}\begin{minipage}[t]{\listitemcolumnwidth - #2}#3\end{minipage}}} \renewcommand*{\cvlistdoubleitem}[3][.25em]{% \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}% diff --git a/moderncvbodyiii.sty b/moderncvbodyiii.sty index 638bfd4..19e4051 100644 --- a/moderncvbodyiii.sty +++ b/moderncvbodyiii.sty @@ -40,6 +40,7 @@ % provides the commands for the skillmatrix as well as the command % \recompute@cvskillmatrix@lengths \RequirePackage[moderncvbodyiii]{moderncvskillmatrix} +\RequirePackage{xargs} %------------------------------------------------------------------------------- % overall body definition @@ -155,8 +156,8 @@ \begin{minipage}[t]{\doubleitemcolumnwidth}\ifstrempty{#4}{}{\hintstyle{#4}: }#5\end{minipage}% \par\addvspace{#1}} -\renewcommand*{\cvlistitem}[2][.25em]{% - \listitemsymbol\begin{minipage}[t]{\listitemcolumnwidth}#2\end{minipage}% +\renewcommandx*{\cvlistitem}[3][1=.25em, usedefault, 2=0em]{% + \listitemsymbol\hspace{#2}\begin{minipage}[t]{\listitemcolumnwidth - #2}#3\end{minipage}% \par\addvspace{#1}} \renewcommand*{\cvlistdoubleitem}[3][.25em]{% diff --git a/moderncvbodyiv.sty b/moderncvbodyiv.sty index 22d9ac7..ddf7509 100644 --- a/moderncvbodyiv.sty +++ b/moderncvbodyiv.sty @@ -19,6 +19,7 @@ % provides the commands for the skillmatrix as well as the command % \recompute@cvskillmatrix@lengths \RequirePackage[moderncvbodyiv]{moderncvskillmatrix} +\RequirePackage{xargs} %------------------------------------------------------------------------------- % overall body definition @@ -87,8 +88,8 @@ \begin{minipage}[t]{\doubleitemcolumnwidth}\ifthenelse{\equal{#4}{}}{}{\hintstyle{#4}: }#5\end{minipage}% \par\addvspace{#1}} -\renewcommand*{\cvlistitem}[2][.25em]{% - \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemcolumnwidth}#2\end{minipage}}} +\renewcommandx*{\cvlistitem}[3][1=.25em, usedefault, 2=0em]{% + \cvitem[#1]{}{\listitemsymbol\hspace{#2}\begin{minipage}[t]{\listitemcolumnwidth - #2}#3\end{minipage}}} \renewcommand*{\cvlistdoubleitem}[3][.25em]{% \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}% diff --git a/moderncvbodyv.sty b/moderncvbodyv.sty index 96be31e..56b7431 100644 --- a/moderncvbodyv.sty +++ b/moderncvbodyv.sty @@ -19,6 +19,7 @@ % provides the commands for the skillmatrix as well as the command % \recompute@cvskillmatrix@lengths \RequirePackage[moderncvbodyv]{moderncvskillmatrix} +\RequirePackage{xargs} %------------------------------------------------------------------------------- % overall style definition @@ -117,8 +118,8 @@ \hfill% fill of \separatorcolumnwidth \begin{minipage}[t]{\doubleitemcolumnwidth}\ifthenelse{\equal{#4}{}}{}{\hintstyle{#4}: }#5\end{minipage}}} -\renewcommand*{\cvlistitem}[2][.5ex]{% - \@cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemcolumnwidth}#2\end{minipage}}} +\renewcommandx*{\cvlistitem}[3][1=.5ex, usedefault, 2=0ex]{% + \@cvitem[#1]{}{\listitemsymbol\hspace{#2}\begin{minipage}[t]{\listitemcolumnwidth - #2}#3\end{minipage}}} \renewcommand*{\cvlistdoubleitem}[3][.5ex]{% \@cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}% diff --git a/template.tex b/template.tex index 22be6f0..9d4a5fa 100644 --- a/template.tex +++ b/template.tex @@ -218,6 +218,15 @@ Detailed achievements: \cvitem{hobby 3}{Description} \section{Extra 1} +%% Fine tuned examples due to two default parameters: +%% - full specification command: +%% cvlistitem[vertical spacing between list items][space after list symbol]{Item} +%% - single default command: \cvlistitem[0.75em]{Item} leads to +%% 0.75em vertical spacing and default +%% - single default command: \cvlistitem[][0.25em]{Item} leads to +%% default vertical spacing and 0.25em space after list symbol +%% - full default command: \cvlistitem{Item} leads to +%% default vertical spacing and default space after list symbol \cvlistitem{Item 1} \cvlistitem{Item 2} \cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}