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/source/latex/dotarrow | |
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/source/latex/dotarrow')
-rw-r--r-- | Master/texmf-dist/source/latex/dotarrow/DotArrow.dtx | 298 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/dotarrow/DotArrow.ins | 43 |
2 files changed, 341 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/dotarrow/DotArrow.dtx b/Master/texmf-dist/source/latex/dotarrow/DotArrow.dtx new file mode 100644 index 00000000000..5acd6049a8f --- /dev/null +++ b/Master/texmf-dist/source/latex/dotarrow/DotArrow.dtx @@ -0,0 +1,298 @@ +%% DotArrow.dtx +%% Copyright 2007 Sven Schneider +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% 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.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Sven Schneider. +% +% This work consists of the files DotArrow.dtx, README, DotArrow.pdf and DotArrow.ins +% and the derived file DotArrow.sty, DotArrow.tex. + +% Version 0.01a + +%<*driver> +\documentclass{ltxdoc} + + +\usepackage[utf8]{inputenc} +\usepackage{epsfig,ifthen,amsmath} + +\usepackage{DotArrow} + +\title{The DotArrow-Package\\ -- Dotted Extendable Arrows --} +\author{Sven Schneider} + +\setlength{\parindent}{0pt} +\begin{document} +\maketitle + +\begin{abstract} +This package defines a new extendable arrow. This time its a dotted one. +\end{abstract} +\tableofcontents +\section{Simple Usage} +\DescribeMacro{\dotarrow} + $S\dotarrow{\kappa}S^\prime$\\ + \verb+$S\dotarrow{\kappa}S^\prime$+ +\section{Package - Options} +\DescribeMacro{Option:autosep**} + These Package-Options can be used to adjust the space on left and right to the label. The default is autosep03. + + \begin{center} + \begin{tabular}{ll} + autosep00 & \DotArrowSetSep{0.0em}$S\dotarrow{\kappa}S^\prime$\\ + autosep01 & \DotArrowSetSep{0.1em}$S\dotarrow{\kappa}S^\prime$\\ + autosep02 & \DotArrowSetSep{0.2em}$S\dotarrow{\kappa}S^\prime$\\ + autosep03 & \DotArrowSetSep{0.3em}$S\dotarrow{\kappa}S^\prime$\\ + autosep04 & \DotArrowSetSep{0.4em}$S\dotarrow{\kappa}S^\prime$\\ + autosep05 & \DotArrowSetSep{0.5em}$S\dotarrow{\kappa}S^\prime$\\ + autosep06 & \DotArrowSetSep{0.6em}$S\dotarrow{\kappa}S^\prime$\\ + autosep07 & \DotArrowSetSep{0.7em}$S\dotarrow{\kappa}S^\prime$\\ + autosep08 & \DotArrowSetSep{0.8em}$S\dotarrow{\kappa}S^\prime$\\ + autosep09 & \DotArrowSetSep{0.9em}$S\dotarrow{\kappa}S^\prime$\\ + autosep10 & \DotArrowSetSep{1.0em}$S\dotarrow{\kappa}S^\prime$ + \end{tabular} + \end{center} + +\DescribeMacro{Option:autoraise**} + These Package-Options can be used to adjust the space between label and arrow. The default is autosep06. + + \begin{center} + \begin{tabular}{ll} + autoraise00 & \DotArrowSetRaise{0.0ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise01 & \DotArrowSetRaise{0.1ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise02 & \DotArrowSetRaise{0.2ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise03 & \DotArrowSetRaise{0.3ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise04 & \DotArrowSetRaise{0.4ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise05 & \DotArrowSetRaise{0.5ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise06 & \DotArrowSetRaise{0.6ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise07 & \DotArrowSetRaise{0.7ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise08 & \DotArrowSetRaise{0.8ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise09 & \DotArrowSetRaise{0.9ex}$S\dotarrow{\kappa}S^\prime$\\ + autoraise10 & \DotArrowSetRaise{1.0ex}$S\dotarrow{\kappa}S^\prime$ + \end{tabular} + \end{center} + +\DescribeMacro{Option:head*} + These Package-Options can be used to choose a different head. The default is head1. + + \begin{center} + \begin{tabular}{ll} + head1 & \DotArrowSetHead{\ensuremath{\succ}}$S\dotarrow{\kappa}S^\prime$\\ + head2 & \DotArrowSetHead{\ensuremath{>}}$S\dotarrow{\kappa}S^\prime$\\ + head3 & \DotArrowSetHead{\ensuremath{\gg}}$S\dotarrow{\kappa}S^\prime$ + \end{tabular} + \end{center} + +\section{Commands} +\DescribeMacro{\DotArrowSetSep} + Select a new separation-value. \verb+\DotArrowSetRaise{0.3em}+ + +\DescribeMacro{\DotArrowSetRaise} + Select a new raisevalue. \verb+\DotArrowSetRaise{0.6ex}+ + +\DescribeMacro{\DotArrowSetHead} + Select a new arrowhead. \verb+\DotArrowSetHead{\ensuremath{\succ}}+ + + +% \noindent +% +% \setlength{\WIDTH}{.2pt} +% $S\dotarrow{\;\;\kappa\;\;}S^\prime$ \quad $S\xrightarrow{\;\;\kappa\;\;}S$\\ +% \setlength{\WIDTH}{.3pt} +% $S\dotarrow{\;\;\kappa\;\;}S^\prime$ \quad $S\xrightarrow{\;\;\kappa\;\;}S$\\ +% \setlength{\WIDTH}{.4pt} +% $S\dotarrow{\;\;\kappa\;\;}S^\prime$ \quad $S\xrightarrow{\;\;\kappa\;\;}S$\\ +% \setlength{\WIDTH}{.5pt} +% $S\dotarrow{\;\;\kappa\;\;}S^\prime$ \quad $S\xrightarrow{\;\;\kappa\;\;}S$\\ +% \setlength{\WIDTH}{.6pt} +% $S\dotarrow{\;\;\kappa\;\;}S^\prime$ \quad $S\xrightarrow{\;\;\kappa\;\;}S$\\ +% \setlength{\WIDTH}{.7pt} +% $S\dotarrow{\;\;\kappa\;\;}S^\prime$ \quad $S\xrightarrow{\;\;\kappa\;\;}S$\\ +% \setlength{\WIDTH}{.8pt} +% $S\dotarrow{\;\;\kappa\;\;}S^\prime$ \quad $S\xrightarrow{\;\;\kappa\;\;}S$\\ +% \setlength{\WIDTH}{.9pt} +% $S\dotarrow{\;\;\kappa\;\;}S^\prime$ \quad $S\xrightarrow{\;\;\kappa\;\;}S$\\ +% \setlength{\WIDTH}{2pt} +% $S\dotarrow{\;\;\kappa\;\;}S^\prime$ \quad $S\xrightarrow{\;\;\kappa\;\;}S$\\ +% \setlength{\WIDTH}{.4pt} +% +% $S\dotarrow{\;\;S\dotarrow{\;\;S\dotarrow{\;\;S\dotarrow{\;\;S\dotarrow{\;\;S\dotarrow{\;\;\kappa\;\;}S^\prime\;\;}S^\prime\;\;}S^\prime\;\;}S^\prime\;\;}S^\prime\;\;}S^\prime$\\ +% +% $S\dotarrow{\kappa\kappa\kappa}S^\prime$ +% +% \DotArrowSetSep{3em} +% +% $S\dotarrow{\kappa\kappa\kappa}S^\prime$ +% +% \noindent +% $S\vcenter{\rule{2pt}{.4pt}\hspace*{1pt}\rule{2pt}{.4pt}\hspace*{1pt}\rule{2pt}{.4pt}}\vcenter{$\succ$}S$\\ +% $S\rule{2pt}{.4pt}\hspace*{1pt}\rule{2pt}{.4pt}\hspace*{1pt}\rule{2pt}{.4pt}\succ S$ +\end{document} +%</driver> + +%<*package> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DotArrow}[2007/02/11 draw dotted arrows] + +\RequirePackage{ifthen} + +\PackageInfo{DotArrow}{This is the DotArrow-Package-0.1a} + +% #################################################### +% Define Setters +% #################################################### +\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 - commands +% ################################################## +% width of the printed horizontal bars +\newlength{\actualWidth} +% the width of one horizontal bar +\newlength{\oneWidth} +% the width of the text on top of the arrow +\newlength{\labelWidth} + +% second store for the \labelWidth (the \labelWidth is used for calculation) +\newlength{\labelWidthBack} +% the distance to go backwards/forwards to print the +% label/to print the arrowhead +\newlength{\captionStart} + +% the distance of the bars from the baseline +\newlength{\moveUpBars} +% the distance of the label from the baseline +\newlength{\moveUpLabel} + +% the distance the arrowhead is moved up +\newlength{\moveSuccHeight} +\newlength{\succHeight} +% \newcommand*{\ARROWHEAD}{\scalebox{.5}[.5]{$\succ$}} + +% ################################################## +% \onePartX : prints one horizontal bar +% ################################################## +\newlength{\WIDTH} +\setlength{\WIDTH}{.4pt} + +% this is one single horizontal bar +% \newcommand{\onePartX}{\raisebox{\moveUpBars}{\rule{2pt}{\WIDTH}}} +\newcommand*{\onePartX}{\raisebox{\moveUpBars}{\rule{2pt}{\WIDTH}}} +% oneWidth is the width of one such bar +\settowidth{\oneWidth}{\onePartX} + +% ################################################## +% \allPartFront : print the first bar without any space around it +% ################################################## +\newcommand{\allPartFront}{ + % determine the actual width of the horizontal bars: + \setlength{\actualWidth}{0pt} + \onePartX% + \addtolength{\labelWidth}{-\oneWidth} + \addtolength{\actualWidth}{\oneWidth} +} + +% ################################################## +% \allPartFront : prints all further bars with space on the left side +% ################################################## +\newcommand{\allPart}{% + \ifthenelse{\labelWidth > 0}{% + \hspace*{1.5pt}% + \addtolength{\labelWidth}{-1.5pt}% + \onePartX% + \addtolength{\labelWidth}{-\oneWidth}% + \addtolength{\actualWidth}{\oneWidth}% + \addtolength{\actualWidth}{1.5pt}% + \allPart% + }{% + }% +}% + +% ################################################## +% \dotarrow : draws the whole arrow +% ################################################## +\newcommand{\dotarrow}[1]{% + \setlength{\moveUpBars}{.8ex}% + \addtolength{\moveUpBars}{-.5\WIDTH}% + \setlength{\moveUpLabel}{\AUTORAISE}% + \addtolength{\moveUpLabel}{\moveUpBars}% + \addtolength{\moveUpLabel}{\WIDTH}% + % print a little space at the left side + \;% + % get the width of the label + \settowidth{\labelWidthBack}{\hspace*{\AUTOSEP}\scriptsize\ensuremath{#1}\hspace*{\AUTOSEP}}% + \setlength{\labelWidth}{\labelWidthBack}% + \setlength{\captionStart}{\labelWidth}% + % and print the horizontal bars + \allPartFront{}\allPart% + % determine the space to go back to print the label + \addtolength{\captionStart}{\actualWidth}% + \setlength{\captionStart}{.5\captionStart}% + % now go back + \hspace*{-\captionStart}% + % print the label + \raisebox{\moveUpLabel}{\hspace*{\AUTOSEP}\scriptsize\ensuremath{#1}\hspace*{\AUTOSEP}}% + % determine the space to go forward + \setlength{\captionStart}{\actualWidth}% + \addtolength{\captionStart}{-\labelWidthBack}% + \setlength{\captionStart}{.5\captionStart}% + % and go forward + \hspace*{\captionStart}% + % print the top of the arrow + % arrowhead distance-calculation: + \settoheight{\succHeight}{\ARROWHEAD}% + \setlength{\succHeight}{.5\succHeight}% + \setlength{\moveSuccHeight}{\moveUpBars}% + \addtolength{\moveSuccHeight}{.5\WIDTH}% + \addtolength{\moveSuccHeight}{-\succHeight}% + \raisebox{\moveSuccHeight}{\ARROWHEAD}% + % print a little space at the right side + \;% +}% +%</package>
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/dotarrow/DotArrow.ins b/Master/texmf-dist/source/latex/dotarrow/DotArrow.ins new file mode 100644 index 00000000000..cdebc58ee78 --- /dev/null +++ b/Master/texmf-dist/source/latex/dotarrow/DotArrow.ins @@ -0,0 +1,43 @@ +%% DotArrow.ins +%% Copyright 2007 Sven Schneider +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% 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.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Sven Schneider. +% +% This work consists of the files DotArrow.dtx, README, DotArrow.pdf and DotArrow.ins +% and the derived file DotArrow.sty, DotArrow.tex. + +Version 0.01a + +\def\filedate{2007/02/11} +\input docstrip + +\keepsilent +\askforoverwritefalse + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\generate{ + \file{DotArrow.sty}{\from{DotArrow.dtx}{package}} + \file{DotArrow.tex}{\from{DotArrow.dtx}{driver}} +} + +\Msg{***************************************************************} +\Msg{*} +\Msg{* \space To finish the installation you have to copy the file } +\Msg{*} +\Msg{* \space DotArrow.sty into a directory searched by TeX} +\Msg{*} +\Msg{***************************************************************} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endbatchfile |