[OS X TeX] Some aspects of package ntheorem

Don Green Dragon fergdc at Shaw.ca
Thu Jan 19 09:06:13 CET 2012


Hi All,

I'm using TeXShop 2.43 with Snow Leopard 10.6.8. This message was written with RTF is effect because it is useful to be able to distinguish between various fonts.

For the examples below, I have the following in my preamble:
\documentclass [11pt, fleqn, leqno] {book}
\usepackage{amssymb}	% allows AMS symbols
\usepackage{latexsym}	% allows LaTeX symbols
\usepackage{amsfonts}	% allows AMS fonts
\usepackage{amsmath}
\usepackage[amsthm, thmmarks,  thref]{ntheorem}

INHERITANCE:

PECULIAR EFFECT OF \theoremstyle{plain} ???

In reading the May & Schedler manual for the n-th time, I was able to further confuse my expectations concerning `inheritance'. On page 15 they write:

	'Note, that parts of the setting are inherited. For instance, the fonts are not reset before defining “Lemma”, 
	so the font setting of “Theorem” is used.'

From the above I concluded that 'inheritance' would apply to all command lines that precede, hence modify, a line like

\newtheorem{<structure name>}{<structure title>}	% simplest form

unless countermanded by another command line; i.e., if \theoremstyly{plain} were in effect then it could be countermanded by \theoremstyle{break} which would continue until countermanded by \theoremstyle{<some other parameter>}, . . .

So consider the preamble lines:

(1)	\theoremstyle{plain}
(2)	\theorembodyfont{\normalfont}
(3)	\newtheorem{thm}{Theorem}[chapter]
(4)	\newtheorem{lem}[thm]{LEMMA}

The numbers are not part of the code. So lines (1) and (2) both apply to lines (3) and (4), according to my inheritance interpretation. Not so! Consider the small chunk of source code:

=====
% Source code Ex. A
\begin{lem} [Lemma Identifier]
Body of the lemma begins here \dots.
\end{lem}
and

\begin{thm} [Theorem Identifier]
Body of the theorem begins here \dots.
\end{thm}
=====

On typesetting, the body text for both LEMMA 1.1 and Theorem 1.2 is set in italic! So the line (2) was not effective. 
Consider now a small variation of the preamble:

(1)	\theoremstyle{plain}
(2)	\theorembodyfont{\normalfont}
(3)	\newtheorem{thm}{Theorem}[chapter]
(4a)	\theoremseparator{+}
(5a)	\newtheorem{lem}[thm]{LEMMA}

The idea behind line (4a) is to replace that damn period character that will follow an optional ID or header and replace it by the equally annoying + character, at least for lemmas. It does not work! On typesetting the code in Ex. A above, the preview page does not change from

=====
LEMMA 1.1  (Lemma Identifier).  Body of the lemma begins here ....

and

Theorem 1.2  (Theorem Identifier). Body of the theorem begins here ....
===== 

However, if the following small change is made in the preamble code:

(1)	\theoremstyle{plain}
(2)	\theorembodyfont{\normalfont}
(3)	\newtheorem{thm}{Theorem}[chapter]
(4b)	\theoremstyle{change}
(5b)	\theoremseparator{+}
(6b)	\newtheorem{lem}[thm]{LEMMA}

then on typesetting Ex. A above we obtain a miracle,  something like

=====
LEMMA 1.1  (Lemma Identifier)+  Body of the lemma begins here ....

and

Theorem 1.2  (Theorem Identifier). Body of the theorem begins here ....
===== 

Now \theorembodyfont{\normalfont} is effective with respect to 'lem' but not relative 'thm'. I guess my question is:

Is that how ntheorem is supposed to work?


NON-INHERITANCE OF \theoremprework COMMAND:

Essentially, the same kind of stuff as above. Starting with the preamble lines

(1c)	\theoremstyle{changebreak}
(2c)	\theorembodyfont{\normalfont}
(3c)	% \theoremprework{$\diamonsuit$\rule{1cm}{7pt}$\diamonsuit$}
(4c)	\newtheorem{thm}{Theorem}[chapter]
(5c)	\newtheorem{lem}[thm]{LEMMA}

the source code in Ex. A typesets as:

=====
1.1  LEMMA  (Lemma Identifier)
Body of the lemma begins here ....

and

1.2  Theorem  (Theorem Identifier)
Body of the theorem begins here ....
=====

and \theorembodyfont{\normalfont} applies to both 'lem' and 'thm'!! Now, uncomment (3c) and typesetting reveals:

=====
1.1  LEMMA  (Lemma Identifier)
Body of the lemma begins here ....

and
   <spectacular graphic>
1.2  Theorem  (Theorem Identifier)
Body of the theorem begins here ....
=====

where

	<spectacular graphic> = graphic form of code $\diamondsuit$\rule{1cm}{7pt}$\diamondsuit$

Notice that  <spectacular graphic> has not decorated 1.1  LEMMA. In order to get <spectacular graphic> to appear above
 1.1  LEMMA, I had to change the preamble code to

(1c)	\theoremstyle{changebreak}
(2c)	\theorembodyfont{\normalfont}
(3d)	\theoremprework{$\diamonsuit$\rule{1cm}{7pt}$\diamonsuit$}
(4d)	\newtheorem{thm}{Theorem}[chapter]
(5d)	\theoremprework{$\diamonsuit$\rule{1cm}{7pt}$\diamonsuit$}
(6d)	\newtheorem{lem}[thm]{LEMMA}

and so forth. I don't see a general rule relating to this inheritance business.


A WISH:

I would like to be able to concoct theorem-like structures which would have the form (on the preview page in chapter 2)

Theorem 2.1 (von Neumann's Trick)
Body text begins on the line below the header line without \theoremstyle{break} active.

NOTICE that the part <(von Neumann's Trick)> is NOT followed by the period character -- Glory Be! Also, in order that

"Body text begins on the line below the header line without \theoremstyle{break} active." 

be achieved, I would encode the above with something like

\begin{thm} [von Neumann's Trick]\ \\[3pt]
Body text begins on the line below the header line without \verb#\theoremstyle{break}# active.
\end{thm}

I.E., the desired general form is:

<header title> <header number> (<optional ID>) <nobreak> <body text>

The part <nobreak> is just a wish not a reality. In order to get <header title> and <header number> in the desired order, it seems that I must use \theoremstyle{plain} since the other parameters to \theoremstyle

	change, changebreak, margin, marginbreak

invoke the order <header number> <header title> and the other options

	nonumberplain, nonumberbreak, empty

are of no use; and finally, I DON'T want to use 'break' since I want to control where the first line of the 'thm' begins, manually, as shown in the coding example.

Another wish would be some device to avoid the parenthetical pair (. . .) in optional IDs. 
	
Sorry, all the details, but it is the details that have been bugging me.


Don Green Dragon
fergdc at Shaw.ca


















-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20120119/52d04a7b/attachment.html>


More information about the macostex-archives mailing list