2

I am trying to prove some theorem by using proof environment, but somehow the result is different when I use article as my document class and aip-cp document class.

The result when I use article as document class is enter image description here

The result when I use aip-cp as document class is enter image description here

Is there a way to use aip-cp document class but when I use proof environment it does not add some horizontal space between the proof and the first text of the proof?

Here is the code

\documentclass{aip-cp}[letter]

\usepackage[numbers]{natbib}
\usepackage{rotating}
\usepackage{graphicx}
\let\iint\relax
\let\iiint\relax
\let\iiiint\relax
\let\idotsint\relax
\let\openbox\relax
\let\proof\relax
\let\endproof\relax
\usepackage{amsmath}
\usepackage{amsthm}

\theoremstyle{lemma}
\newtheorem{lemma}{Lemma}

\setlength{\parindent}{15pt}

\begin{document}

\begin{lemma}
Sample text
\end{lemma}

\begin{proof}
We begin to proof the equation by using the definition of A
\end{proof}

\end{document}

Note: I somehow can reduce the space by using \hspace{-6mm} but it does not look natural.

  • Welcome to TeX.Stackexchange! Can you please make a minimal working example (MWE)? – user36296 Sep 19 '18 at 15:49
  • Sorry it is my first time here. I have already edited my post. Is that what it means by MWE? – Ben Sep 19 '18 at 15:55
1

The space between "Proof." and the text is controlled by \labelsep You can change this length to your needs:

\documentclass{aip-cp}[letter]

\let\iint\relax
\let\iiint\relax
\let\iiiint\relax
\let\idotsint\relax
\let\openbox\relax

\usepackage{amsmath}
\usepackage{amsthm}

\usepackage{etoolbox}
\AtBeginEnvironment{proof}{
\setlength\labelsep{6pt}
}


\begin{document}

\begin{proof}
We begin to proof the equation by using the definition of A
\end{proof}

\end{document}
1

The aip-cp class sets a very large value of \labelsep. However, changing the value of this parameter inside the proof environment is not a good solution, because it might make inner lists different from the outer ones.

\documentclass{aip-cp}
\usepackage{showframe}
\usepackage[numbers]{natbib}
\usepackage{rotating}
\usepackage{graphicx}
\let\iint\relax
\let\iiint\relax
\let\iiiint\relax
\let\idotsint\relax
\let\openbox\relax
\let\proof\relax
\let\endproof\relax
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{xpatch}

\makeatletter
\xpatchcmd{\proof}
 {\item[\hskip\labelsep\itshape#1\@addpunct{.}]}
 {\item[]\textit{#1\@addpunct{.}}\ }
 {}{}
\makeatother

\theoremstyle{lemma}
\newtheorem{lemma}{Lemma}

\setlength{\parindent}{15pt}

\begin{document}

\begin{lemma}
Sample text
\end{lemma}

\begin{proof}
We begin to proof the equation by using the definition of A
\begin{itemize}
\item abc
\end{itemize}
and the proof is done.
\end{proof}

\begin{itemize}
\item abc
\end{itemize}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.