summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/subdepth
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-09-04 18:08:46 +0000
committerKarl Berry <karl@freefriends.org>2007-09-04 18:08:46 +0000
commit0e84bd293ad2e94ba3327368ad44991e9c70ee22 (patch)
treec54776d6ff5b07548159ccfa3ff9aad5503627fa /Master/texmf-dist/tex/latex/subdepth
parentc9c46ee3e0affbd186d61b95b6cf4db1b0127fb1 (diff)
new package subdepth (3sep07)
git-svn-id: svn://tug.org/texlive/trunk@4876 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/subdepth')
-rw-r--r--Master/texmf-dist/tex/latex/subdepth/subdepth.sty81
1 files changed, 81 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/subdepth/subdepth.sty b/Master/texmf-dist/tex/latex/subdepth/subdepth.sty
new file mode 100644
index 00000000000..010b190bfbe
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/subdepth/subdepth.sty
@@ -0,0 +1,81 @@
+%%
+%% This is file `subdepth.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% subdepth.dtx (with options: `package')
+%%
+%% __________________________________
+%% Copyright (C) 2007 Will Robertson
+%%
+%% License information appended.
+%%
+\ProvidesPackage{subdepth}
+ [2007/09/02 v0.1 Unify subscript depths]
+\@ifpackageloaded{dchem}{\PackageWarning{subdepth incorporated within dchem; aborting loading}\endinput}{}
+\newif\if@wspr@sup@low@
+\DeclareOption{low-sup}{\@wspr@sup@low@true}
+\ProcessOptions
+\addto@hook\every@math@size{\dch@scr@hook}
+\def\dch@scr@adjust{\@ifundefined{dch@sizet\f@size}%
+ {\expandafter\dch@set@script\csname dch@sizet\f@size\endcsname}%
+ {\csname dch@sizet\f@size\endcsname}}
+\def\dch@set@script#1{%
+ \begingroup % fontdimen settings are global anyway
+ \frozen@everymath{}% Prevent recursion!
+ \let#1\@empty
+ \let\dch@do@one\relax
+ \dch@set@one\scriptscriptstyle\scriptscriptfont#1\ssf@size
+ \dch@set@one\scriptstyle\scriptfont#1\sf@size
+ \dch@set@one\textstyle\textfont#1\f@size
+ \endgroup
+ #1}
+\def\dch@set@one#1#2#3#4{%
+ \@ifundefined{dch@size#4}%
+ {\expandafter\xdef\csname dch@size#4\endcsname{%
+ \unless\if@wspr@sup@low@
+ \fontdimen13\the#2\tw@=\the\fontdimen13#2\tw@
+ \fontdimen14\the#2\tw@=\the\fontdimen14#2\tw@
+ \fontdimen15\the#2\tw@=\the\fontdimen15#2\tw@
+ \fi
+ \fontdimen16\the#2\tw@=\the\fontdimen16#2\tw@
+ \fontdimen17\the#2\tw@=\the\fontdimen17#2\tw@}%
+ }{\csname dch@size#4\endcsname}%
+ \setbox\z@\hbox{$#1H_2$}\@tempdima\dp\z@
+ \setbox\z@\hbox{$#1H_2^{+\vrule \@height 1em}$}%
+ \ifdim\@tempdima<\dp\z@
+ \@tempdima\dimexpr (\@tempdima+\dp\z@)/2 \relax
+ \@tempdimb\dimexpr (\dp\z@-\@tempdima+\ht\z@-1em) \relax
+ \xdef#3{#3\dch@do@one#2{\the\@tempdimb}{\the\@tempdima}}%
+ \fi}
+\def\dch@do@one#1#2#3{%
+ \unless\if@wspr@sup@low@
+ \fontdimen13#1\tw@#2\relax
+ \fontdimen14#1\tw@\fontdimen13#1\tw@
+ \fontdimen15#1\tw@\fontdimen13#1\tw@
+ \fi
+ \fontdimen\sixt@@n#1\tw@#3
+ \fontdimen17#1\tw@
+ \fontdimen\sixt@@n#1\tw@}%
+\let\dch@scr@hook\dch@scr@adjust
+\ifx\glb@currsize\f@size
+ \dch@scr@adjust
+\fi
+%%
+%% Copyright (C) 2007 by Will Robertson <wspr81@gmail.com>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Will Robertson.
+%%
+%% This work consists of the file subdepth.dtx
+%% and the derived files subdepth.pdf,
+%% subdepth.sty, and
+%% subdepth.ins.
+%%
+%%
+%% End of file `subdepth.sty'.