diff options
author | Norbert Preining <preining@logic.at> | 2007-11-26 08:17:19 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-11-26 08:17:19 +0000 |
commit | e80f6b7dde3b18e5a08b4b9c0cad21ef7f8fb224 (patch) | |
tree | 1634d6e31bf61120b6219fb6ccb2eec03a747ba2 /Master/texmf-dist/tex/latex/simplewick | |
parent | ab063b6ddc521b0e86d53beafa99d3ed7bd6b664 (diff) |
new package simplewick
git-svn-id: svn://tug.org/texlive/trunk@5597 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/simplewick')
-rw-r--r-- | Master/texmf-dist/tex/latex/simplewick/simplewick.sty | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/simplewick/simplewick.sty b/Master/texmf-dist/tex/latex/simplewick/simplewick.sty new file mode 100644 index 00000000000..3ae4deb2028 --- /dev/null +++ b/Master/texmf-dist/tex/latex/simplewick/simplewick.sty @@ -0,0 +1,167 @@ +%% +%% This is file `simplewick.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% simplewick.dtx (with options: `simplewick.sty,package') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from simplewick.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file simplewick.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% +%% ---- +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +%% MA 02110-1301 USA +%% +%% This work consists of the files simplewick.dtx and simplewick.ins +%% and the derived file simplewick.sty. +%% +%% ---- +%% +%% Original implementation of "contraction" adopted from thophys.sty by +%% Thorsten Ohl. Contractions below expressions ("bcontraction") and +%% stretching/shrinking fix "nomathglue" by Jindrich Kolorenc. +%% +%% ---- +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +%% +%% +%% + +\def\fileversion{v1.2a} +\def\filedate{2007/11/23} +\ProvidesPackage{simplewick}[\filedate\space\fileversion] +\typeout{Package: simplewick \fileversion\space (\filedate)} + +\makeatletter + +\newbox\swb@xone +\newbox\swb@xtwo +\newbox\swb@xthree +\newbox\swb@xfour +\newdimen\swdimen@ne +\newdimen\swdimentw@ + +\newcommand{\acontraction}[5][1ex]{% + \mathchoice + {\acontraction@\displaystyle{#2}{#3}{#4}{#5}{#1}}% + {\acontraction@\textstyle{#2}{#3}{#4}{#5}{#1}}% + {\acontraction@\scriptstyle{#2}{#3}{#4}{#5}{#1}}% + {\acontraction@\scriptscriptstyle{#2}{#3}{#4}{#5}{#1}}}% +\newcommand{\acontraction@}[6]{% + \setbox\swb@xone=\hbox{${}#1{}#2{}$}% + \setbox\swb@xtwo=\hbox{${}#1{}#3{}$}% + \setbox\swb@xthree=\hbox{${}#1{}#4{}$}% + \setbox\swb@xfour=\hbox{${}#1{}#5{}$}% + \swdimen@ne=\wd\swb@xtwo% + \advance\swdimen@ne by \wd\swb@xfour% + \divide\swdimen@ne by 2% + \advance\swdimen@ne by \wd\swb@xthree% + \vbox{% + \hbox to 0pt{% + \kern \wd\swb@xone% + \kern 0.5\wd\swb@xtwo% + \acontraction@@{\swdimen@ne}{#6}% + \hss}% + \vskip 0.5ex% how far above the line starts + \vskip\ht\swb@xtwo}} +\newcommand{\acontracted}[5][1ex]{% + \acontraction[#1]{#2}{#3}{#4}{#5}\ensuremath{#2#3#4#5}} +\newcommand{\acontraction@@}[3][0.05em]{% + \hbox{% + \vrule width #1 height 0pt depth #3% + \vrule width #2 height 0pt depth #1% + \vrule width #1 height 0pt depth #3% + \relax}} +\let\contraction\acontraction + +\newcommand{\bcontraction}[5][1ex]{% + \mathchoice + {\bcontraction@\displaystyle{#2}{#3}{#4}{#5}{#1}}% + {\bcontraction@\textstyle{#2}{#3}{#4}{#5}{#1}}% + {\bcontraction@\scriptstyle{#2}{#3}{#4}{#5}{#1}}% + {\bcontraction@\scriptscriptstyle{#2}{#3}{#4}{#5}{#1}}}% +\newcommand{\bcontraction@}[6]{% + \setbox\swb@xone=\hbox{${}#1{}#2{}$}% + \setbox\swb@xtwo=\hbox{${}#1{}#3{}$}% + \setbox\swb@xthree=\hbox{${}#1{}#4{}$}% + \setbox\swb@xfour=\hbox{${}#1{}#5{}$}% + \swdimen@ne=\wd\swb@xtwo% + \advance\swdimen@ne by \wd\swb@xfour% + \divide\swdimen@ne by 2% + \advance\swdimen@ne by \wd\swb@xthree% + \lower 0.5ex \vbox{% + \hbox to 0pt{% + \kern \wd\swb@xone% + \kern 0.5\wd\swb@xtwo% + \bcontraction@@{\swdimen@ne}{#6}% + \hss}% + }} +\newcommand{\bcontracted}[5][1ex]{% + \bcontraction[#1]{#2}{#3}{#4}{#5}\ensuremath{#2#3#4#5}} +\newcommand{\bcontraction@@}[3][0.05em]{% + \hbox{% + \swdimentw@=#3 + \advance\swdimentw@ by -#1 + \vrule width #1 height 0pt depth #3% + \lower\swdimentw@\hbox{\vrule width #2 height 0pt depth #1}% + \vrule width #1 height 0pt depth #3% + \relax}} + +\makeatother + +\newcommand\nomathglue[1]{ +\begingroup +\thinmuskip=3mu \medmuskip=4mu \thickmuskip=5mu +#1 +\endgroup +} + +\newcommand\simplewickcontact{% +{\tt {k}{o}{l}{o}{r}{e}{n}{c}{\tt @}{f}{z}{u}{.}{c}{z}}% +} + +\endinput +%% +%% End of file `simplewick.sty'. |