使用 parskip 包时如何查看定义/示例的结束位置?

使用 parskip 包时如何查看定义/示例的结束位置?

我喜欢使用 parskip 包,用垂直空格而不是缩进来分隔段落。但是,由于 amsthm 中也使用(似乎相同数量的)垂直空格来将定理与周围文本分开,因此这种组合使得无法分辨示例、定义和注释在哪里结束以及正文在哪里继续。(当然,正确的定理可以通过斜体与正文区分开来。)这是 MWE 及其外观:

\documentclass{article}
\usepackage{parskip}
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{exmp}{Example}
\begin{document}
    
This is not part of the example.

\begin{exmp}
    This is part of the example. This is part of the example. This is part of the example.
 
    This should be part of the example. This should be part of the example.
\end{exmp}

This should not be part of the example.
\end{document}

在此处输入图片描述

我正在寻找一些小的调整,这些调整足够明显,以便读者可以看到文档的结构。我希望接近 amsthm 标准;在我看来,文本上的花哨方框或长行偏离太大了。

我正在考虑三种可能的解决方案。我不确定我更喜欢哪一种;理想情况下我应该能够尝试所有解决方案。欢迎提出支持某一种解决方案或其他解决方案的论点。

1)增加定理环境周围的间距。

2)让定理环境中的段落仅通过缩进分隔,而没有垂直空格。这样,示例在视觉上会给人“一大段文本”的印象,但仍然可以将其构建成段落。

3)添加结束符号,例如结束证明的框 \qedsymbol。对于此选项,如果有的话,什么符号是结束示例、定义或注释的最标准方式?

迄今进展

1)amsthm 包提供了 \newtheoremstyle 命令来执行此操作。这个问题帮助给出默认值。

虽然从逻辑上来说只需要在某些环境的底部添加间距,但所有定理环境的顶部和底部都应该有一些额外的填充,以获得直观和一致的结果。

因此,将其放在序言中会使 MWE 看起来更好:

\usepackage{amsthm}
\newtheoremstyle{example}{4pt}{4pt}{\normalfont}{0pt}{\bfseries}{.}{5pt plus 1pt minus 1pt}{}
\theoremstyle{example}
\newtheorem{exmp}{Example}

在此处输入图片描述

但是,也许其他一些间距规范4pt可能会在其他情况下产生更好的结果。将4pt间距更改为0.3\baselineskip在 MWE 中看起来几乎相同,但适应基线跳过(我理解每个页面可能略有不同)。类似地,也许应该包括“橡皮长度”(parskip 本身就是这么做的),例如\0.3\baselineskip plus 2 pt minus 1 pt

2)使用此选项,示例/定义在视觉上会给人“一大段文本”的印象,即使它可以被组织成段落。这很吸引我。但是,在示例文本中包含显示的方程式可能会破坏这种视觉统一性。

我不知道具体该怎么做。

3)可以使用包来实现自定义结束符号thmtools(参见这个问题)。我不确定哪些符号是“最标准的”。在瑞典数学书中,以 结尾的例子似乎很常见\qedbox。对我来说,qedbox 与证明的结尾联系太紧密,以至于不能用来结束其他东西,但看起来不同的盒子可以起作用。

使用默认值和上面第 1 点中的“橡胶长度”以及一个小黑框作为结束标记,使得 MWE 看起来像这样:

\documentclass[10pt]{article}
\usepackage{parskip}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{thmtools}


\declaretheoremstyle[
headfont=\bfseries,
bodyfont=\normalfont,
spaceabove=0.4em plus 0.2em minus 0.1em,
spacebelow=0.4em plus 0.2em minus 0.1em,
postheadspace=5pt plus 1pt minus 1pt,
qed={$\scriptstyle{\blacksquare}$},
]{example}

\declaretheorem[
style=example,
title=Example,
]{exmp}

\begin{document}
    This is not part of the example.
    
    \begin{exmp}
        This is part of the example. This is part of the example. This is part of the example.
        
        This should be part of the example. This should be part of the example.
    \end{exmp}
    
    This should not be part of the example.
\end{document}

在此处输入图片描述

相关内容