我希望我的定理环境(定理、引理、推论、定义)等具有如下悬挂缩进:
Theorem 1: This is the one, It should be emphasized that an option gives the holder the
right to do something.The holder does not have to exercise this right. This
is what distinguishes options from forwards and futures, where the holder is
obligated to buy or sell the underlying asset.
但是,我无法生成这种类型的悬挂缩进,下面是我从如何更改定理环境中使用的字体:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsthm}
\usepackage{xcolor}
\newtheoremstyle{mytheoremstyle} % name
{\topsep} % Space above
{\topsep} % Space below
{\itshape\fontfamily{ptm}\selectfont} % Body font
{} % Indent amount
{\fontfamily{ptm}\selectfont\scshape\color{blue}} % Theorem head font
{:} % Punctuation after theorem head
{.5em} % Space after theorem head
{} % Theorem head spec (can be left empty, meaning ‘normal’)
\theoremstyle{mytheoremstyle}
\newtheorem{lemma}{Lemma}
\usepackage{lipsum}
\begin{document}
\begin{lemma}[foo bar]
\lipsum[3]
\end{lemma}
\end{document}
答案1
有些是手动建议,但它可以按照您的意愿工作:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsthm}
\usepackage{xcolor}
\newbox\thmbox%
\setbox\thmbox=\hbox{\fontfamily{ptm}\selectfont\scshape\color{blue}Lemma 1 (foo bar)}%
\newtheoremstyle{mytheoremstyle} % name
{\topsep} % Space above
{\topsep} % Space below
{\hangindent\wd\thmbox\itshape\fontfamily{ptm}\selectfont} % Body font
{} % Indent amount
{\fontfamily{ptm}\selectfont\scshape\color{blue}} % Theorem head font
{:} % Punctuation after theorem head
{.5em} % Space after theorem head
{} % Theorem head spec (can be left empty, meaning ‘normal’)
\theoremstyle{mytheoremstyle}
\newtheorem{lemma}{Lemma}
\usepackage{lipsum}
\begin{document}
\begin{lemma}[foo bar]
\lipsum[3]
\end{lemma}
\end{document}
答案2
您可以添加
\hangafter=1\hangindent=3em
到指令的“Body font”行的参数\newtheoremstyle
:
{\itshape\fontfamily{ptm}\selectfont\hangafter=1\hangindent=3em}
我建议你不是使缩进量(3em
在以上几行中)取决于定理类环境是被调用的Lemma
(相当短的字符串)还是Proposition
(相当长的字符串)。只需选择一个值,保证您的读者别无选择,只能注意到悬挂缩进正在生效。
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsthm}
\usepackage{xcolor,lipsum}
\newtheoremstyle{mytheoremstyle} % name
{\topsep} % Space above
{\topsep} % Space below
{\itshape\fontfamily{ptm}\selectfont\hangafter=1\hangindent=3em} % Body font
{} % Indent amount for first line
{\fontfamily{ptm}\selectfont\scshape\color{blue}} % Theorem head font
{.} % Punctuation after theorem head
{.5em} % Space after theorem head
{} % Theorem head spec (can be left empty, meaning ‘normal’)
\theoremstyle{mytheoremstyle}
\newtheorem{lemma}{Lemma}
\begin{document}
\begin{lemma}[foo bar]
\lipsum[3][1-8]
\end{lemma}
\end{document}