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 /Master/texmf-dist/tex/latex/dlfltxb | |
parent | 76f0a54b21f5a50ce8a8d358970c3f5575f49b80 (diff) |
dlfltxb update (10jul07)
git-svn-id: svn://tug.org/texlive/trunk@4607 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/dlfltxb')
-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 |
3 files changed, 77 insertions, 22 deletions
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% |