diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty | 79 |
1 files changed, 17 insertions, 62 deletions
diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty index e8f143c468a..1e6af371804 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}[2008/08/05 v0.4 by Lars 'daleif' Madsen] +\ProvidesPackage{dlfltxbcodetips}[2010/03/04 v0.5 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 @@ -37,7 +37,7 @@ % 20080617 added \DeclareMathSymbolShorthand and \DeclareMathSet % 20080618 redesigned and renamed \PullBack to \MoveEqLeft % 20080828 added better implementation of \MakeDeclareMathSetCommand - +% 20100304 updated for latest release \newif\ifdlf@do@load@amssymb \dlf@do@load@amssymbtrue @@ -61,31 +61,6 @@ \endgroup% }} -% macro made on request by Morten H\o gholm -% \ArrowBetweenLines adds arrow on the left -% \ArrowBetweenLines* on the right -% more information is needed -% requires the amsmath package -% Now including a fix explained by Jean-Côme Charpentier -% only create ArrowBetweenLines if it does not already exist -\@ifundefined{ArrowBetweenLines}{ - \def\ArrowBetweenLines{\relax - \iffalse{\fi\ifnum0=`}\fi - \@ifstar{\ArrowBetweenLines@auxI{00}}{\ArrowBetweenLines@auxI{01}}} - \def\ArrowBetweenLines@auxI#1{% - \@ifnextchar[% - {\ArrowBetweenLines@auxII{#1}}% - {\ArrowBetweenLines@auxII{#1}[\Updownarrow]}} - \def\ArrowBetweenLines@auxII#1[#2]{% - \ifnum0=`{\fi \iffalse}\fi - \crcr - \noalign{\nobreak\vskip-\baselineskip\vskip-\lineskip}% - \noalign{\expandafter\in@\expandafter{\@currenvir}% - {alignedat,aligned,gathered}% - \ifin@ \else\notag\fi}% - \if#1 &&\quad #2\else #2\quad\fi - \\\noalign{\nobreak\vskip-\lineskip}} -}{} % for making theorems with shaded background @@ -136,21 +111,6 @@ }{\end{#1@inner}\endtrivlist\@endparenv}% } -% Mathematics into Type by Ellen Swanson recommends that line-broken -% displayed alignments should be indented by 2em (and other rules) -% instead of aligning ti the left and indenting all subsequent lines, -% it is easier to just pull back the first line. Just align all lines -% to the left and replace the & on the fist line with \MoveEqLeft -% The indentation amount can be changed by \MoveEqLeft[3], i.e. no unit, -% 'em will be used automatically - -\@ifundefined{MoveEqLeft}{% -\newcommand\MoveEqLeft[1][2]{% - \global\@tempdima=#1em% - \kern\@tempdima% - & - \kern-\@tempdima} -}{} @@ -210,29 +170,24 @@ \dp0=\dimen0 \box0 \mkern2.3965mu } -\@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}} +% needs to delay things +\AtBeginDocument{ + \@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 -% \abovedisplayshortskip before the display, usefull in some cases to -% save some space -\newcommand\SwapDeadSpace{% - \noalign{\vskip-\abovedisplayskip\vskip\abovedisplayshortskip} -} - \newcommand\ProvidePGFPagesFourOnOneWithSpaceForNotes{% \@ifpackageloaded{pgfpages}{% |