我正在使用report
class 进行论文写作。是否可以为目录、章节标题和普通文本定义三种字体?例如,我想为目录定义“B Zar”字体,为章节和节标题定义“B Lotus”字体,并采用适当的比例。
\documentclass[12pt,a4paper,titlepage]{report}
\usepackage{amsthm,amssymb,amsmath,mathrsfs,tikz,fancyhdr,nccmath}
\usepackage[nottoc]{tocbibind}
\usepackage[titletoc,title]{appendix}
\usepackage{titlesec}
\usepackage[extrafootnotefeatures]{xepersian}
\fancyfoot{}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.2pt}
\setdigitfont[Scale=0.85]{PGaramond}
\settextfont[Scale=0.95]{Zar}
\setlatintextfont[Scale=0.8]{Times New Roman}
\defpersianfont\titr[Scale=1]{Titr Bold}
\defpersianfont\davat[Scale=1]{B Davat}
\defpersianfont\nastaliq[Scale=1.5]{IranNastaliq}
\defpersianfont\nazanin[Scale=1]{B Nazanin}
\defpersianfont\mitra[Scale=1]{IRMitra}
\defpersianfont\lotus[Scale=1]{B Lotus}
\linespread{1.8}
\titleformat{\chapter}[display]{\lotus}{\chaptertitlename\ \tartibi{chapter}}{1em}{}
\makeatletter \def\@makechapterhead#1{ \vspace*{50\p@} {\parindent \z@ \raggedright\normalfont \ifnum \c@secnumdepth >\m@ne \if@mainmatter \huge\bfseries \@chapapp\space \thechapter \par\nobreak \vskip 20\p@ \fi \fi \interlinepenalty\@M \Huge \bfseries #1\par\nobreak \vskip 40\p@ }} \def\@makeschapterhead#1{ \vspace*{50\p@} {\parindent \z@ \centering \normalfont \interlinepenalty\@M \Huge \bfseries #1\par\nobreak \vskip 40\p@ }} \makeatother
\makeatletter
\bidi@patchcmd{\@makechapterhead}{\thechapter}{\tartibi{chapter}}{}{}
\bidi@patchcmd{\chaptermark}{\thechapter}{\tartibi{chapter}}{}{}
\bidi@patchcmd{\Hy@org@chapter}{%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
}{\addcontentsline{toc}{chapter}%
{\protect\numberline{\@chapapp\,\tartibi{chapter}}\qquad\quad#1}%
}{}{}
\makeatother
\begin{document}
\newpage
\tableofcontents
\addtocontents{toc}{\textbf{عنوان}~\hfill\textbf{صفحه}\par}
\chapter{برنامه}
متن متن متن متن متن متن متن متن متن متن متن متن متن
\begin{appendices}
\chapter{الگوریتم}
متن متن متن متن متن متن متن متن متن متن متن متن متن
\end{appendices}
\end{document}