![isov2 文档类别和定义列表](https://linux22.com/image/295460/isov2%20%E6%96%87%E6%A1%A3%E7%B1%BB%E5%88%AB%E5%92%8C%E5%AE%9A%E4%B9%89%E5%88%97%E8%A1%A8.png)
我目前正在使用异戊醇文档类。我想创建一个定义列表。我目前有以下输出(样式)
使用代码:
\begin{definitions}
\definition{agent}{Device that provides data in a manager-agent communicating system.}
\end{definitions}
但是,我希望术语和定义放在一行上,用冒号分隔,类似于下面的图片:
答案1
您需要重新定义环境definitions
以抑制一些硬编码的换行命令并添加冒号:
\documentclass{isov2}
\makeatletter
\renewenvironment{definitions}{%
\setcounter{cl@level}{6}
\ifnum\value{sssssclause}=0 \setcounter{cl@level}{5} \fi
\ifnum\value{ssssclause}=0 \setcounter{cl@level}{4} \fi
\ifnum\value{sssclause}=0 \setcounter{cl@level}{3} \fi
\ifnum\value{ssclause}=0 \setcounter{cl@level}{2} \fi
\ifnum\value{sclause}=0 \setcounter{cl@level}{1} \fi
\ifnum\value{clause}=0 \setcounter{cl@level}{0} \fi
\ifcase\value{cl@level} % 0, NOT YET IN A CLAUSE
\ClassWarning{iso}{Definitions started before the initial clause}
\renewcommand{\@defcl}[1]{\setcounter{note}{0}\setcounter{example}{0}
\par
\addvspace{\beforecskip}
\@afterindentfalse
\refstepcounter{clause}
{\raggedright\bfseries \theclause\ ##1:}}
\or % 1, called in a clause
\renewcommand{\@defcl}[1]{\setcounter{note}{0}\setcounter{example}{0}
\par
\addvspace{\beforescskip}
\@afterindentfalse
\refstepcounter{sclause}
{\raggedright\bfseries \thesclause\ ##1:}}
\or % 2, called in an sclause
\renewcommand{\@defcl}[1]{\setcounter{note}{0}\setcounter{example}{0}
\par
\addvspace{\beforesscskip}
\@afterindentfalse
\refstepcounter{ssclause}
{\raggedright\bfseries \thessclause\ ##1:}}
\or % 3, called in an ssclause
\renewcommand{\@defcl}[1]{\setcounter{note}{0}\setcounter{example}{0}
\par
\addvspace{\beforesscskip}
\@afterindentfalse
\refstepcounter{sssclause}
{\raggedright\bfseries \thesssclause\ ##1:}}
\or % 4, called in an sssclause
\renewcommand{\@defcl}[1]{\setcounter{note}{0}\setcounter{example}{0}
\par
\addvspace{\beforesscskip}
\@afterindentfalse
\refstepcounter{ssssclause}
{\raggedright\bfseries \thessssclause\ ##1:}}
\or % 5, called in an ssssclause
\renewcommand{\@defcl}[1]{\setcounter{note}{0}\setcounter{example}{0}
\par
\addvspace{\beforesscskip}
\@afterindentfalse
\refstepcounter{sssssclause}
{\raggedright\bfseries \thesssssclause\ ##1:}}
\else % 5+, called in an sssssclause or lower
\ClassWarning{iso}{Definitions too deeply nested}
\renewcommand{\@defcl}[1]{
\par
\addvspace{\beforesscskip}
\@afterindentfalse
\refstepcounter{sssssclause}
{\raggedright\bfseries \thesssssclause\ ##1:}}
\fi}%
{}
\makeatother
\begin{document}
\clause{Test clause}
\sclause{Test sclause}
\begin{definitions}
\definition{agent}{Device that provides data in a manager-agent communicating system.}
\end{definitions}
\end{document}
结果: