因此,我正在努力更改乳胶中标题/部分/小节的字体。
这是我的代码:
% !TEX TS?program = pdflatexmk
\documentclass[fontsize=12pt]{book}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{mathpazo}
%changing font of section/chapter title
\usepackage{fontspec}
\usepackage{titlesec}
\newfontfamily\headingfont{Papyrus}
\titleformat{\chapter}{\LARGE\headingfont}
\titleformat{\section}{\LARGE\headingfont}
\titleformat{\subsection}{\Large\headingfont}
\titleformat{\subsubsection}{\large\headingfont}
\title{my report}
\author{user name}
\date
\linespread{1.5}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tableofcontents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{introduction}
text : intro
\section{first section}
text : section
\subsection{this subsection}
text :section
\subsubsection{this and that subsection}
text :subsub
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
这是输出:
字体仅在chapter
和subsection
中实现。不适合其他人。
而且编号也会丢失。例如,没有titlesec
和fontspec
就是这样。章和小节的编号随之丢失。
我找不到错误。 (使用fontspec也很烦人,因为它找不到默认的乳胶字体,因此不得不将otf
文件复制粘贴到工作目录中)