diff options
author | Karl Berry <karl@freefriends.org> | 2008-02-12 18:34:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-02-12 18:34:17 +0000 |
commit | ec84cebdc3cbd045b86606318c88d58b99daee7e (patch) | |
tree | 95aaf227e7520b29965a0b4f32cd30a7ecfa28a7 /Master/texmf-dist/tex/latex/dotarrow/DotArrow.sty | |
parent | ae5353483d0cbf7b86fcb2e2118102c1bb6e7e79 (diff) |
new latex package dotarrow (11feb08)
git-svn-id: svn://tug.org/texlive/trunk@6611 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/dotarrow/DotArrow.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/dotarrow/DotArrow.sty | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/dotarrow/DotArrow.sty b/Master/texmf-dist/tex/latex/dotarrow/DotArrow.sty new file mode 100644 index 00000000000..44494978230 --- /dev/null +++ b/Master/texmf-dist/tex/latex/dotarrow/DotArrow.sty @@ -0,0 +1,140 @@ +%% +%% This is file `DotArrow.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% DotArrow.dtx (with options: `package') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from DotArrow.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file DotArrow.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.) +%% DotArrow.dtx +%% Copyright 2007 Sven Schneider + + + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DotArrow}[2007/02/11 draw dotted arrows] + +\RequirePackage{ifthen} + +\PackageInfo{DotArrow}{This is the DotArrow-Package-0.1a} + +\newcommand{\DotArrowSetRaise}[1]{\setlength{\AUTORAISE}{#1}} +\newcommand{\DotArrowSetSep}[1]{\setlength{\AUTOSEP}{#1}} +\newcommand{\DotArrowSetHead}[1]{\renewcommand*{\ARROWHEAD}{\scalebox{.5}[.5]{#1}}} + +\newlength{\AUTOSEP} +\setlength{\AUTOSEP}{0.3em} +\DeclareOption{autosep00}{\DotArrowSetSep{0.0em}} +\DeclareOption{autosep01}{\DotArrowSetSep{0.1em}} +\DeclareOption{autosep02}{\DotArrowSetSep{0.2em}} +\DeclareOption{autosep03}{\DotArrowSetSep{0.3em}} +\DeclareOption{autosep04}{\DotArrowSetSep{0.4em}} +\DeclareOption{autosep05}{\DotArrowSetSep{0.5em}} +\DeclareOption{autosep06}{\DotArrowSetSep{0.6em}} +\DeclareOption{autosep07}{\DotArrowSetSep{0.7em}} +\DeclareOption{autosep08}{\DotArrowSetSep{0.8em}} +\DeclareOption{autosep09}{\DotArrowSetSep{0.9em}} +\DeclareOption{autosep10}{\DotArrowSetSep{1.0em}} + +\newlength{\AUTORAISE} +\setlength{\AUTORAISE}{0.6ex} +\DeclareOption{autoraise00}{\DotArrowSetRaise{0.0ex}} +\DeclareOption{autoraise02}{\DotArrowSetRaise{0.2ex}} +\DeclareOption{autoraise04}{\DotArrowSetRaise{0.4ex}} +\DeclareOption{autoraise06}{\DotArrowSetRaise{0.6ex}} +\DeclareOption{autoraise08}{\DotArrowSetRaise{0.8ex}} +\DeclareOption{autoraise10}{\DotArrowSetRaise{1.0ex}} +\DeclareOption{autoraise12}{\DotArrowSetRaise{1.2ex}} +\DeclareOption{autoraise14}{\DotArrowSetRaise{1.4ex}} +\DeclareOption{autoraise16}{\DotArrowSetRaise{1.6ex}} + +\newcommand*{\ARROWHEAD}{\scalebox{.5}[.5]{$\succ$}} +\DeclareOption{head1}{\DotArrowSetHead{\ensuremath{\succ}}} +\DeclareOption{head2}{\DotArrowSetHead{\ensuremath{>}}} +\DeclareOption{head3}{\DotArrowSetHead{\ensuremath{\gg}}} + +\ProcessOptions\relax + +\newlength{\actualWidth} +\newlength{\oneWidth} +\newlength{\labelWidth} + +\newlength{\labelWidthBack} +\newlength{\captionStart} + +\newlength{\moveUpBars} +\newlength{\moveUpLabel} + +\newlength{\moveSuccHeight} +\newlength{\succHeight} + +\newlength{\WIDTH} +\setlength{\WIDTH}{.4pt} + +\newcommand*{\onePartX}{\raisebox{\moveUpBars}{\rule{2pt}{\WIDTH}}} +\settowidth{\oneWidth}{\onePartX} + +\newcommand{\allPartFront}{ +\setlength{\actualWidth}{0pt} +\onePartX% +\addtolength{\labelWidth}{-\oneWidth} +\addtolength{\actualWidth}{\oneWidth} +} + +\newcommand{\allPart}{% +\ifthenelse{\labelWidth > 0}{% +\hspace*{1.5pt}% +\addtolength{\labelWidth}{-1.5pt}% +\onePartX% +\addtolength{\labelWidth}{-\oneWidth}% +\addtolength{\actualWidth}{\oneWidth}% +\addtolength{\actualWidth}{1.5pt}% +\allPart% +}{% +}% +}% + +\newcommand{\dotarrow}[1]{% +\setlength{\moveUpBars}{.8ex}% +\addtolength{\moveUpBars}{-.5\WIDTH}% +\setlength{\moveUpLabel}{\AUTORAISE}% +\addtolength{\moveUpLabel}{\moveUpBars}% +\addtolength{\moveUpLabel}{\WIDTH}% +\;% +\settowidth{\labelWidthBack}{\hspace*{\AUTOSEP}\scriptsize\ensuremath{#1}\hspace*{\AUTOSEP}}% +\setlength{\labelWidth}{\labelWidthBack}% +\setlength{\captionStart}{\labelWidth}% +\allPartFront{}\allPart% +\addtolength{\captionStart}{\actualWidth}% +\setlength{\captionStart}{.5\captionStart}% +\hspace*{-\captionStart}% +\raisebox{\moveUpLabel}{\hspace*{\AUTOSEP}\scriptsize\ensuremath{#1}\hspace*{\AUTOSEP}}% +\setlength{\captionStart}{\actualWidth}% +\addtolength{\captionStart}{-\labelWidthBack}% +\setlength{\captionStart}{.5\captionStart}% +\hspace*{\captionStart}% +\settoheight{\succHeight}{\ARROWHEAD}% +\setlength{\succHeight}{.5\succHeight}% +\setlength{\moveSuccHeight}{\moveUpBars}% +\addtolength{\moveSuccHeight}{.5\WIDTH}% +\addtolength{\moveSuccHeight}{-\succHeight}% +\raisebox{\moveSuccHeight}{\ARROWHEAD}% +\;% +}% +\endinput +%% +%% End of file `DotArrow.sty'. |