diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-13 00:01:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-13 00:01:05 +0000 |
commit | 7dc48e4d760aa8e703387e96794effaad3c24a78 (patch) | |
tree | 7d99efb2359a56ffe56c80d6c2192ffcc41e2d92 /Master/texmf-dist/tex/latex/oberdiek/chemarr.sty | |
parent | fd257bd5c75a905dfa0ca6e3e507d9ed29338e1f (diff) |
oberdiek
git-svn-id: svn://tug.org/texlive/trunk@1150 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/chemarr.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/chemarr.sty | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/chemarr.sty b/Master/texmf-dist/tex/latex/oberdiek/chemarr.sty new file mode 100644 index 00000000000..defcfb3b925 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/chemarr.sty @@ -0,0 +1,77 @@ +% File: chemarr.sty +% Version: 2001/06/22 v1.1 +% Author: Heiko Oberdiek +% Email: <oberdiek@uni-freiburg.de> +% +% Copyright: Copyright (C) 2001 Heiko Oberdiek. +% +% This program may be distributed and/or modified under +% the conditions of the LaTeX Project Public License, +% either version 1.2 of this license or (at your option) +% any later version. The latest version of this license +% is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions +% of LaTeX version 1999/12/01 or later. +% +% Function: Very often chemists need a longer version +% of reaction arrows (\rightleftharpoons) with +% the possibility to put text above and below. +% Analogous to amsmath's \xrightarrow and +% \xleftarrow this package provides the macro +% \xrightleftharpoons. +% +% Requirement: amsmath +% Use: LaTeX: \usepackage{chemarr} +% \xrightleftharpoons[below]{above} +% +% History: 2001/06/21 v1.0: +% * first public version +% 2001/06/22 v1.1: +% * documentation fixes +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{chemarr}% + [2001/06/22 v1.1 Chemical reaction arrows (HO)] +% +\RequirePackage{amsmath} +% The package amsmath is needed for the following commands: +% \ext@arrow, \@ifnotempty, \arrowfill@ +% \relbar, \std@minus +% \@ifempty, \@xifempty, \@xp +% +% In fontmath.ltx \rightleftharpoons is defined with +% a vertical space of 2pt. +% +\newcommand{\xrightleftharpoons}[2][]{% + \ensuremath{% + \mathrel{% + \settoheight{\dimen@}{\raise 2pt\hbox{$\rightharpoonup$}}% + \setlength{\dimen@}{-\dimen@}% + \edef\CA@temp{\the\dimen@}% + \settoheight\dimen@{$\rightleftharpoons$}% + \addtolength{\dimen@}{\CA@temp}% + \raisebox{\dimen@}{% + \rlap{% + \raisebox{2pt}{% + $% + \ext@arrow 0359\rightharpoonupfill@{\hphantom{#1}}{#2}% + $% + }% + }% + \hbox{% + $% + \ext@arrow 3095\leftharpoondownfill@{#1}{\hphantom{#2}}% + $% + }% + }% + }% + }% +} +\newcommand*{\leftharpoondownfill@}{% + \arrowfill@\leftharpoondown\relbar\relbar +} +\newcommand*{\rightharpoonupfill@}{% + \arrowfill@\relbar\relbar\rightharpoonup +} +\endinput |