抱歉,这看起来很基础,但我刚刚从 LaTeX 转换过来。内联数学似乎会影响名为“示例”的枚举环境头后的间距。我该如何抵消这一点?
\defineenumeration[example][
text=Example,
before={\blank[medium]},
after={\blank[medium]},
alternative=serried,
right=.,
distance=0.5em,
width=broad,
headstyle=bold,
titlestyle=bold,
]
\starttext
\startexample
Let $R$ be a ring and $M_n(R)$ be a collection of all $n\times n$ matrices with entries in
$R$. Then $M_n(R)$ is a ring. In particular, $M_n(\mathbb{Z})$, $M_n(\mathbb{R})$ and
$M_n(\mathbb{C})$ are all rings. Note that these rings are not generally commutative.
\stopexample
\startexample
$\mathbb{Z}, \mathbb{Q}, \mathbb{R}$ and $\mathbb{C}$ are all rings. They satisfy all the
axioms. $\mathbb{Z}$ is an integral domain and $\mathbb{Q}, \mathbb{R}$ and $\mathbb{C}$ are
fields.
\stopexample
\stoptext
答案1
使用width=fit
并将标题后的间距设置为零(感谢 Wolfgang Schuster 的评论):
%\setuppapersize[A6]
\defineenumeration[example][
text=Example,
before={\blank[medium]},
after={\blank[medium]},
alternative=serried,
right=.,
distance=0.5em,
width=fit,
stretch=0,
shrink=0,
headstyle=bold,
titlestyle=bold,
]
\starttext
\startexample
Let $R$ be a ring and $M_n(R)$ be a collection of all $n\times n$ matrices with entries in $R$. Then $M_n(R)$ is a ring. In particular, $M_n(\mathbb{Z})$, $M_n(\mathbb{R})$ and $M_n(\mathbb{C})$ are all rings. Note that these rings are not generally commutative.
\stopexample
\startexample
$\mathbb{Z}, \mathbb{Q}, \mathbb{R}$ and $\mathbb{C}$ are all rings. They satisfy all the axioms. $\mathbb{Z}$ is an integral domain and $\mathbb{Q}, \mathbb{R}$ and $\mathbb{C}$ are fields.
\stopexample
\stoptext