0

I am trying to get the Theorem. to line up with the bullet. I tried using \vspace{-\topsep}, but this moves the bullet up along with the Theorem.

\documentclass{article}

\usepackage{amsthm}

\newtheorem{theorem}{Theorem}

\begin{document}
\begin{itemize}
    \item \begin{theorem}
        $a^2 + b^2 = c^2$
    \end{theorem}
\end{itemize}
\end{document}
  • 1
    theorems are numbered structural displayed paragraphs butting it in an itemize is rather strange (and probably none of the theorem packages has ever been tested for such a usage, so you'd just have to patch as needed) – David Carlisle Jan 23 '18 at 23:51
  • @DavidCarlisle unfortunately our problem set formatting requirements demand that it be placed in a list (hence the strange usage). thanks! – carloabelli Jan 23 '18 at 23:53
  • 1
    I have no idea what that comment means but I guess if you have to you have to. If you just want a bullet to the left of the theorem head you could define the theorem environment that way, does it really have to be in an itemize??? Anyway if you do want that I would probably use \item\begin{minipage}[t]{\linewidth}{\begin{theorem... possibly with \ vspace correction inside the box to get whatever you need. – David Carlisle Jan 23 '18 at 23:56
  • If you want to place a bullet before the theorem, why do not use \newtheorem{theorem}{$\bullet$ Theorem} instead of using itemize? – Cragfelt Jan 23 '18 at 23:58
  • @Cragfelt Many of the questions have subparts and I figured it would be easier than manually doing all the indentation. – carloabelli Jan 23 '18 at 23:59
2

As a theorem has a list structure, you just have to compensate for the corresponding vertical spacing:

\documentclass{article}

\usepackage{amsthm}

\newtheorem{theorem}{Theorem}

\begin{document}

\begin{itemize}
    \item \leavevmode\vspace{-\dimexpr \baselineskip + \topsep}\begin{theorem}
        $a^2 + b^2 = c^2$. Some text some text some text. Some text some text some text. Some text some text some text. Some text some text some text.
    \end{theorem}
\end{itemize}

\end{document} 

enter image description here

1

My suggestion:

\documentclass{article}

\usepackage{amsthm}

\newtheorem{theorem}{Theorem}

\newenvironment{ittheorem}[1]{\begin{minipage}[#1]{0.1\textwidth}\begin{itemize}\item \end{itemize}\end{minipage}\begin{minipage}{0.88\textwidth}\begin{theorem}}{\end{theorem}\end{minipage}}

\begin{document}
\begin{itemize}
  \item
\begin{theorem}
        $a^2 + b^2 = c^2$
    \end{theorem}
\end{itemize}

\begin{ittheorem}[c]
  $a^2+b^2=c^2$
  you can include soome text and whatever accepted in a real theotem environment
\end{ittheorem}
\end{document}

Output:

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.