如图所示,我想实现这样的情况;

QQ20190807-114036.png


不过我实现的是斜体,

QQ20190807-114132.png


我用的是这个命令制作的,

\newtheorem{example}{Example}

求指点

2 回答2

17
<pre class="brush:plain;toolbar:false">\documentclass{article} \usepackage{ntheorem} \theorembodyfont{\rmfamily} \newtheorem{example}{Example} \usepackage{lipsum} \begin{document} \begin{example}   \lipsum[1] \end{example} \end{document}</pre><p><img src="/data/ueditor/php/upload/image/20190807/1565168576472508.png" title="1565168576472508.png" alt="image.png"></p>
10
<p></p><p>latex 默认的定理环境就是标签粗体,内容意大利体,如果想改,使用amsthm 宏包。</p><p>amsthm 预定义了三种格式用于\theoremstyle:plain 和LATEX 原始的格式</p><p>一致;definition 使用粗体标签、正体内容;remark 使用斜体标签、正体内容。</p><p>话说这些东西 lshort 里都有。 MWE 如下:</p><pre class="brush:plain;toolbar:false">\documentclass{article} \usepackage{amsthm} \begin{document} \theoremstyle{definition}&nbsp; \newtheorem{example}{Example} \begin{example}\label{law:box} Consider&nbsp;the&nbsp;following&nbsp;six&nbsp;interval&nbsp;numbers,&nbsp;\ldots \end{example} \end{document}</pre><p></p>

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。