Latest news 2024-07-03: Ebook sale (1st – 31st July 2024): short story cybercrime fiction Unsocial Media free; short story cybercrime fiction Smile for the Camera free; short story noir crime fiction I’ve Heard the Mermaid Sing free; crime fiction novel The Private Enemy US$1.99; illustrated children’s story The Foolish Hedgehog US$0.99.

4.7.2 The ntheorem Package

The ntheorem package provides nine predefined theorem styles, listed in Table 4.1. The default is plain. When you define a new theorem-like environment with \newtheorem, it is given the style currently in effect. You can change the current style with:

\theoremstyle{<style name>}

where <style name> is the name of the theorem style.

Table 4.1: Predefined Theorem Styles Provided by ntheorem
plain Like the original LaTeX style
break Header is followed by a line break
change Like plain but header and number interchanged
changebreak Combination of change and break
margin Number is set in the margin
marginbreak Like margin but header followed by a line break
nonumberplain Like plain but without the number
nonumberbreak Like break but without the number
empty No number and no name. Only the optional argument is used in the header.

In addition to these styles, you can also use


to set the header font to <declarations>, which should consist of font declaration commands such as \normalfont,


to set the body font to <declarations>, and


to set the appearance of the theorem number, where <style> may be one of: arabic, roman, Roman, alph, Alph, greek, Greek or fnsymbol. Remember that the above commands all need to be used before the new theorem-like environment is defined. For additional commands that affect the style of the theorems, see the ntheorem documentation [10].


% in the preamble:

% later in the document:
This is a sample note. The number is in the margin.

Result (the vertical line in the image below indicates the boundary of the text area and won't appear in the PDF):

Image showing typeset output

If you use the standard package option to ntheorem, it will automatically define the following environments: Theorem, Lemma, Proposition, Corollary, Satz, Korollar, Definition, Example, Beispiel, Anmerkung, Bemerkung, Remark, Proof and Beweis.

Unlike amsthm's proof environment, ntheorem's Proof environment appends its optional argument in parentheses, if present, to the proof title. (Recall from earlier that amsthm's proof environment uses its optional argument as a replacement for the default proof title.)


Listing 13:

% in the preamble:


% later in the document:

A \emph{tautology} is a proposition that is always true for any value of its variables.

A \emph{contradiction} is a proposition that is always false for any value of its variables.

If proposition $P$ is a tautology then $\sim P$ is a contradiction, and conversely.
If $P$ is a tautology, then all elements of its truth table are true (by Definition~\ref{def:tautology}), so all elements of the truth table for $\sim P$ are false, therefore $\sim P$ is a contradiction (by Definition~\ref{def:contradiction}).

``It is raining or it is not raining'' is a tautology, but ``it is not raining and it is raining'' is a contradiction.

Example~\ref{ex:rain} used De Morgan's Law $\sim (p \vee q) \equiv \sim p \wedge \sim q$.


Image showing typeset output click here for a more detailed description.

This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-02-9).

© 2013 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs