summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:10:47 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:10:47 +0000
commit85775d7817306c4876c2117f6d395f2fa58556e4 (patch)
tree8348a4bd9933c5c1c1d71376ff9032ebce44de12 /Master/texmf-dist
parentaecf00b6194ca5a39ecd7615c6b2beaa35fdcaae (diff)
ushort
git-svn-id: svn://tug.org/texlive/trunk@1433 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/tex/latex/ushort/ushort.sty111
1 files changed, 111 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ushort/ushort.sty b/Master/texmf-dist/tex/latex/ushort/ushort.sty
new file mode 100644
index 00000000000..f0781fb37c3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ushort/ushort.sty
@@ -0,0 +1,111 @@
+%%
+%% This file was generated by the docstrip utility from ushort.dtx.
+%% You may distribute this file only together with the source ushort.dtx
+%% (and if possible with ushort.ins) and only if these files are unmodified.
+%%
+%% Author:
+%%
+%% M. V\"ath vaeth@mathematik.uni-wuerzburg.de
+%%
+
+\ifx\typeout\undefined
+ \def\ushrt@tmp{\immediate\write17}
+\else
+ \let\ushrt@tmp\typeout
+\fi
+\ushrt@tmp{ushort.sty by M. Vaeth: Release: 2.1 }
+
+%% First, some LaTeX support:
+
+\ifx\ProvidesPackage\undefined\else
+ \ProvidesPackage{ushort}[2001/06/07 v2.1]
+\fi
+
+\ifx\newcommand\undefined\else
+ \newcommand{\ushort}{}
+ \newcommand{\ushortd}{}
+ \newcommand{\ushortdline}{}
+ \newcommand{\ushortCreate}{}
+ \newcommand{\ushortEnsuremath}{}
+\fi
+
+\def\ushortCreate{\let\ushrt@calc\ushrt@empty\let\ushrt@TextMode\undefined
+ \def\ushrt@FactorAfter{0.8}\let\ushrt@FactorBefore\ushrt@calc
+ \let\ushrt@Summand\ushrt@empty\def\ushrt@cmd{\underline}\ushrt@TestLoop}
+\def\ushrt@TestLoop{\ushrt@TestAndExec*\ushrt@Star\ushrt@TestCommand}
+\def\ushrt@Star*{\def\ushrt@cmd{\underbar}\let\ushrt@TextMode\ushrt@empty
+ \ushrt@TestLoop}
+\def\ushrt@TestCommand{\ushrt@TestAndExec:\ushrt@GetCommand\ushrt@TestCalc}
+\def\ushrt@GetCommand:#1{\def\ushrt@cmd{#1}\ushrt@TestLoop}
+\def\ushrt@TestCalc{\ushrt@TestAndExec+\ushrt@GetCalc\ushrt@TestSummand}
+\def\ushrt@GetCalc+#1{\def\ushrt@calc{#1}\ushrt@TestLoop}
+\def\ushrt@TestSummand{\ushrt@TestAndExec[%]
+ \ushrt@GetSummand\ushrt@TestFactorBefore}
+\def\ushrt@GetSummand[#1]{\def\ushrt@Summand{\advance\dimen0 by#1}%
+ \ushrt@TestLoop}
+\def\ushrt@TestFactorBefore{\ushrt@TestAndExec<%>
+ \ushrt@GetFactorBefore\ushrt@TestFactorAfter}
+\def\ushrt@GetFactorBefore<#1>{\def\ushrt@FactorBefore{#1}\ushrt@TestLoop}
+\def\ushrt@TestFactorAfter{\ushrt@TestAndExec(%)
+ \ushrt@GetFactorAfter\ushrt@Main}
+\def\ushrt@GetFactorAfter(#1){\def\ushrt@FactorAfter{#1}\ushrt@TestLoop}
+
+\def\ushrt@TestAndExec#1#2#3{%
+ \ushrt@SkipAndExec{%
+ \ifx\ushrt@NextToken#1%
+ \def\ushrt@exec{#2}%
+ \else
+ \def\ushrt@exec{#3}%
+ \fi
+ \ushrt@exec}}
+\def\ushrt@SkipAndExec#1{\def\ushrt@tmp{#1}\ushrt@skip}
+\def\ushrt@skip{\futurelet\ushrt@NextToken\ushrt@tmp}
+
+\def\ushrt@Main#1{\def\ushrt@exec{\ushrt@Define}\ushrt@ExpandLoop
+ \ushrt@cmd\ushrt@calc\ushrt@Summand\ushrt@FactorBefore\ushrt@FactorAfter
+ {\csname#1\endcsname}{\csname ushrt@#1\endcsname}{}}
+
+\def\ushrt@ExpandLoop#1{\def\ushrt@tmp{#1}%
+ \ifx\ushrt@tmp\ushrt@empty
+ \let\ushrt@tmp\ushrt@exec
+ \else
+ \let\ushrt@tmp\ushrt@ExpandLoop
+ \expandafter\ushrt@Expand\expandafter{#1}%
+ \fi\ushrt@tmp}
+\def\ushrt@Expand#1{\expandafter
+ \def\expandafter\ushrt@exec\expandafter{\ushrt@exec{#1}}}
+
+\def\ushrt@Define#1#2#3#4#5#6#7{%
+ \def#6##1{\ushortEnsuremath{\mathpalette#7{##1}##1}}%
+ \ifx\ushrt@TextMode\undefined
+ \def#7##1##2{\hbox to 0pt{{\mathsurround0pt$#1{%
+ {\setbox0\hbox{\mathsurround0pt$##1##2$}%
+ \dimen0=#4\wd0#3\dimen1\ht0\dimen2\dp0#2%
+ \setbox0\hbox to#5\dimen0{}\ht0\dimen1\dp0\dimen2%
+ \box0}}$\hss}}}
+ \else
+ \def#7##1##2{\hbox to 0pt{#1{%
+ {\setbox0\hbox{\mathsurround0pt$##1##2$}%
+ \dimen0=#4\wd0#3\dimen1\ht0\dimen2\dp0#2%
+ \setbox0\hbox to#5\dimen0{}\ht0\dimen1\dp0\dimen2%
+ \box0}}\hss}}
+ \fi}
+
+\def\ushortEnsuremath{\relax
+ \ifmmode
+ \let\ushrt@exec\ushrt@NoSwitch
+ \else
+ \let\ushrt@exec\ushrt@Switch
+ \fi\ushrt@exec}
+\def\ushrt@NoSwitch#1{#1}
+\def\ushrt@Switch#1{\relax$#1\relax$\relax}
+
+\def\ushrt@empty{}
+
+\ushortCreate{ushort}
+
+\ushortCreate:\ushortdline{ushortd}
+\def\ushortdline#1{\underline{\underline #1}}
+\endinput
+%%
+%% End of file `ushort.sty'.