[cvlistitem] Space control between list symbol and text feature (#74) (#182)

* space control between list symbol and text feature (#74)

* space control feature realized with option 2 (option 1 reverted)
This commit is contained in:
daniel 2024-05-10 21:28:17 +02:00 committed by GitHub
commit 9687f709b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 22 additions and 15 deletions

View file

@ -24,6 +24,7 @@ version 2.?.? (29 Jun 2023)
This requires the \moderncvcolor to be issued BEFORE \moderncvstyle.
- all styles: make the head options 'details' and 'nodetails' available to the user. (previously they were hidden). Oldstyle does not respond too well to nodetails.
- casual style: make the head options 'alternate', 'details' and 'nodetails' available to the user. (previously they were hidden).
- Setting \listitemsymbolspace allows custom spacing between list symbol and text item (for \cvlistitem and \cvlistdoubleitem).
version 2.3.1 (21 Feb 2022)
- Fix duplicate GitLab icon (#105).

View file

@ -49,6 +49,7 @@
\@initializelength{\listitemcolumnwidth}
% used by \cvlistdoubleitem
\@initializelength{\listdoubleitemcolumnwidth}
\@initializelength{\listitemsymbolspace} \settowidth{\listitemsymbolspace}{0pt}
% default moderncv \photo (change the definition such that by default the photo and its box align with the section bars
\RenewDocumentCommand{\photo}{O{\hintscolumnwidth-0.8pt-2\fboxsep}O{0.4pt}m}{\def\@photowidth{#1}\def\@photoframewidth{#2}\def\@photo{#3}}%
@ -98,14 +99,14 @@
\begin{minipage}[t]{\doubleitemcolumnwidth}#5\end{minipage}}}
\renewcommand*{\cvlistitem}[2][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemcolumnwidth}#2\end{minipage}}}
\cvitem[#1]{}{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}}}
\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}%
\cvitem[#1]{}{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\ifthenelse{\equal{#3}{}}%
{}%
{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#3\end{minipage}}}}
{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#3\end{minipage}}}}
\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{#2}{%

View file

@ -88,6 +88,7 @@
\@initializelength{\listitemcolumnwidth}
% used by \cvlistdoubleitem
\@initializelength{\listdoubleitemcolumnwidth}
\@initializelength{\listitemsymbolspace} \settowidth{\listitemsymbolspace}{0pt}
% commands
\renewcommand*{\recomputecvbodylengths}{%
@ -156,15 +157,15 @@
\par\addvspace{#1}}
\renewcommand*{\cvlistitem}[2][.25em]{%
\listitemsymbol\begin{minipage}[t]{\listitemcolumnwidth}#2\end{minipage}%
\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}%
\par\addvspace{#1}}
\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}%
\cvitem[#1]{}{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\ifstrempty{#3}%
{}%
{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#3\end{minipage}}}}
{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#3\end{minipage}}}}
\renewcommand*{\cventry}[7][.25em]{
\begin{tabular*}{\maincolumnwidth}{l@{\extracolsep{\fill}}r}%

View file

@ -49,6 +49,7 @@
\@initializelength{\listitemcolumnwidth}
% used by \cvlistdoubleitem
\@initializelength{\listdoubleitemcolumnwidth}
\@initializelength{\listitemsymbolspace} \settowidth{\listitemsymbolspace}{0pt}
% commands
\renewcommand*{\recomputecvbodylengths}{%
@ -88,14 +89,14 @@
\par\addvspace{#1}}
\renewcommand*{\cvlistitem}[2][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemcolumnwidth}#2\end{minipage}}}
\cvitem[#1]{}{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}}}
\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}%
\cvitem[#1]{}{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\ifthenelse{\equal{#3}{}}%
{}%
{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#3\end{minipage}}}}
{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#3\end{minipage}}}}
\@initializebox{\cventryyearbox}
\@initializelength{\cventrytitleboxwidth}

View file

@ -53,6 +53,7 @@
% used by \cvlistdoubleitem
\@initializelength{\listdoubleitemcolumnwidth}
%\@initializelength{\listdoubleitemmaincolumnwidth}
\@initializelength{\listitemsymbolspace} \settowidth{\listitemsymbolspace}{0pt}
% commands
\@initializecommand{\recomputecvbodylengths}{%
@ -118,14 +119,14 @@
\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}}}
\@cvitem[#1]{}{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}}}
\renewcommand*{\cvlistdoubleitem}[3][.5ex]{%
\@cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}%
\@cvitem[#1]{}{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\ifthenelse{\equal{#3}{}}%
{}%
{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#3\end{minipage}}}}
{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#3\end{minipage}}}}
\@initializebox{\cventryyearbox}
\@initializelength{\cventrytitleboxwidth}

View file

@ -53,6 +53,7 @@
\@initializelength{\listitemcolumnwidth}
% used by \cvlistdoubleitem
\@initializelength{\listdoubleitemcolumnwidth}
\@initializelength{\listitemsymbolspace} \settowidth{\listitemsymbolspace}{0pt}
% default moderncv \photo (change the definition such that by default the photo and its box align with the section bars
\RenewDocumentCommand{\photo}{O{\hintscolumnwidth-0.8pt-2\fboxsep}O{0.4pt}m}{\def\@photowidth{#1}\def\@photoframewidth{#2}\def\@photo{#3}}%
@ -105,14 +106,14 @@
\begin{minipage}[t]{\doubleitemcolumnwidth}#5\end{minipage}}}
\renewcommand*{\cvlistitem}[2][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemcolumnwidth}#2\end{minipage}}}
\cvitem[#1]{}{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}}}
\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}%
\cvitem[#1]{}{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#2\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\ifthenelse{\equal{#3}{}}%
{}%
{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#3\end{minipage}}}}
{\listitemsymbol\hspace{\listitemsymbolspace}\begin{minipage}[t]{\listdoubleitemcolumnwidth-\listitemsymbolspace}#3\end{minipage}}}}
\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{\tl@milestone{#2}}{%

View file

@ -20,6 +20,7 @@
%\usepackage[scale=0.75]{geometry}
%\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates
%\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...
%\setlength{\listitemsymbolspace}{10pt} % set custom spacing between list symbol and text item (influences \cvlistitem and \cvlistdoubleitem)
% the 'contemporary' style allows to append additional elements to the head background; uncomment and customize if needed
%\def\@moderncvheadBackground{