mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
add docstring for \setcvskilllegendcolumns and get rid of unnecessary RenewDocumentCommand
This commit is contained in:
parent
60426eaca0
commit
23f3381146
1 changed files with 71 additions and 15 deletions
|
|
@ -115,14 +115,46 @@
|
|||
% \setcvskillcolumns[\widthof{``Management Tools''}][0.6][3em]% ajust all at once.
|
||||
%
|
||||
% Note
|
||||
% - Note that due to implementation of \cvskillentry for style 'oldstyle' (moderncvbodyiv)
|
||||
% the first optional variable has no effect in this case.
|
||||
% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
|
||||
% it aligns with the rest of the entries. A readjustment of the first column should therefor
|
||||
% be avoided. It is recomended to only use \setcvskillcolumns in the form of
|
||||
% \setcvskillcolumns[][<factor>][<width>], thereby leaving the defaults in place for the first column.
|
||||
%
|
||||
%
|
||||
% \setcvskilllegendcolumns[<width>][<factor>]
|
||||
% adjust column width of legend
|
||||
%
|
||||
% The \cvskilllegend command comes with default FIXED width definitions for the columns of the legend matrix
|
||||
% such that the default english and german examples look good.
|
||||
% However, depending on the user input (translation) and the style that is used some adjustment might be needed.
|
||||
% The \setcvskilllegendcolumns command provides means to influence all columns except the ones containing
|
||||
% \cvskill commands. The second column containg the output of \cvskill remains fixed width. The last column,
|
||||
% the comment column gets recalculated according to the setting of the other columns.
|
||||
%
|
||||
% Input
|
||||
% Input_1 (optional): length smaller than \textwidth influencing the width of the first column
|
||||
% where depending on the style the legend_string gets printed. In case the
|
||||
% string is left empty adjusting this width allows moving the legend horizontally.
|
||||
% Default <\skilllegend@hintscolumnwidth>
|
||||
% Input_2 (optional): float between 0 and 1 influencing the width of the left legend descritor column,
|
||||
% aka \cvskilllegend@leftdescriptorwidth. The desriptor column on the right,
|
||||
% \cvskilllegend@rightdescriptorwidth is influenced by the factor 1-<factor>.
|
||||
% Default <\skilllegend@leftdesriptorfactor>
|
||||
%
|
||||
% Example usage
|
||||
% \setcvskilllegendcolumns[][0.45]%% adjust left desriptor column.
|
||||
% \setcvskilllegendcolumns[\widthof{``Legend''}][0.45]% adjust both left descriptor column and string column
|
||||
%
|
||||
% Note
|
||||
% - Due to implementation of \cvskilllegend for style 'fancy' (moderncvbodyv)
|
||||
% the first optional variable has no effect in this case.
|
||||
% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
|
||||
% it aligns with the rest of the entries. A readjustment of the first column should therefor
|
||||
% be avoided. It is recomended to only use \cvskilllegend in the form of
|
||||
% \cvskilllegend[][<factor>], thereby leaving the defaults in place for the first column.
|
||||
% - For style 'banking' the first column is set to align with the rest of the \cvskillentry entries
|
||||
% Therefor adjusting the first column can be used to widen the table while moving it around.
|
||||
% Therefor adjusting the first column can be used to widen the table while moving it around. If no
|
||||
% legend string is used, setting \cvskilllegend[0em] maximises the real enstate for the legend.
|
||||
%
|
||||
%
|
||||
% PRIVATE COMMANDS
|
||||
|
|
@ -354,14 +386,10 @@
|
|||
% \setcvskillcolumns[\widthof{``Management Tools''}][0.6][3em]% ajust all at once.
|
||||
%
|
||||
% Note
|
||||
% - Note that due to implementation of \cvskillentry for style 'oldstyle' (moderncvbodyiv)
|
||||
% the first optional variable has no effect in this case.
|
||||
% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
|
||||
% it aligns with the rest of the entries. A readjustment of the first column should therefor
|
||||
% be avoided. It is recomended to only use \setcvskillcolumns in the form of
|
||||
% \setcvskillcolumns[][<factor>][<width>], thereby leaving the defaults in place for the first column.
|
||||
% - For style 'banking' the first column is set to align with the rest of the \cvskillentry entries
|
||||
% Therefor adjusting the first column can be used to widen the table while moving it around.
|
||||
%
|
||||
\def\arg@new@hintscolumnwidth{#1}% <-- all these terminal % signs are necessary for the fancy style to not show weird spaces!!!
|
||||
\def\arg@new@bodyLengthFactor{#2}%
|
||||
|
|
@ -432,14 +460,42 @@
|
|||
}%
|
||||
}%
|
||||
%
|
||||
% command to adjust the width of the columns of the skilllegend.
|
||||
% \setcvskilllegendcolumns[<width>][<factor>], where <width> is a length smaller than
|
||||
% \textwidth influencing the width of the first column where depending on the style the legend_string
|
||||
% gets printed. In case the string is left empty adjusting this width allows moving the legend horizontally.
|
||||
% 0 < <factor> < 1 is a factor influencing the width of the left legend descritor column, aka \cvskilllegend@leftdescriptorwidth.
|
||||
% \cvskilllegend@rightdescriptorwidth is influenced by the factor 1-<factor>
|
||||
\DeclareDocumentCommand{\setcvskilllegendcolumns}{+O{} +O{}}{}%
|
||||
\RenewDocumentCommand{\setcvskilllegendcolumns}{+O{\skilllegend@hintscolumnwidth} +O{0.5}}{%
|
||||
% \setcvskilllegendcolumns[<width>][<factor>]
|
||||
\DeclareDocumentCommand{\setcvskilllegendcolumns}{+O{\skilllegend@hintscolumnwidth} +O{\skilllegend@leftdesriptorfactor}}{%
|
||||
% adjust column width of legend
|
||||
%
|
||||
% The \cvskilllegend command comes with default FIXED width definitions for the columns of the legend matrix
|
||||
% such that the default english and german examples look good.
|
||||
% However, depending on the user input (translation) and the style that is used some adjustment might be needed.
|
||||
% The \setcvskilllegendcolumns command provides means to influence all columns except the ones containing
|
||||
% \cvskill commands. The second column containg the output of \cvskill remains fixed width. The last column,
|
||||
% the comment column gets recalculated according to the setting of the other columns.
|
||||
%
|
||||
% Input
|
||||
% Input_1 (optional): length smaller than \textwidth influencing the width of the first column
|
||||
% where depending on the style the legend_string gets printed. In case the
|
||||
% string is left empty adjusting this width allows moving the legend horizontally.
|
||||
% Default <\skilllegend@hintscolumnwidth>
|
||||
% Input_2 (optional): float between 0 and 1 influencing the width of the left legend descritor column,
|
||||
% aka \cvskilllegend@leftdescriptorwidth. The desriptor column on the right,
|
||||
% \cvskilllegend@rightdescriptorwidth is influenced by the factor 1-<factor>.
|
||||
% Default <\skilllegend@leftdesriptorfactor>
|
||||
%
|
||||
% Example usage
|
||||
% \setcvskilllegendcolumns[][0.45]%% adjust left desriptor column.
|
||||
% \setcvskilllegendcolumns[\widthof{``Legend''}][0.45]% adjust both left descriptor column and string column
|
||||
%
|
||||
% Note
|
||||
% - Due to implementation of \cvskilllegend for style 'fancy' (moderncvbodyv)
|
||||
% the first optional variable has no effect in this case.
|
||||
% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
|
||||
% it aligns with the rest of the entries. A readjustment of the first column should therefor
|
||||
% be avoided. It is recomended to only use \cvskilllegend in the form of
|
||||
% \cvskilllegend[][<factor>], thereby leaving the defaults in place for the first column.
|
||||
% - For style 'banking' the first column is set to align with the rest of the \cvskillentry entries
|
||||
% Therefor adjusting the first column can be used to widen the table while moving it around. If no
|
||||
% legend string is used, setting \cvskilllegend[0em] maximises the real enstate for the legend.
|
||||
%
|
||||
\def\arg@new@legend@hintscolumnwidth{#1}%
|
||||
\def\arg@new@legend@leftDescriptorFactor{#2}%
|
||||
% Check for empty arguments. See explanation above
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue