Quantcast
Channel: Custom proof environment: spacing issue with when optional argument given - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 3

Answer by cabohah for Custom proof environment: spacing issue with when optional argument given

$
0
0

You could add \ignorespaces to your definition to ignore spaces at the beginning of the environment:

\documentclass{article}\usepackage{amsthm} \renewenvironment{proof}[1][Proof]{\noindent{\bfseries #1.\ }\ignorespaces}{\qed\\[2mm]}\begin{document}\begin{proof}    $A = X$.\end{proof}\begin{proof}[Proof]    $A = X$.\end{proof}\begin{proof}[Proof]%    $A = X$.\end{proof}\end{document}

But IMHO using \ignorespaces is mostly a workaround. So I would recommend to use a solution like @daleif's answer instead.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>