在转换(困难重重!)到 ConteXt 之前,我使用 LaTeX 很长一段时间。例如,为了定义我的新定理,我使用了 amsthm 包,我这样做了:
\newtheoremstyle{theoremdd}% name of the style to be used
{\topsep}% measure of space to leave above the theorem. E.g.: 3pt
{\topsep}% measure of space to leave below the theorem. E.g.: 3pt
{\itshape}% name of font to use in the body of the theorem
{0pt}% measure of space to indent
{\bfseries}% name of head font
{. ---}% punctuation between head and body
{ }% space after theorem head; " " = normal interword space
{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}
\theoremstyle{theoremdd}
\newtheorem{thmd}{Theorem}[section]
以下是我对 ConteXt 的建议:
\setupenumerations[
before={\blank},
after={\blank},
text=Théorème,
alternative=serried,
title=no,
prefix=yes,
prefixsegments=chapter,
way=bysection,
numberstopper={. ---},
titlestyle=bold,
style=italic,
width=broad]
\defineenumeration[theorem]
这是正确的方法吗?
答案1
您不想---
在 numberstopper 中使用 ,因为这样它也会出现在该定理的交叉引用中。相反,您想使用headcommand
在标题和内容之间添加破折号。此外,我们想设置 ,distance=none
因为我已经在 中添加了间距headcommand
。既然您设置了prefixsegments=chapter
,我猜您也打算使用way=bychapter
(而不是bysection
)。
\setupenumerations
[before={\blank},
after={\blank},
text=Théorème,
alternative=serried,
title=no,
headcommand=\groupedcommand{}{~---~},
distance=none,
prefix=yes,
prefixsegments=chapter,
way=bychapter,
numberstopper={.},
titlestyle=bold,
style=italic,
width=broad]
\defineenumeration[theorem]
\starttext
\startchapter[title={First}]
\starttheorem[reference={thm:knuth}]
\input knuth
\stoptheorem
\starttheorem
See \in{Theorem}[thm:knuth]
\input ward
\stoptheorem
\stopchapter
\startchapter[title={Second}]
\starttheorem
\input zapf
\stoptheorem
\starttheorem
\input tufte
\stoptheorem
\stopchapter
\stoptext