summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-07-16 16:05:29 +0000
committerKarl Berry <karl@freefriends.org>2007-07-16 16:05:29 +0000
commit27a5239e60e85720bfd01c348396544853abc301 (patch)
tree9862bb8ea71fd09742e1dc949053b25fd7831d8e /Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex
parent76f0a54b21f5a50ce8a8d358970c3f5575f49b80 (diff)
dlfltxb update (10jul07)
git-svn-id: svn://tug.org/texlive/trunk@4607 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex')
-rw-r--r--Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex89
1 files changed, 49 insertions, 40 deletions
diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex
index 2fda5f54e4d..bc06cfe65fd 100644
--- a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex
+++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex
@@ -43,7 +43,7 @@
\usepackage{microtype}
\usepackage{amsmath,amssymb}
-\usepackage[amsmath,thmmarks]{ntheorem}
+\usepackage[amsmath,thmmarks,framed]{ntheorem}
\usepackage[round]{natbib}
\usepackage{dlfltxbcodetips}
@@ -66,8 +66,13 @@
\definecolor{shadecolor}{gray}{0.8}
\theorembodyfont{\normalfont}
\theoremseparator{.}
+\def\theoremframecommand{\colorbox{shadecolor}}
+
+\theoremstyle{nonumberplain}
+
\NewShadedTheorem{caveat}{Caveat}
+\NewShadedTheorem{remark}{Remark}
% until dlfltxbsd is released we will have to use the following
% construction
@@ -180,52 +185,60 @@ respectively.\addtocounter{footnote}{-1}\footnotemark
$ A \nuparrow B$ \qquad
$ B \ndownarrow C$
\end{sourcedisplay}
-The macros require the use of the \markup[nomk,sty]{graphicx} package,
-which is not auto loaded.
+
+\begin{remark}
+ The \markup[nomk,sty]{mathdesign} package is incompatible with
+ \markup[nomk,sty]{amssymb}, but it does define the symbols we need
+ from it to define \cs{nuparrow} and \cs{ndownarrow}. Use
+ \begin{syntax}
+ \verb|\usepackage[noamssymb]{dlfltxbcodetips}|
+ \end{syntax}
+ to disable the autoloading of \markup[nomk,sty]{amssymb}, and
+ remember to load \markup[nomk,sty]{dlfltxbcodetips} \emph{after}
+ \markup[nomk,sty]{mathdesign}.
+\end{remark}
+
\chapter{Fun with theorems}
\label{cha:fun-with-theorems}
-\section{Shaded theorems with the ntheorem package}
+\section{Shaded or framed theorems with the ntheorem package}
\label{sec:shaded-theorems-with}
-Even though we have the \markup[nomk,sty]{shadedthm} package, we can
-easily do better if we are already using the
-\markup[nomk,sty]{ntheorem} package. Simply use
-\begin{syntax}
- \markup{NewShadedTheorem}
-\end{syntax}
-It has exactly the same syntax as the ordinary
-\markup[nomk]{newtheorem}. Requirements: the
-\markup[nomk,sty]{framed}, \markup[nomk,sty]{ntheorem},
-(\texttt{x})\markup[nomk,sty]{color} packages and the definition of
-the >>\texttt{shadecolor}<< (required by the \markup[nomk,sty]{framed}
-package). Inside the \cs{NewShadedTheorem} the environment surrounding
-the theorem is given by the macro \markup{NSTshadeenvironment} which
-is initialised to >>\texttt{shaded}<<. You can change it using
-\cs{renewcommand}.
+The \markup[nomk,sty]{ntheorem} pacakge can create shaded or framed
+theorems, but they take up to much space (in my opinion). So we make
+our own macro \markup{NewShadedTheorem}. It has exactly the same
+syntax as the ordinary \markup[nomk]{newtheorem}. Requirements: the
+\markup[nomk,sty]{framed}, \markup[nomk,sty]{ntheorem} (loaded with
+the \texttt{framed} option), and \markup[nomk,sty]{color} or
+\markup[nomk,sty]{xcolor}. You will have to redefine
+\markup{theoremframecommand} to get a background color or a
+frame. This package initialises \markup[nomk]{theoremframecommand} to
+do nothing.
+\begin{caveat}
+ The theorem environment constructed will not have a stared companion
+ as \markup[nomk,sty]{ntheorem}s normal \markup[nomk]{newtheorem} does.
+\end{caveat}
\begin{sourcedisplay}
-\theoremheaderfont{\bfseries}
-\theoremseparator{.}
-\NewShadedTheorem{thm}{Theorem}[chapter]
-\NewShadedTheorem{lemma}[thm]{Lemma}
-\newtheorem{prop}[thm]{Proposition}
-\begin{thm}
+\def\theoremframecommand{\fboxsep=10pt\fbox}
+\NewShadedTheorem{sthm}{Theorem}[chapter]
+\def\theoremframecommand{%
+\colorbox{red}}
+\NewShadedTheorem{slemma}[sthm]{Lemma}
+\newtheorem{prop}[sthm]{Proposition}
+\begin{sthm}
normal test.
-\end{thm}
-\begin{thm*}
- un-numbered.
-\end{thm*}
-\begin{lemma}
+\end{sthm}
+\begin{slemma}
a lemma.
-\end{lemma}
+\end{slemma}
\begin{prop}
a theorem with no background.
\end{prop}
\end{sourcedisplay}
-In contrast to \markup[nomk,sty]{ntheorem}, the $*$-ed version created
-by \markup[nomk]{NewShadedTheorem} is a version that does not print a
-number.
+
+\theoremstyle{plain}
+\newtheorem{thm}{Theorem}
\section{Theorems that start with a list}
\label{sec:theorems-that-start}
@@ -233,10 +246,6 @@ number.
A theorem that starts with a list looks odd because the first item
comes directly after the heading.\footnote{Depends on the
configuration.}
-\makeatletter
-\let\thm\thm@inner
-\let\endthm\endthm@inner
-\makeatother
\begin{sourcedisplay}
\begin{thm}
\begin{enumerate}
@@ -268,11 +277,11 @@ The macro \markup{InsertTheoremBreak} helps.
\noindent The un-stared version remove the space above the list, the
stared version does not.
-\begin{caveat*}
+\begin{caveat}
If the theorem comes too close to a page break it is quite likely
that the page break will end up between the theorem header and the
start of the list.
-\end{caveat*}
+\end{caveat}
\chapter{Various features regarding alignment}
\label{cha:vari-feat-regard}