我使用了如下代码:
\CJKsetecglue{}
\punctstyle{banjiao}
\newcounter{proof}%用于控制proof换行的环境
\newenvironment{proof}
{\setcounter{proof}{60}\vspace{0em}\par\setlength{\parindent}{-0.5em}\setlength{\leftskip}{5.5em}\hspace{-2.8em}$proof$:}
{\hfill $\square$\par\vspace{0em}\setcounter{proof}{67}\setlength{\parindent}{-0.5em}\setlength{\leftskip}{0.5em}}
\newenvironment{subsize}
{\vspace{0em}\par\addtocounter{proof}{5}\setlength{\parindent}{-0.5em}\setlength{\leftskip}{\theproof pt}}
{\par\vspace{0em}\addtocounter{proof}{-5}\setlength{\parindent}{-0.5em}\setlength{\leftskip}{\theproof pt}}
当我输入了这样的代码时:
\begin{proof}
使用数学\\归纳法证明:\par
使用数学\\归纳法证明:
\begin{subsize}
对$n=3$,成立
\end{subsize}
\end{proof}
其产生效果如下
但我想要实现:
前后无间距以使得悬挂缩进可以实现。
这该怎么解决?
我觉得你不应该用计数器proof
以及\theproof
的值来控制长度。
另外我没看懂『前后无间距以使得悬挂缩进可以实现』,以及subsize
是想实现什么...
如果你需要『悬挂缩进』,其实latex2e
是有类似的quote环境的:
%article.cls
\newenvironment{verse}
{\let\\\@centercr
\list{}{\itemsep \z@
\itemindent -1.5em%
\listparindent\itemindent
\rightmargin \leftmargin
\advance\leftmargin 1.5em}%
\item\relax}
{\endlist}
\newenvironment{quotation}
{\list{}{\listparindent 1.5em%
\itemindent \listparindent
\rightmargin \leftmargin
\parsep \z@ \@plus\p@}%
\item\relax}
{\endlist}
\newenvironment{quote}
{\list{}{\rightmargin\leftmargin}%
\item\relax}
{\endlist}
另外,代码要给完整...同时最好详细描述proof
以及subsize
想达到的预期效果示意图。