新定理样式:相当于 ConteXt 和 LateX

新定理样式:相当于 ConteXt 和 LateX

在转换(困难重重!)到 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

在此处输入图片描述

相关内容