我目前有
\documentclass[10pt]{article}
\usepackage[text={7.2in,9.6in}]{geometry}
\geometry{letterpaper}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\begin{document}
\begin{description}
\item[Problem 8~]
A woman starts at a point $P$.
\begin{proof}[Response]
The north pole is such a point. And there are others:
Consider a point $a_1$ near the south pole such that
the parallel passing through $a_1$ forms a
circle $C_1$ with circumference exactly one mile.
If a point $a_2$ (or $a_3, a_4, \ldots$) is chosen
near the south pole so that the parallel passing
through it forms a circle $C_2$ ($C_3, C_4, \ldots$)
with a circumference of exactly $\frac{1}{2}$ mile
($\frac{1}{3}$ mile, $\frac{1}{4}$ mile, \ldots),
then the point
\end{proof}
\end{description}
\begin{proof}[Response]
The north pole is such a point. And there are others:
Consider a point $a_1$ near the south pole such that
the parallel passing through $a_1$ forms a
circle $C_1$ with circumference exactly one mile.
If a point $a_2$ (or $a_3, a_4, \ldots$) is chosen
near the south pole so that the parallel passing
through it forms a circle $C_2$ ($C_3, C_4, \ldots$)
with a circumference of exactly $\frac{1}{2}$ mile
($\frac{1}{3}$ mile, $\frac{1}{4}$ mile, \ldots),
then the point
\end{proof}
\end{document}
其结果如下:
我的目标是让描述环境内的证明环境中的“响应”中的第二段缩进,就像它在描述环境之外一样。
我想问题可能出在我使用geometry
包的方式上,但我不确定。有没有办法在 description 环境中的 proof 环境中的新换行符后缩进第二段(并且不添加空格)?
答案1
不,geometry
这没有任何作用。问题在于proof
内部使用trivlist
,它从封闭环境中继承了一些参数description
。
您可以定义自己的恢复相关参数的环境。
\documentclass[10pt]{article}
\usepackage[text={7.2in,9.6in}]{geometry}
\geometry{letterpaper}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\newlength{\normalparindent}
\newlength{\normalparskip}
\AtBeginDocument{%
\setlength{\normalparindent}{\parindent}%
\setlength{\normalparskip}{\parskip}%
}
\newenvironment{response}
{\proof[Response]%
\setlength{\parskip}{\normalparskip}%
\setlength{\parindent}{\normalparindent}}
{\endproof}
\begin{document}
\begin{description}
\item[Problem 8~]
A woman starts at a point $P$.
\begin{response}
The north pole is such a point. And there are others:
Consider a point $a_1$ near the south pole such that
the parallel passing through $a_1$ forms a
circle $C_1$ with circumference exactly one mile.
If a point $a_2$ (or $a_3, a_4, \ldots$) is chosen
near the south pole so that the parallel passing
through it forms a circle $C_2$ ($C_3, C_4, \ldots$)
with a circumference of exactly $\frac{1}{2}$ mile
($\frac{1}{3}$ mile, $\frac{1}{4}$ mile, \ldots),
then the point
\end{response}
\end{description}
\begin{response}
The north pole is such a point. And there are others:
Consider a point $a_1$ near the south pole such that
the parallel passing through $a_1$ forms a
circle $C_1$ with circumference exactly one mile.
If a point $a_2$ (or $a_3, a_4, \ldots$) is chosen
near the south pole so that the parallel passing
through it forms a circle $C_2$ ($C_3, C_4, \ldots$)
with a circumference of exactly $\frac{1}{2}$ mile
($\frac{1}{3}$ mile, $\frac{1}{4}$ mile, \ldots),
then the point
\end{response}
\end{document}
答案2
或者,使用以下enumitem
包:
\documentclass[10pt]{article}
\usepackage[text={7.2in,9.6in}]{geometry}
\geometry{letterpaper}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{enumitem}
\begin{document}
\begin{description}[listparindent=\parindent,parsep=0pt]
\item[Problem 8~]
A woman starts at a point $P$.
\begin{proof}[Response]
The north pole is such a point. And there are others:
Consider a point $a_1$ near the south pole such that
the parallel passing through $a_1$ forms a
circle $C_1$ with circumference exactly one mile.
If a point $a_2$ (or $a_3, a_4, \ldots$) is chosen
near the south pole so that the parallel passing
through it forms a circle $C_2$ ($C_3, C_4, \ldots$)
with a circumference of exactly $\frac{1}{2}$ mile
($\frac{1}{3}$ mile, $\frac{1}{4}$ mile, \ldots),
then the point\ldots
One additional paragraph.
\end{proof}
\end{description}
\begin{proof}[Response]
The north pole is such a point. And there are others:
Consider a point $a_1$ near the south pole such that
the parallel passing through $a_1$ forms a
circle $C_1$ with circumference exactly one mile.
If a point $a_2$ (or $a_3, a_4, \ldots$) is chosen
near the south pole so that the parallel passing
through it forms a circle $C_2$ ($C_3, C_4, \ldots$)
with a circumference of exactly $\frac{1}{2}$ mile
($\frac{1}{3}$ mile, $\frac{1}{4}$ mile, \ldots),
then the point
\end{proof}
\end{document}
为了完整起见,这里是输出:
添加
一个更好的解决方案是创建自定义的“description
类似”环境:
\documentclass[10pt]{article}
\usepackage[text={7.2in,9.6in}]{geometry}
\geometry{letterpaper}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{enumitem}
\newlist{DWRdescription}{description}{1} % <<< Increase last argument if you
% need to nest "DWRdescription"
% environments.
\setlist[DWRdescription]{listparindent=\parindent,parsep=0pt}
\begin{document}
\begin{DWRdescription}
\item[Problem 8~]
A woman starts at a point $P$.
\begin{proof}[Response]
The north pole is such a point. And there are others:
Consider a point $a_1$ near the south pole such that
the parallel passing through $a_1$ forms a
circle $C_1$ with circumference exactly one mile.
If a point $a_2$ (or $a_3, a_4, \ldots$) is chosen
near the south pole so that the parallel passing
through it forms a circle $C_2$ ($C_3, C_4, \ldots$)
with a circumference of exactly $\frac{1}{2}$ mile
($\frac{1}{3}$ mile, $\frac{1}{4}$ mile, \ldots),
then the point\ldots
One additional paragraph.
\end{proof}
\end{DWRdescription}
\begin{proof}[Response]
The north pole is such a point. And there are others:
Consider a point $a_1$ near the south pole such that
the parallel passing through $a_1$ forms a
circle $C_1$ with circumference exactly one mile.
If a point $a_2$ (or $a_3, a_4, \ldots$) is chosen
near the south pole so that the parallel passing
through it forms a circle $C_2$ ($C_3, C_4, \ldots$)
with a circumference of exactly $\frac{1}{2}$ mile
($\frac{1}{3}$ mile, $\frac{1}{4}$ mile, \ldots),
then the point
\end{proof}
\end{document}
输出应该与之前完全相同。