为什么新定义的环境末尾自带空格?

发布于 2022-06-29 23:38:46

我使用了如下代码:

\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}

其产生效果如下
image.png
但我想要使得:前后无间距,以使得悬挂缩进可以实现
这该怎么解

查看更多

关注者
1
被浏览
1.1k
0 个回答
暂无答案,快来添加答案吧

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览