如何/在哪里调整 moderncv 技能矩阵的字体大小?

如何/在哪里调整 moderncv 技能矩阵的字体大小?

我希望categoryname列是,normalsize而不是默认发生的大事。我遵循了一些建议,将技能矩阵调整为\cvskillentry{category}{name}{level}{comment}

moderncv 存储库包含所有文件和这个仓库包含 的修改moderncvskillmatrix.sty。只需使用

& {\normalsize \raggedleft\hintstyle{#3} } & {\normalsize \centering \cvskill{#4} \normalsize} & \centering {#5} & {\skillLegend@FontSize\itshape#6}\\[#2]%

在 的第 1053 行moderncvskillmatrix.sty,我在其中输入了{\normalsize...}我自己,不是吗。.sty无论如何,我认为字体大小不是在该文件中确定的,但我认为值得一试。

任何启示都会受到热烈欢迎。

答案1

第 1002 至 1064 行moderncvskillmatrix.sty

% Definition of \cvskillentry valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii, moderncvbodyiv
\usepackage{setspace}
\newcolumntype{P}[1]{>{\setstretch{.6}}p{#1}}
\RenewDocumentCommand\cvskillentry{s +O{.25em} +m +m +m +m}{%
    %test for the star * in the command
    \IfBooleanTF{#1}{% If a star is seen a dotted line is drawn above the entry
        \begingroup
            \renewcommand{\arraystretch}{1.1}
            \arrayrulecolor{color1}
            \begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}%
                    p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
                    p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
                    %p{\cvskill@experiencewidth} @{\hspace{\skillmatrix@padding}}%
                    P{\skillmatrix@commentwidth}@{}}%
                \cdashline{2-4}[.6pt/1pt]
                \raggedleft\hintstyle{\bfseries\small #3} & \raggedright\small {#4} & \centering \cvskill{#5} & {\skillLegend@FontSize\itshape #6}%
            \end{tabular}%
        \endgroup
        \par\addvspace{#2}
    }{% If no star is seen no line is drawn
        \begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}%
                p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
                p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
                %p{\cvskill@experiencewidth}%
                %@{\hspace{\skillmatrix@padding}}%
                P{\skillmatrix@commentwidth}@{}}%
            \raggedleft\hintstyle{\bfseries\small #3} & \raggedright\small {#4} & \centering \cvskill{#5} & {\skillLegend@FontSize\itshape #6}%
        \end{tabular}%
        \par\addvspace{#2}
    }
}

% Definition of \cvskillentry valid for moderncvbodyv
\if@moderncvbodyv%
    \DeclareDocumentCommand\@starIndependentMatrixEntry{}{}%
    \RenewDocumentCommand\cvskillentry{s O{.25em} +m +m +m +m}{%
        \arrayrulecolor{color1}%
        \setlength\arrayrulewidth{\separatorrulewidth}%
        \vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
        %test for the star * in the command
        \RenewDocumentCommand{\@starIndependentMatrixEntry}{}{%
            \begingroup%
                \renewcommand{\arraystretch}{1.1}%
                \begin{tabular}[t]{@{}p{\hintscolumnwidth}%
                                @{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}p{\skillmatrix@hintscolumnwidth}
                                @{\hspace{\skillmatrix@padding}}%
                                p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
                                p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
                                %p{\cvskill@experiencewidth} @{\hspace{\skillmatrix@padding}}
                                P{\skillmatrix@commentwidth}@{}}%
    %                 \cline{3-6}%
                    & {\normalsize \raggedleft\hintstyle\small{#3} } & {\small \centering \cvskill{#4} \small} & \centering\small {#5} & {\skillLegend@FontSize\itshape#6}\\[#2]%
                \end{tabular}%
            \endgroup%
        }%
        \IfBooleanTF{#1}{% the star does not do anything here
            \@starIndependentMatrixEntry%
        }{% 
            \@starIndependentMatrixEntry%
        }%
        \par\@aftersectionfalse\ignorespaces%
    }%
\fi

相关内容