Using amsthm
, is it possible to change the settings as follows ?
Theorem/number/Name/cite :
body
I tried to write:
\documentclass{article}
\usepackage{amsthm}
\newtheoremstyle{mystyle}% name
{3pt}%Space above
{3pt}%Space below
{\normalfont}%Body font
{0pt}%Indent amount
{\itshape}% Theorem head font
{:}%Punctuation after theorem head
{\newline}%Space after theorem head 2
{}%Theorem head spec (can be left empty, meaning ‘normal’)
\theoremstyle{mystyle}
\newtheorem{teorem}{Theorem}
\begin{document}
\begin{theorem}[Ordinary differential][\cite{1}]
Test
\end{theorem}
\end{document}
Best Answer
One possibility using the
xparse
package to define an environment with the two desired optional arguments:If the separation between the head and the body should be increased, one can use an appropriate
\vspace{<length>}
in the sixth argument:New requirement made in a comment: to define some other structures in a similar fashion:
The idea is the same. Using
\newtheorem
one creates the basic theorem-like structure, and then, with the help ofxparse
the corresponding environment with the two required optional arguments is defined.All three structures share a counter; this can be easily changed (as well as making the counter(s) be subordinated to an already existing counter) using the optional arguments of
\newtheorem
(see theamsthm
package documentation for further details).