2

First, the code is as follows:

\documentclass[11pt,a4paper]{report}
\usepackage{amsmath,amsfonts,amssymb,amsthm,blindtext,epsfig,epstopdf,titling,url,array,xspace}
\usepackage[nopar]{lipsum}
\usepackage{thmtools}
\usepackage[a4paper,bindingoffset=0.2in,left=1in,right=1in,top=1in,bottom=1in,footskip=.25in]{geometry}
\usepackage{enumerate}

\declaretheorem{theoremm} 
\declaretheoremstyle[%
  spaceabove=-7pt,%
  spacebelow=9pt,%
  headfont=\normalfont\itshape,%
  postheadspace=1em,%
  qed=\qedsymbol%
]{mystyle} 
\declaretheorem[name={\textbf{Proof}},style=mystyle,unnumbered,
]{prf}

\begin{document}

\begin{prf}
\ \\
\textbf{(1)} - Hello, I am mine.
\end{prf}

\begin{prf}
\ \\
{\begin{enumerate}[\textbf{(1)}]
\item - Hello, I am mine.
\end{enumerate}}
\end{prf}

\end{document}

The output looks as follows: enter image description here I had to use enumerate environment within the proof environment for some reasons. Then I noticed large space gaps inserted between the main body and the proof title as well as between the main body and the qed square.

The above is what I get without the usage of enumerate environment and the below is what I get using the enumerate environment.

How can I modify the code such that I get the above style while using the enumerate environment? Any help or tip would be greatly appreciated.

1
  • amsthm has a predefined proof environment. then all that is necessary to get the spacing you want would be to put \leavevmode after \begin{proof}, and then go on with \begin{enumerate}. the amsthm definition of proof also allows you to put \qedhere just before \end{enumerate} to move the qed box up onto the last line. (also onto the same line as a display that ends a proof.) May 17, 2017 at 0:51

2 Answers 2

2

You can do that with enumitem, without having to add a line break (and set the parameters for all ,lists inside the prf environment, if you wish):

\documentclass[11pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb,amsthm,blindtext,epsfig,epstopdf,titling,url,array,xspace}
\usepackage[nopar]{lipsum}
\usepackage{thmtools}
\usepackage[a4paper, bindingoffset=0.2in, margin=1in, footskip=.25in]{geometry}
\usepackage[shortlabels]{enumitem}

\declaretheorem{theoremm}
\declaretheoremstyle[%
  spaceabove=-7pt,%
  spacebelow=9pt,%
  headfont=\normalfont\itshape,%
  postheadspace=1em,%
  qed=\qedsymbol%
]{mystyle}
\declaretheorem[name={\textbf{Proof}},style=mystyle,unnumbered,
]{prf}

\begin{document}

\begin{prf}
  \ \\
  \textbf{(1)} - Hello, I am mine.
\end{prf}
\vspace{1cm}
\begin{prf}
  \begin{enumerate}[(1), wide=0pt, topsep=0pt, font=\bfseries, leftmargin=*, before=\leavevmode, after=\vspace{-1\baselineskip}]
    \item – Hello, I am mine. You are yours. He is his. she is hers. Yours is mine. Mine is absolutely not yours.
  \end{enumerate}
\end{prf}

\end{document} 

enter image description here

4
  • Thank you for shedding such enlightenment. I would like 'absolutely not yours' to start below '-' (which is the reason that I used enumerate in the first place). Could you kindly help me a little further with that? Thank you.
    – James
    May 16, 2017 at 22:42
  • @James: Done. Just add leftmargin=* to the options. This is not a perfect alignment, due to the side-bearings of the endash (it would be fine with a letter). It is possible to fine-tune the alignment, but the code will be more complex, and I'm not sure it is worth it. Please see if it's OK for you or not.
    – Bernard
    May 16, 2017 at 23:08
  • Wow, this works perfectly for the way I inteded. Thank you so much. I am sure I can adjust the length of the left margin by changing the value from "*" to arbitrary "pts". Again, this is so enlightening and I greatly appreciate for your help !!. Thank you!!
    – James
    May 16, 2017 at 23:27
  • Note that if you fix a value for the left margin, you lose the alignment with the beginning of the first line (unless you play with labelsep.
    – Bernard
    May 16, 2017 at 23:41
2

You could set up suitable list declarations but for occasional simpler just to remove the extra line.

enter image description here

\documentclass[11pt,a4paper]{report}
\usepackage{amsmath,amsfonts,amssymb,amsthm,blindtext,epsfig,epstopdf,titling,url,array,xspace}
\usepackage[nopar]{lipsum}
\usepackage{thmtools}
\usepackage[a4paper,bindingoffset=0.2in,left=1in,right=1in,top=1in,bottom=1in,footskip=.25in]{geometry}
\usepackage{enumerate}

\declaretheorem{theoremm} 
\declaretheoremstyle[%
  spaceabove=-7pt,%
  spacebelow=9pt,%
  headfont=\normalfont\itshape,%
  postheadspace=1em,%
  qed=\qedsymbol%
]{mystyle} 
\declaretheorem[name={\textbf{Proof}},style=mystyle,unnumbered,
]{prf}

\begin{document}

\begin{prf}\mbox{}

\vspace{-\baselineskip}
 \begin{enumerate}[\bfseries (1)]
\item - Hello, I am mine.
\end{enumerate}
\end{prf}

\end{document}
3
  • Thank you so much for your enlightment. Could you also possibly suggest me a way to lift the qed square up so that it looks like the above picture?
    – James
    May 16, 2017 at 14:58
  • 2
    some other theorem packages have more customisation for qed, I don't see anything in thmtools but you coluld do \item - Hello, I am mine.\qed \end{enumerate} \let\qed\relax \end{prf} so it comes on the last line of the enumerate May 16, 2017 at 15:07
  • Thank you so much for the touches of Midas, I greatly appreciate them.
    – James
    May 16, 2017 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .