1

When using \begin{theorem} with amsmath, the theorem text is inserted on the same line. I would like to have the text in a new paragraph

Have thought about using \vspace and use a pre-defined vertical spacing. Have seen that the value of \parskip is 0pt. What other predefined separator can I use?

Notwithstanding, \vspace is not inserting a newline.


    \begin{theorem}[{\bf \color{blue} Convolution Property of Fourier Transform}]
      \label{convolution}
    
      \vspace{5pt}
      \textcolor{blue}{This text in not placed as a new paragraph.}
    
    \end{theorem}  

7
  • It depends on what packages you are using and document class, different packages or classes can alter it. In plain TeX, it is apparently \parskip=0pt plus1pt or so the TeXbook says (p. 104). Please clarify your question including what class etc
    – user245306
    Commented Apr 23, 2022 at 17:45
  • I am using \documentclass{book}.
    – Veak
    Commented Apr 23, 2022 at 18:01
  • The value of \parskip is \parskip. So \vspace{\parskip} or what else have you in mind? Commented Apr 23, 2022 at 18:11
  • You should clarify your question. As Peter says, you can do \vspace{\parskip} but in book that has a natural size of 0pt so why would you need his? Commented Apr 23, 2022 at 18:21
  • Also, if you're adding \vspace, you should do it only when you're in vertical mode; otherwise, where it's actually applied may surprise you. Commented Apr 23, 2022 at 18:31

2 Answers 2

0

This answer is producing the following output:

enter image description here

Using \medskip etc within the environment wouldn't work nor would using it after the command \\ so instead a custom command named \custskip was defined to do as you seek, you can change the 6pt to whatever you would like. As an aside, \bf is quite old so you should use the new commands either \textbf for text in an argument and \bfseries as a switch (i.e. all the text afterwards is bold).

\documentclass{book}

\usepackage{amsmath}
\usepackage{xcolor}

\newtheorem{theorem}{Theorem}

\newcommand\custskip{\\[6pt]}

\begin{document}

    \begin{theorem}[{\color{blue}\textbf{Convolution Property of Fourier Transform}}]
      \label{convolution}
      
      \textcolor{blue}{\custskip This text in now placed as a new paragraph.}
    
    \end{theorem} 
    
\end{document}

Not sure if this is the best or most accurate method but it works.

0

You could do that quite easily with the ntheorem package, which defines a break style:

\documentclass{article}
\usepackage{xcolor} 
\usepackage{blindtext}
\usepackage{amsmath}
\usepackage[thmmarks, thref, amsmath]{ntheorem}
\theoremstyle{break}
\theoremheaderfont{\upshape\bfseries}
\theorembodyfont{\itshape}
\newtheorem{theorem}{Theorem}

\begin{document}

\begin{theorem}[{\color{blue} Convolution Property of Fourier Transform}]
  \label{convolution}
  \textcolor{blue}{This text is placed as a new paragraph.}
\end{theorem}

\end{document} 

enter image description here

You must log in to answer this question.

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