summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-06-02 22:51:05 +0000
committerKarl Berry <karl@freefriends.org>2007-06-02 22:51:05 +0000
commitf7abbe11ae8b67804ec79e82c1ae107392b325e0 (patch)
treea3947220e255c98274cc193cbeda3718f764dee9 /Master/texmf-dist/tex
parent4dc41c7ce0ba9d2d0f679d1d6825b5b29a4ccb35 (diff)
-mdlfltxb update (1jun07)
git-svn-id: svn://tug.org/texlive/trunk@4406 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty65
1 files changed, 36 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty
index 752777feaa3..e09446ebe6c 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/05/07 v0.1 by Lars 'daleif' Madsen]
+\ProvidesPackage{dlfltxbcodetips}[2007/06/01 v0.2 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
@@ -19,7 +19,12 @@
%%
-
+% HISTORY
+%
+% 20070601 Added better implementation of \nuparrow, \ndownarrow and
+% \bigtimes, all due to Enrico Gregorio
+% also made the environment uded inside \NewShadedTheorem
+% configurable.
\RequirePackage{amsmath,amssymb}
@@ -62,6 +67,8 @@
% currently only ntheorem is supported (perhaps support for amsthm or
% theorem will be added later)
% has the same syntax as \newtheorem
+
+\newcommand\NTSshadeenvironment{shaded}
\newcommand\NewShadedTheorem[1]{%
\@ifnextchar[{\NST@levelii{#1}}{\NST@levelii{#1}[]}}
\def\NST@levelii#1[#2]#3{%
@@ -85,16 +92,16 @@
\newtheorem{#1@inner}[#2]{#3}%
\fi%
\newenvironment{#1}{%
- \begin{shaded}%
+ \begin{\NTSshadeenvironment}%
\setlength\theorempreskipamount{0pt}%
\setlength\theorempostskipamount{0pt}%
- \begin{#1@inner}}{\end{#1@inner}\end{shaded}\@endparenv}%
+ \begin{#1@inner}}{\end{#1@inner}\end{\NTSshadeenvironment}\@endparenv}%
\newtheorem*{#1@innerstr}{#3}
\newenvironment{#1*}{%
- \begin{shaded}%
+ \begin{\NTSshadeenvironment}%
\setlength\theorempreskipamount{0pt}%
\setlength\theorempostskipamount{0pt}%
- \begin{#1@innerstr}}{\end{#1@innerstr}\end{shaded}\@endparenv}%
+ \begin{#1@innerstr}}{\end{#1@innerstr}\end{\NTSshadeenvironment}\@endparenv}%
}
% Mathematics into Type by Ellen Swanson recommends that line-broken
@@ -136,32 +143,32 @@
\setlength{\global\MathIndentLength}{\@tempdimc}#1}
-% constructs a \bigtimes symbol, in the same category as e.g. \sum
-% etc. Since we are using \DeclareMathOperator, the amsmath package is
-% required, thus autoloaded by this pacakge
-\newcommand\SNYDINTERN[1]{\vcenter{{\hbox{#1\ensuremath\times}}}}
-\newcommand\SNYD{%
- \mathchoice{\SNYDINTERN\huge\displaystyle}% display style
- {\SNYDINTERN\LARGE\textstyle\mkern-3.5mu} % text style
- {\SNYDINTERN{}\scriptstyle\mkern-2mu} % script style
- {\SNYDINTERN\footnotesize\scriptscriptstyle\mkern-2mu}% script script style
+% this constructs a version of \bigtimes. The version here is due to
+% Enrico Gregorio, presented in http://groups.google.com/group/comp.text.tex/msg/9685c9405df2ff94
+
+\newcommand\dlf@b@gtimes[1]{%
+ \vcenter{\hbox{#1$\m@th\mkern-2mu\times\mkern-2mu$}}}
+\newcommand\dlf@bigtimes{%
+ \mathchoice{\dlf@b@gtimes\huge} % display style
+ {\dlf@b@gtimes\LARGE} % text style
+ {\dlf@b@gtimes{}} % script style
+ {\dlf@b@gtimes\footnotesize} % script script style
}
-\DeclareMathOperator*\bigtimes{\SNYD}
-
-
-% constructor for creating negated \up/downarrow
-% requires graphicx
-\newcommand*\nrotarrowconstructor[2]{%
- \mathrel{\m@th\sbox\z@{$ #1 $}%
- \raisebox{1.3\dp\z@}{%
- \makebox[\wd\z@][c]{%
- \reflectbox{\rotatebox[origin=cB]{90}{$ #2 $}}%
- \kern0.32\wd\z@%
- }}}%
+\newcommand\bigtimes{\mathop{\dlf@bigtimes}\displaylimits}
+
+% better construction fro \nuparrow and \ndownarrow, se also
+% http://groups.google.com/group/comp.text.tex/msg/689cc8bd604fdb51
+% again due to Enrico Gregorio
+% construction requires graphicx
+\def\dlf@nrotarrow#1#2{%
+ \setbox0=\hbox{$\m@th#1\uparrow$}\dimen0=\dp0
+ \setbox0=\hbox{%
+ \reflectbox{\rotatebox[origin=c]{90}{$\m@th#1\mkern2.22mu #2$}}}%
+ \dp0=\dimen0 \box0 \mkern2.3965mu
}
-\newcommand\nuparrow{\nrotarrowconstructor\uparrow\nrightarrow}
-\newcommand\ndownarrow{\nrotarrowconstructor\downarrow\nleftarrow}
+\def\nuparrow{\mathrel{\mathpalette\dlf@nrotarrow\nrightarrow}}
+\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