# Theorem style similar to equation

I was trying to treat theorems and lemmas as in the book Visual complex analysis which in my opinion has a very nice format for informal reading.

I would like to have equations and propositions numbered in a single enumeration, both with the enumerator right justified in the right of the page as in the following examples taken from the book:

Example 1: you can have equations (or other constructs like enumerations) inside the propositions

Example 2: Propositions are justified while equations are centered.

I haven't arrived very far in my trials, my best so far only handles one line propositions as in:

\documentclass{article}
\usepackage[fleqn]{amsmath}
\setlength{\mathindent}{1cm}
\begin{document}
\noindent Some text
$$\text{\itshape One line proposition of text and math f(x) = \sin x.}$$
some more text
$$f(x) = \sin x$$
some more text
$$\text{\itshape Long proposition of text don't fit in the page and continue past the right margin.}$$
some more text
\end{document}


But this has a lot of problems: it doesn't handle multiline propositions, and it doesn't center equations to begin with. Could you give me some clue on how to obtain the style used in the book?

• Off topic: Nice book! – Sigur Apr 9 '14 at 0:06

Here is another suggestion based on tcolorbox.

The myproposition environment is provided numbered and additionally unnumbered using a star. Both variants are breakable. The example code repeats the number, if the propositons gets broken. Just remove the overlay middle and last key, if you do not want that.

\documentclass{article}
\usepackage{amsmath,amsthm,lipsum}

\usepackage[many]{tcolorbox}

\tcbset{proposition/.style={enhanced,breakable,fontupper=\itshape,
frame hidden,interior hidden,boxsep=0pt,boxrule=0pt,
left=25pt,right=25pt}}

\newtcolorbox[use counter=equation]{myproposition}[1][]{%
proposition,
overlay unbroken and first={\node[left,inner sep=0pt,outer sep=0pt]
at (frame.east) {(\thetcbcounter)};},
overlay middle and last={\node[left,inner sep=0pt,outer sep=0pt,align=center]
}
In proposition~\ref{p:X}, \lipsum[5]
$$E = mc^2$$
\end{document}


• Thanks for your answer. I'm having some problems which I don't quite understand, for some reason the whole block is beeing indented to the right as if it was beeing treated as character. I have tried several alternatives such as placing \par\noindent before the \numblock, but I haven't been able to make it work. There is also a problem with the hyperref package it doesn't allow me to place a \plabel in the first parameter. – Esteban Crespi Apr 9 '14 at 11:11
• @EstebanCrespi As to the last problem, the numberedblock package was recently updated to handle labels. You may need an update from ctan.org/pkg/numberedblock. As to the indent, there is a parameter I set in the preamble, \setlength\blockindent{0.3in} which says that the proposition blocks should be indented by this amount. Note though, that I set the \parbox width to be symmetrically indented on the right side, to achieve centering of the equations. Making indent =0 on the left will cause the right end to overwrite the label on the right. – Steven B. Segletes Apr 9 '14 at 11:17
• @EstebanCrespi Another point about hyperref, once you update numberedblock to the latest version. Load hyperref before you load numberedblock. I will update my MWE to show this. – Steven B. Segletes Apr 9 '14 at 11:21