格式化 isov2 文档类中的标题和子句

格式化 isov2 文档类中的标题和子句

我目前正在与异戊醇文档类。我已成功将整个文档的字体更改为 Times New Roman。但是,我希望标题、目录(实际单词“Contents”)和所有条款采用不同的字体。我思考字体是Arial,如下图所示。

我还注意到,所有条款(条款、子条款和子条款)都添加了句号。我希望只在条款中添加句号。我不确定如何编辑我当前的代码来调整这一点。我的代码如下图所示。谢谢。

所需字体

\documentclass[draft,wd,letterpaper]{isov2}
\let\ifpdf\relax 

% Overall font to Times New Roman
\usepackage{fontspec}
\setmainfont{Times New Roman}

% Add a period (.) after the clause numbering (in the actual document, NOT toc)
\makeatletter
\def\@seccntformat#1{\csname the#1\endcsname.\quad}
\makeatother

\standard{ISO/IEEE 11073-10201}
\yearofedition{2013}
\languageofedition{(E)}
\setcounter{tocdepth}{3}     % ToC includes ssclauses and above

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\title{Title of Document}{}{}

\tableofcontents

\clause{Clause} This is the first clause
\sclause{SClause} This is a subclause (sclause)
\ssclause{SSClause} This is a sub-subclause (ssclause)
\clause{Clause} This is the second clause
\end{document}

答案1

条款标题使用的字体在\Cfont\SCfont和中定义\SSCfont;标准定义在iso11.clo,只需添加 即可重新定义它们\sffamily

\clause只能通过一个巧妙的技巧来获得 的周期:

\makeatletter
\def\@seccntformat#1{%
  \csname the#1\endcsname\csname dot#1\endcsname\quad
}
\newcommand{\dotclause}{.}
\makeatother

我们只定义\dotclause,因此当使用\sclause或时,构造只会执行。\ssclause\csname...\endcsname\relax

\documentclass[draft,wd,letterpaper]{isov2}

% Overall font to Times New Roman
\usepackage{fontspec}
\setmainfont{Times New Roman}
\setsansfont{TeX Gyre Heros} % or Arial?

\renewcommand{\Cfont}{\sffamily\Large\bfseries}
\renewcommand{\SCfont}{\sffamily\large\bfseries}
\renewcommand{\SSCfont}{\sffamily\normalsize\bfseries}


% Add a period (.) after the clause numbering (in the actual document, NOT toc)
\makeatletter
\def\@seccntformat#1{%
  \csname the#1\endcsname\csname dot#1\endcsname\quad
}
\newcommand{\dotclause}{.}
\makeatother

\standard{ISO/IEEE 11073-10201}
\yearofedition{2013}
\languageofedition{(E)}
\setcounter{tocdepth}{3}     % ToC includes ssclauses and above

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\title{Title of Document}{}{}

\tableofcontents

\clause{Clause} This is the first clause
\sclause{SClause} This is a subclause (sclause)
\ssclause{SSClause} This is a sub-subclause (ssclause)
\clause{Clause} This is the second clause
\end{document}

在此处输入图片描述

相关内容