更改字体大小的最佳方法(Overleaf 上的 prometheusCV)

更改字体大小的最佳方法(Overleaf 上的 prometheusCV)

https://www.overleaf.com/latex/templates/prometheuscv/hhkdyvbtvhsq

我想更改章节标题和副标题的整体字体大小,但这样做很困难。

例如:

    \textbf{M.Sc.}~in Trickery\begin{large}
        ~(summa cum laude)
    \end{large}}

我这样做是为了将字体更改为其中一个子标题,但仍然无法更改主标题(如教育)的字体大小。

您有什么建议可以让它更易读吗?当我导出为 pdf 时,所有内容看起来都很小。谢谢。

答案1

prometheu-cv使用该titlesec包自定义章节和小节标题。

您可以通过在之前发布来定义自己的风格\begin{document}

% Customise the \section command 
\titleformat{\section}         
{\Huge \scshape\raggedright} % Make the \section headers Huge, small caps and left aligned
{}{0em}                      % No label (prefix) and no horizontal separation between label and title body
{}                           % Code preceeding the title body
[\titlerule]                 % Code following the title body. Here a horizontal line.

%  \subsection command
\titleformat{\subsection}
{\Large\scshape\raggedright}
{}{0em}
{}

要更改几个单词的字体大小,最好输入 {\Large (summa cum laude).}

A

这是完整的代码。

\documentclass{prometheus_cv}

\usepackage[a4paper, total={5.3in, 10in}, top=2cm]{geometry}        % width=5.3in, height=10in, top margin=2cm on each page

\usepackage{xcolor}                                                                               % define some colors
\definecolor{highlight}{HTML}{283559}
\definecolor{highlight2}{HTML}{1A2640}
\definecolor{link}{HTML}{5C6273}

\usepackage{lipsum}
\usepackage{siunitx}                            % package to properly set units
\usepackage{fontawesome5}                       % package for icons (see list of available icons here: http://mirrors.ibiblio.org/CTAN/fonts/fontawesome5/doc/fontawesome5.pdf)
\usepackage[super]{nth}                         % when you write \nth{2} you get a nice superscript
\usepackage[                                % coloring of links
    colorlinks = true,
    linkcolor = highlight,
    urlcolor = highlight,
    citecolor= highlight
]{hyperref}

\usepackage{fontspec}                           % package to change fonts               
\setmainfont[
    BoldFont=Cormorant Garamond Bold,
    ItalicFont=Cormorant Garamond Italic,
    BoldItalicFont=Cormorant Garamond Bold Italic
]{Cormorant Garamond Regular}                       % Set the main font to Comorant Garamond (https://github.com/CatharsisFonts/Cormorant)
\newfontfamily\GaramondLight{Cormorant Garamond Light}
\newcommand\textlf[1]{{\GaramondLight#1}}

\newcommand{\highlight}[1]{\textcolor{highlight}{\textbf{#1}}}      % highlight text as bold and with the highlight color defined above
\newcommand{\ec}{\textsuperscript{\textdagger}}                             % Equal contribution dagger


% define the header and (not) footer %
\usepackage{fancyhdr}                                                                         
\fancyhf{}
\rhead{Curriculum Vit\ae}
\lhead{Prometheus Fire}
\rfoot{Page \thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}


%**************************************************** added<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
% Customise the \section command 
\titleformat{\section}         
{\Huge \scshape\raggedright} % Make the \section headers Huge, small caps and left aligned
{}{0em}                      % No label (prefix) and no horizontal separation between label and title body
{}                           % Code preceeding the title body
[\titlerule]                 % Code following the title body. Here a horizontal line.

%  \subsection command
\titleformat{\subsection}
{\Large\scshape\raggedright}
{}{0em}
{}
%*****************************************************

\begin{document}
\thispagestyle{empty}               % Turn off header and footer for the first page
\pagestyle{fancy}                   % For the rest of the pages switch to the fancy page style defined just above the document begin

\section{Education}
  
  \datedsubsection{2017-2021}
  {%
    The best uni}
  {%
    \textbf{M.Sc.}~in Trickery  {\Large (summa cum laude).}
  }

\section{Publications}

\subsection{Conference and Journal Publications}

\end{document}

相关内容