我正在使用下面的代码创建定理样式。但是,该样式在标题框中的标题后面留下了一个点。我想删除它。有什么想法吗?
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{boiboites}
\newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,
titleboxcolor = black]{theo}{Theorem}{anything}
\begin{document}
\begin{theo}[Law of Large Numbers]
Let $(X_n)_{n\in \mathbb{N}}$ be an infinite sequence of i.i.d. variables with finite expected value. Then:
$$\frac{1}{n} \sum_{i=1}^n X_i \overset{\textnormal{a.s.}}{\longrightarrow}
\mathbb{E} (X_1) .$$
\end{theo}
\end{document}
答案1
打开boiboites.sty
样式文件并简单编辑行 (57):
(##1)}\textbf{.}}
像这样:
(##1)}\textbf{}}
没有点在花括号之间。
这应该可以解决您的问题并得到以下结果:
好吧,在阅读了其他解决方案后,我认为最好不要修改文件,.sty
因为更新会影响您的.tex
文件。根据 Gonzalo Medina 的建议,完整的示例可以修改如下:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{boiboites}
\usepackage{xpatch}
\xpatchcmd{\newboxedtheorem}{\textbf{.}}{}{}{}
\newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,
titleboxcolor = black]{theo}{Theorem}{anything}
\begin{document}
\begin{theo}[Law of Large Numbers]
Let $(X_n)_{n\in \mathbb{N}}$ be an infinite sequence of i.i.d. variables with finite expected value. Then:
$$\frac{1}{n} \sum_{i=1}^n X_i \overset{\textnormal{a.s.}}{\longrightarrow}
\mathbb{E} (X_1) .$$
\end{theo}
\end{document}