【问题标题】:How to change () to [] in "lem" enviroment TeX?如何在 \"lem\" 环境 TeX 中将 () 更改为 []?
【发布时间】:2022-12-01 03:05:32
【问题描述】:

我在序言中定义的环境“lem”中的括号有问题。如果你编译我的 MWE,你会得到:“Lem 1 (Yoneda, 1996)”,但我想要:“Lem 1 [Yoneda, 1996]”。我怎样才能做到这一点?

我用谷歌搜索这个问题,但没有找到答案。

\documentclass{article}

%\usepackage[T2A]{fontenc}
%\usepackage[cp1251]{inputenc}
%\usepackage[english]{babel}

\newtheorem{lem}{Lem}

\begin{document}

\begin{lem}[Yoneda, 1996]
Let $F$ be a functor from a locally small category ${\mathcal C}$ to
$\mathbf{Set}$. Then for each object $A$ of $\mathcal{C}$, the
natural transformations $\mathrm{Nat}(h_{A},F) = \mathrm{Hom}
(\mathrm{Hom}(A,-),F)$ from $h_{A}$ to $F$ are in one-to-one
correspondence with the elements of $F(A)$. That is,
$\mathrm{Nat}(h_{A},F) \cong F(A)$. Moreover, this isomorphism is
natural in $A$ and $F$ when both sides are regarded as functors from
${\mathcal{C}} \times \mathbf{Set}^{\mathcal {C}}$ to
$\mathbf{Set}$.
\end{lem}

\end{document}

【问题讨论】:

标签: latex brackets


【解决方案1】:

有多种方法可以实现这一点。一种原始方法是更新提供可选参数的内部命令设置定理 - @opargbegintheorem

documentclass{article}


ewtheorem{lem}{Lem}

makeatletter

enewcommand{@opargbegintheorem}[3]{%
  	rivlist
    item[hskiplabelsep {fseries #1 #2 [#3]}]itshape}% Changed (#3) to [#3]
makeatother

egin{document}

egin{lem}[Yoneda, 1996]
Let/~$F$ be a functor from a locally small category/~$mathcal{C}$ to/~$mathbf{Set}$. Then for each object/~$A$ of/~$mathcal{C}$, the
natural transformations/ $mathrm{Nat}(h_A, F) = mathrm{Hom}(mathrm{Hom}(A, -), F)$ from/~$h_A$ to/~$F$ are in one-to-one
correspondence with the elements of/~$F(A)$. That is,/ $mathrm{Nat}(h_A, F) cong F(A)$. Moreover, this isomorphism is
natural in/~$A$ and/~$F$ when both sides are regarded as functors from/~$mathcal{C} 	imes mathbf{Set}^{mathcal{C}}$ to/~$mathbf{Set}$.
end{lem}

end{document}

当然,这将对通过 ewtheorem 定义的所有类似定理的结构产生全局影响。然而,这种一致性通常是一件好事。

here使用amsthm显示了更具适应性的更改(也可以与thmtools结合使用)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-09
    • 2013-01-24
    相关资源
    最近更新 更多