我想将文档中所有标题的默认字体更改为 Type 1 字体 Trajan,其类别描述如下: http://www.tug.dk/FontCatalogue/trajan/
对于我的文档,我使用的是以前学生创建的模板。与标题相关的部分报告如下:
%% Headers for the main body of the text, ie from the contents onwards.
%% These headers are used when the document is single sided.
%% If there is no chapter number then uppercase lettering is used.
%% Format is {left}{center}{right}. \defaultfont sets the font to sans.
\newpagestyle{main}[\defaultfont\bfseries]{% %\defaultfont\bfseries
\headrule%
\sethead%
{\ifthesection{\thesection{.} \space}{\ifthechapter{\thechapter{.}%
\space}{}}\ifthesection{\sectiontitle}{\ifthechapter{\chaptertitle}{%
\MakeUppercase{\chaptertitle}}}}%
{}{\thepage}%
\setfoot{}{}{}%
}
%% If the twoside option is set, the even pages can have different styles.
%% These are defined in the sqaure brackets [left][centre][right]{}{}{}
%% The headers are now controlled by the twomain pagstyle.
\newpagestyle{twomain}[\defaultfont\bfseries]{%
\headrule%
\sethead%
[\thepage]%
[][\ifthechapter{\chaptertitle}{\MakeUppercase{\chaptertitle}}]%
{\ifthesection{\thesection{.} \space}{\ifthechapter{\thechapter{.}%
\space}{}}\ifthesection{\sectiontitle}{\ifthechapter{\chaptertitle}{%
\MakeUppercase{\chaptertitle}}}}%
{}{\thepage}%
\setfoot[][][]{}{}{}%
}
%% Redefine the plain page style to use the defaultfont for the
%% numbering.
\renewpagestyle{plain}[\defaultfont]{%
\sethead{}{}{}%
\setfoot{}{\thepage}{}%
}
现在,我尝试更改\defaultfont
为\trajan
(以及删除\bfseries
不再需要的命令),但这会导致 Latex 编译时出错。目前,我正在使用 PDFlatex。
有人能帮我解决这个问题吗?提前谢谢你的帮助!
答案1
根据链接的网站,您使用 是错误的\trajan
。相反,您应该使用\trjnfamily
。