代码:

代码:

我自定义了默认章节样式,如下图所示,章节号字体为Garamondnumber font,正文为Timesfont。

在此处输入图片描述

代码:

\documentclass[a4paper, 12pt]{book}
\usepackage[T1]{fontenc}
\usepackage{newtxtext, newtxmath}
\usepackage{color}
\definecolor{RoyalRed}{RGB}{157,16, 45}
\renewcommand{\sfdefault}{mdugm} %Garamond
\usepackage[ ]{titlesec}  %
\titleformat{\chapter}[display]
  { \normalsize \huge  \color{black}}
  {\flushright \normalsize \color{RoyalRed} \MakeUppercase { \chaptertitlename } \hspace{1 ex} { \fontsize{60}{60}\selectfont \color{RoyalRed} \sffamily  \thechapter }} {10 pt}{\huge}  
  \begin{document}

\chapter{Introduction}
...
bla bla
...
\chapter{State of the art}
...
bla bla
...
\end{document}

那么如何将章节标题设置state of art为粗体字体呢?

答案1

{\bfseries\huge}最后使用:

\titleformat{\chapter}[display]
  { \normalsize \huge  \color{black}}
  {\flushright \normalsize \color{RoyalRed} \MakeUppercase { \chaptertitlename \hspace{1 ex} }  { \fontsize{60}{60}\selectfont \color{RoyalRed} \sffamily  \thechapter }} {10 pt}{\bfseries\huge} 

代码:

\documentclass[a4paper, 12pt]{book}
\usepackage[T1]{fontenc}
\usepackage{newtxtext, newtxmath}
\usepackage{color}
\definecolor{RoyalRed}{RGB}{157,16, 45}
\usepackage{titlesec}
\titleformat{\chapter}[display]
  {\normalsize \huge  \color{black}}%
  {\flushright\normalsize \color{RoyalRed}%
   \MakeUppercase{\chaptertitlename}\hspace{1ex}%
   {\fontfamily{mdugm}\fontsize{60}{60}\selectfont\thechapter}}%
  {10 pt}%
  {\bfseries\huge}%

\begin{document}

\chapter{Introduction}
...
bla bla
...
\chapter{State of the art}
...
bla bla
...
\end{document}

在此处输入图片描述

相关内容