diff options
author | Karl Berry <karl@freefriends.org> | 2007-07-16 16:05:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-07-16 16:05:29 +0000 |
commit | 27a5239e60e85720bfd01c348396544853abc301 (patch) | |
tree | 9862bb8ea71fd09742e1dc949053b25fd7831d8e | |
parent | 76f0a54b21f5a50ce8a8d358970c3f5575f49b80 (diff) |
dlfltxb update (10jul07)
git-svn-id: svn://tug.org/texlive/trunk@4607 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/dlfltxb/README | 14 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.pdf | bin | 206243 -> 213145 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex | 89 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.pdf | bin | 29307 -> 29307 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.pdf | bin | 187892 -> 193299 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.pdf | bin | 157568 -> 160842 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty | 95 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmisc.sty | 2 |
9 files changed, 138 insertions, 64 deletions
diff --git a/Master/texmf-dist/doc/latex/dlfltxb/README b/Master/texmf-dist/doc/latex/dlfltxb/README index a2cf999deeb..05ca81ecd61 100644 --- a/Master/texmf-dist/doc/latex/dlfltxb/README +++ b/Master/texmf-dist/doc/latex/dlfltxb/README @@ -22,11 +22,19 @@ HISTORY * 20070601 added new versions of dlfltxbcodetips and dlfltxbmarkup-sample.cfg + * 20070604 made dlfltxbcodetips more compatible with the mathdesign + package by adding the 'noamssymb' option + + * 20070710 bugfix in dlfltxbcodetips (the counter aliasing in + \NewShadedTheorem should now work as intended) + + * 20070711 bugfix in dlfltxbcodetips (coding error in \ArrowBetweenLines) + Current file contents for the dlfltxb bundle: ============================================= -dlfltxbcodetips (v0.2): +dlfltxbcodetips (v0.26): ----------------------- * dlfltxbcodetips.sty @@ -55,7 +63,9 @@ Changes all due to Enrico Gregorio. Also changed the implementation of \NewShadedTheorem such that the environment giving the bagground is now configurable. - + v0.23 Made the autoloading of amssymb optional. + v0.25 Bugfix. + v0.26 Bugfix. dlfltxbmarkup (v0.6): --------------------- diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.pdf b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.pdf Binary files differindex 47939048f69..bd6bfcb3e8b 100644 --- a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.pdf +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.pdf 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} diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.pdf b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.pdf Binary files differindex 8df3fb102e3..3a70627a6ec 100644 --- a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.pdf +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.pdf diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.pdf b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.pdf Binary files differindex 0e27525e858..82098befebb 100644 --- a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.pdf +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.pdf diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.pdf b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.pdf Binary files differindex b0cc71d9c45..decdb2eb687 100644 --- a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.pdf +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.pdf diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty index e09446ebe6c..1a58f5f86a6 100644 --- a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty +++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty @@ -1,4 +1,4 @@ -\ProvidesPackage{dlfltxbcodetips}[2007/06/01 v0.2 by Lars 'daleif' Madsen] +\ProvidesPackage{dlfltxbcodetips}[2007/07/11 v0.26 by Lars 'daleif' Madsen] % this pacakge collects some macros presented as code tips in my LaTeX % book: "Introduktion til LaTeX". As the macros might be useful for @@ -25,8 +25,26 @@ % \bigtimes, all due to Enrico Gregorio % also made the environment uded inside \NewShadedTheorem % configurable. +% 20070604 Karl Ove Hufthammer mentioned that mathdesign does not like +% amssymb, and _does_ implement \nleftarrow \nrightnarrow. The +% package option 'noamssymb' now disables loading amssymb +% 20070606 alternative konstruction of \NewShadedTheorem, now using +% ntheorem konstructions internally +% 20070710 bug fix regarding shadedtheorems, the counter aliasing did +% not work correctly +% 20070711 Bug fixed in \ArrowBetweenLines, the \ifin@ should go +% inside the \noalign, not outside. + +\newif\ifdlf@do@load@amssymb +\dlf@do@load@amssymbtrue + +\DeclareOption{noamssymb}{\dlf@do@load@amssymbfalse} + +\ProcessOptions\relax + +\RequirePackage{amsmath} + -\RequirePackage{amsmath,amssymb} % \InsertTheoremBreak removes the spacing above the first item, % \InsertTheoremBreak* does not @@ -44,6 +62,7 @@ % \ArrowBetweenLines* on the right % more information is needed % requires the amsmath package +% Now including a fix explained by Jean-Côme Charpentier \def\ArrowBetweenLines{\relax \iffalse{\fi\ifnum0=`}\fi \@ifstar{\ArrowBetweenLines@auxI{00}}{\ArrowBetweenLines@auxI{01}}} @@ -56,9 +75,9 @@ \crcr \noalign{\nobreak\vskip-\baselineskip\vskip-\lineskip}% \noalign{\expandafter\in@\expandafter{\@currenvir}% - {alignedat,aligned,gathered}}% + {alignedat,aligned,gathered}% + \ifin@ \else\notag\fi}% \if#1 &&\quad #2\else #2\quad\fi - \ifin@ \else\notag\fi \\\noalign{\nobreak\vskip-\lineskip}} @@ -67,41 +86,57 @@ % currently only ntheorem is supported (perhaps support for amsthm or % theorem will be added later) % has the same syntax as \newtheorem - -\newcommand\NTSshadeenvironment{shaded} +% +% redesigned 2007/06/06 +\def\theoremframecommand{} \newcommand\NewShadedTheorem[1]{% +% \@ifpackageloaded{ntheorem}{ +% \@ifpackagewith{ntheorem}{framed}{}{ +% \PackageError{dlfltxbcodetips}{ +% \string\NewShadedTheorem\space requires ntheorem to be ^^J +% loaded with the framed option}{} +% } +% }{ +% \PackageError{dlfltxbcodetips}{\string\NewShadedTheorem\space can +% only be used^^J with the ntheorem package}{} +% } \@ifnextchar[{\NST@levelii{#1}}{\NST@levelii{#1}[]}} \def\NST@levelii#1[#2]#3{% \@ifnextchar[{\NST@leveliii{#1}[#2]{#3}}{\NST@leveliii{#1}[#2]{#3}[]}} \newcommand\NST@helper[1]{% \edef\@tempa{c@#1}\edef\@tempb{c@#1@inner}% \expandafter\let\csname\@tempa\expandafter\endcsname\csname\@tempb\endcsname% + \edef\@tempa{p@#1}\edef\@tempb{p@#1@inner}% + \expandafter\let\csname\@tempa\expandafter\endcsname\csname\@tempb\endcsname% + \edef\@tempa{cl@#1}\edef\@tempb{cl@#1@inner}% + \expandafter\let\csname\@tempa\expandafter\endcsname\csname\@tempb\endcsname% \edef\@tempa{the#1}\edef\@tempb{the#1@inner}% \expandafter\let\csname\@tempa\expandafter\endcsname\csname\@tempb\endcsname% } \def\NST@leveliii#1[#2]#3[#4]{% \ifx\\#2\\% i.e. no common counter \ifx\\#4\\% i.e. no dominant counter - \newtheorem{#1@inner}{#3}% + \newshadedtheorem{#1@inner}{#3}% \NST@helper{#1}% \else% i.e. dominant counter - \newtheorem{#1@inner}{#3}[#4]% + \newshadedtheorem{#1@inner}{#3}[#4]% \NST@helper{#1}% \fi% \else% i.e. common counter - \newtheorem{#1@inner}[#2]{#3}% + \newshadedtheorem{#1@inner}[#2]{#3}% \fi% \newenvironment{#1}{% - \begin{\NTSshadeenvironment}% + % code stolen from ntheorem.sty + \thm@topsepadd \theorempostskipamount + \ifvmode \advance\thm@topsepadd\partopsep\fi + \trivlist + \@topsep \theorempreskipamount + \@topsepadd \thm@topsepadd + \item \setlength\theorempreskipamount{0pt}% \setlength\theorempostskipamount{0pt}% - \begin{#1@inner}}{\end{#1@inner}\end{\NTSshadeenvironment}\@endparenv}% - \newtheorem*{#1@innerstr}{#3} - \newenvironment{#1*}{% - \begin{\NTSshadeenvironment}% - \setlength\theorempreskipamount{0pt}% - \setlength\theorempostskipamount{0pt}% - \begin{#1@innerstr}}{\end{#1@innerstr}\end{\NTSshadeenvironment}\@endparenv}% + \begin{#1@inner} + }{\end{#1@inner}\endtrivlist\@endparenv}% } % Mathematics into Type by Ellen Swanson recommends that line-broken @@ -156,7 +191,15 @@ } \newcommand\bigtimes{\mathop{\dlf@bigtimes}\displaylimits} -% better construction fro \nuparrow and \ndownarrow, se also + + +\ifdlf@do@load@amssymb + \RequirePackage{amssymb} +\fi + +\RequirePackage{graphicx} + +% better construction for \nuparrow and \ndownarrow, se also % http://groups.google.com/group/comp.text.tex/msg/689cc8bd604fdb51 % again due to Enrico Gregorio % construction requires graphicx @@ -167,8 +210,20 @@ \dp0=\dimen0 \box0 \mkern2.3965mu } -\def\nuparrow{\mathrel{\mathpalette\dlf@nrotarrow\nrightarrow}} -\def\ndownarrow{\mathrel{\mathpalette\dlf@nrotarrow\nleftarrow}} +\@ifundefined{nrightarrow}{% + \PackageWarning{dlfltxbcodetips}{\string\nrightarrow\space not found,^^J + \string\nuparrow\space will not be defined} +}{ + \def\nuparrow{\mathrel{\mathpalette\dlf@nrotarrow\nrightarrow}} +} + +\@ifundefined{nleftarrow}{% + \PackageWarning{dlfltxbcodetips}{\string\nleftarrow\space not found,^^J + \string\ndownarrow\space will not be defined} +}{ + \def\ndownarrow{\mathrel{\mathpalette\dlf@nrotarrow\nleftarrow}} +} + % this can be used as the first thing in an amsmath alignment % environments for displayed math. It switches \abovedisplayskip and diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty index 30daa71f5f7..ba40ef465e8 100644 --- a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty +++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty @@ -233,7 +233,7 @@ \addtolength\sideparvshift{\feline@spvs@addto}% \fi% \if@feline@txt\feline@text{#2}\fi% - \if@feline@idx\feline@index{#2}\fi% + \if@feline@idx\phantomsection\feline@index{#2}\fi% \if@feline@mrgn\if@feline@hsp\hspace{0pt}\fi\feline@margin{#2}\fi% \@feline@txttrue% \@feline@mrgntrue% diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmisc.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmisc.sty index 80878531cb2..367c9e57669 100644 --- a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmisc.sty +++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmisc.sty @@ -99,7 +99,7 @@ \else% % special thanks to Dan Luecking for this, since my original % \hspace{\fill} failed miserably - \hskip1em plus 5em minus .5em + \hskip1em plus 5em minus .7em \fi% {\footnotesize #1~~{\url{#2}}} % \par% |