diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/dlfltxb')
3 files changed, 113 insertions, 48 deletions
diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty index edc970b473d..20fabc43215 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/01/17 v0.3 by Lars 'daleif' Madsen] +\ProvidesPackage{dlfltxbcodetips}[2008/08/05 v0.4 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 @@ -34,6 +34,9 @@ % not work correctly % 20070711 Bug fixed in \ArrowBetweenLines, the \ifin@ should go % inside the \noalign, not outside. +% 20080617 added \DeclareMathSymbolShorthand and \DeclareMathSet +% 20080618 redesigned and renamed \PullBack to \MoveEqLeft + \newif\ifdlf@do@load@amssymb \dlf@do@load@amssymbtrue @@ -63,22 +66,25 @@ % 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}}} -\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}% +% 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}} + \ifin@ \else\notag\fi}% + \if#1 &&\quad #2\else #2\quad\fi + \\\noalign{\nobreak\vskip-\lineskip}} +}{} % for making theorems with shaded background @@ -90,16 +96,6 @@ % 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}[]}} @@ -143,15 +139,18 @@ % 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 \PullBack -% The indentation amount can be changed by \PullBack[3], i.e. no unit, +% 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 -\newlength\PullBackLength -\newcommand\PullBack[1][2]{% - \setlength{\global\PullBackLength}{#1em}% - \kern\PullBackLength% - & - \kern-\PullBackLength} + +\@ifundefined{MoveEqLeft}{% +\newcommand\MoveEqLeft[1][2]{% + \global\@tempdima=#1em% + \kern\@tempdima% + & + \kern-\@tempdima} +}{} + % this implements a stack that holds a user build mathindent @@ -293,3 +292,52 @@ can only be used after the pgfpages package have been loaded}{} }} + + +\begingroup +\catcode`\_=\active +\gdef\OverloadUnderscoreInMath{% + \protected\gdef_{\@ifnextchar|\subtextup\sb} + \gdef\subtextup|##1|{\sb{\textup{##1}}} + \AtBeginDocument{\catcode`\_=12 \mathcode`\_=32768 } +} +\endgroup +\@onlypreamble\OverloadUnderscoreInMath + + +\@ifundefined{DeclareMathSymbolShorthand}{ + \usepackage{keyval} +\newcommand*\DeclareMathSymbolShorthand[2]{% #1=keyvals, #2=arg. + \begingroup + \setkeys{DMSS}{name=#2,#1}% + \if\DMSS@overwrite % check for overwrite? + \else + \expandafter\@ifdefinable\csname \DMSS@prefix\DMSS@name\endcsname{% + \def\DMSS@overwrite{00}% okay to redefine. + }% + \fi\if\DMSS@overwrite % Do definition or not. + \expandafter\@firstofone + \else\expandafter\@gobble\fi + {\protected\expandafter\xdef\csname \DMSS@prefix\DMSS@name \endcsname{% + \unexpanded\expandafter{\DMSS@format{#2}}% + }}\endgroup} +\define@key{DMSS}{format}{\def\DMSS@format{#1}} +\define@key{DMSS}{name}{\def\DMSS@name{#1}} +\define@key{DMSS}{prefix}{\def\DMSS@prefix{#1}} +\define@key{DMSS}{overwrite}[true]{% + \edef\DMSS@overwrite{\csname if#1\endcsname 00\else 01\fi}} +\setkeys{DMSS}{overwrite=false} +\newcommand\MakeDeclareShorthandCommand[3]{% + % #1 = command name + % #2 = default prefix name + % #3 = default format + % make format macro for eacy reference + \expandafter\@ifdefinable\csname math#2format\endcsname{\@namedef{math#2format}{#3}} + \newcommand#1[2][]{% + \expandafter\DeclareMathSymbolShorthand + \expandafter{format=\csname math#2format\endcsname,prefix=#2,##1}{##2}}} +\MakeDeclareShorthandCommand{\DeclareMathSet}{set}{\mathbb} +}{} % is defined already so do nothing + + + diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty index 32f4652c10a..8c83baffaa2 100644 --- a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty +++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty @@ -1,4 +1,4 @@ -\ProvidesPackage{dlfltxbmarkup}[2008/01/10 v0.65 by daleif] +\ProvidesPackage{dlfltxbmarkup}[2008/08/05 v0.70 by daleif] % This package be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -90,7 +90,7 @@ % leaves a whatsit % \ifoddpage\RaggedRight\else\RaggedLeft\fi% \felineMarginAdjustment% - {\slshape\footnotesize\strut\hspace{0pt}\color{black} #1\strut\par}}} + {\slshape\scriptsize\strut\hspace{0pt}\color{black} #1\strut\par}}} % this might not belong here, but we will leave it for now \strictpagechecktrue% diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbtocconfig.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbtocconfig.sty index 8c34150d82a..07bac330fdb 100644 --- a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbtocconfig.sty +++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbtocconfig.sty @@ -1,4 +1,4 @@ -\ProvidesPackage{dlfltxbtocconfig}[2008/01/22 v0.6 by Lars Madsen] +\ProvidesPackage{dlfltxbtocconfig}[2008/08/05 v0.65 by Lars Madsen] % This package be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -19,6 +19,13 @@ % 20071227 a few internal macros changed to reflect changes in % mempatch 4.9 % 20080122 made the toc titlenames configurable (\contentsname and \shortcontentsname) +% 20080131 bugfix, the \ToCSubsectionIndentsPullBack and +% \ToCSubsectionIndentsBackToNormal should also set toc +% levels, otherwise hyperref bookmarks comes out wrong. +% 20080207 bugfix, \spart renamed to \specialpart, end the bookmark +% for it is removed +% 20080708 small cosmetic changes + % we need to be running under the memoir class \@ifclassloaded{memoir}{}{% @@ -36,12 +43,13 @@ % add a \par to the end of the TOC \AtEndDocument{\addtocontents{toc}{\par}} -% we will use a special spart in the short ToC only the short ToC uses +% we will use a special specialpart in the short ToC only the short ToC uses % this so we define it to do nothing -\providecommand\l@spart[2]{} +\providecommand\l@specialpart[2]{} % similar to \part but only adds something to the ToC -\newcommand\spart[1]{\cleartorecto\phantomsection\addcontentsline{toc}{spart}{\protect\partnumberline{}#1}} - +\newcommand\specialpart[1]{\cleartorecto\phantomsection\addcontentsline{toc}{specialpart}{\protect\partnumberline{}#1}} +% apparently a bookmark level of 100 removes it from the list of book marks +\newcommand\toclevel@specialpart{100}% % this is now directly included in memoir % % the command inserted into the ToC holding the hook @@ -98,12 +106,15 @@ \renewcommand\partnumberline[1]{} % no parts \renewcommand\l@part[2]{} - % we will use spart ToC entries and ignore parts - \renewcommand\l@spart[2]{% + % we will use specialpart ToC entries and ignore parts + \renewcommand\l@specialpart[2]{% \noindent - \qquad\qquad\hrulefill\par% +% \qquad\qquad\hrulefill\par% + \vskip5pt\par \noindent% - \raisebox{-3pt}[0pt][0pt]{\qquad\qquad\parbox[t]{0.35\textwidth}{\itshape\bfseries ##1}}% +% \raisebox{-3pt}[0pt][0pt]{\qquad\qquad\parbox[t]{0.35\textwidth}{\itshape\bfseries ##1}}% +% \raisebox{-4pt}[0pt][0pt]{\qquad\qquad\parbox[t]{0.35\textwidth}{##1}}% + \raisebox{-4pt}[0pt][0pt]{\parbox[t]{0.35\textwidth}{\raggedleft##1} \qquad\qquad}% \vskip-\baselineskip \par } @@ -178,7 +189,8 @@ \begingroup% \fboxsep=2pt% {\parbox{\linewidth-2\fboxsep-2\fboxrule}% - {\itshape\LARGE \strut\hfill {##1} \hfill\strut}}% +% {\itshape\LARGE \strut\hfill {##1} \hfill\strut}}% + {\scshape\Large \strut\hfill {##1} \hfill\strut}}% \endgroup% } @@ -370,9 +382,14 @@ } \newcommand\ToCSubsectionIndentsPullBack{% - \addtocontents{toc}{\protect\cftSubsectionIndentsPullBack}} + \addtocontents{toc}{\protect\cftSubsectionIndentsPullBack}% + \renewcommand\toclevel@subsubsection{2}% +} + \newcommand\ToCSubsectionIndentsBackToNormal{% - \addtocontents{toc}{\protect\cftSubsectionIndentsBackToNormal}} + \addtocontents{toc}{\protect\cftSubsectionIndentsBackToNormal}% + \renewcommand\toclevel@subsubsection{3}% +} % preserving some old syntax \let\RedofelineEmulSubSubSec\ToCSubsectionIndentsBackToNormal |