3

Consider the following code :

\documentclass[12pt]{report}
\usepackage{amsthm}

\newtheoremstyle{multiple_remarks}
  {1.0em}
  {1.0em}
  {\normalfont}
  {0pt}
  {\bfseries}
  { : \\}
  {5pt plus 1pt minus 1pt}
  {}

\theoremstyle{multiple_remarks}
\newtheorem*{remarks}{Remarks}

\begin{document}
    \begin{remarks}
        Test.
        \begin{enumerate}
          \item First item.
          \item Second item.
          \item Fourth item.
        \end{enumerate}
    \end{remarks}

    \begin{remarks}
        \begin{enumerate}
          \item First item.
          \item Second item.
          \item Fourth item.
        \end{enumerate}
    \end{remarks}
\end{document}

Question: Why the list doesn't begin on the line after the remarks header like it does for normal text, and how to fix this?

3
  • For me the second environment begins on the same line as the header.
    – Bernard
    Jul 30, 2014 at 0:40
  • @Bernard Yes, I want it to begin on the line after, like the first environment.
    – Amateur
    Jul 30, 2014 at 0:42
  • Insert an \mbox{} before the first item — or use ntheorem: it has several ‘break’ styles.
    – Bernard
    Jul 30, 2014 at 0:46

1 Answer 1

4

The problem is that right after \begin{remarks} TeX is in vertical mode; using \leavevmode (and a possible negative vertical spacing), for example, solves the problem:

\documentclass[12pt]{report}
\usepackage{amsthm}

\newtheoremstyle{multiple_remarks}
  {1.0em}
  {1.0em}
  {\normalfont}
  {0pt}
  {\bfseries}
  {:}
  {\newline}
  {}

\theoremstyle{multiple_remarks}
\newtheorem*{remarks}{Remarks}

\begin{document}
    \begin{remarks}
        Test.
        \begin{enumerate}
          \item First item.
          \item Second item.
          \item Fourth item.
        \end{enumerate}
    \end{remarks}

    \begin{remarks}\leavevmode
        \begin{enumerate}
          \item First item.
          \item Second item.
          \item Fourth item.
        \end{enumerate}
    \end{remarks}

       \begin{remarks}\leavevmode\vspace*{-\baselineskip}
        \begin{enumerate}
          \item First item.
          \item Second item.
          \item Fourth item.
        \end{enumerate}
    \end{remarks} 
\end{document}

enter image description here

6
  • But why the second enumerate is too lower? Is there an empty line before it?
    – Sigur
    Jul 30, 2014 at 0:56
  • @GonzaloMedina Is there a way to "integrate" the \leavevmode directly in the remarks environment so as not to have to type \leavevmode every time ? Doesn't seem to work when I put it alongside the : character or if I replace \newline by it.
    – Amateur
    Jul 30, 2014 at 1:28
  • @Amateur since a vertical spacing will be needed (see my updated answer), I think there's no point in incorporating the command directly. In any case, you could try something like \usepackage{etoolbox} \BeforeBeginEnvironment{enumerate}{\leavevmode}. Jul 30, 2014 at 1:31
  • @Amateur but I wouldn't do that anyway; I'd go with the manual adjustment when required. Jul 30, 2014 at 1:33
  • 1
    @Amateur Ah, in that case, it's better to say \newenvironment{rema} {\begin{remarks}\leavevmode\vspace*{-\baselineskip}\begin{enumerate}} {\end{enumerate}\end{remarks}} and then use it as \begin{rema} \item First item. \item Second item. \item Third item. \end{rema} Jul 30, 2014 at 1:42

You must log in to answer this question.

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