diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:54:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:54:02 +0000 |
commit | c5fbfa560c0d2bd40a05f5b6a2f2a4d91bb68cf2 (patch) | |
tree | 9becea1434e7eab6b1dcb315eb65c9fc6578d887 /Master/texmf-dist | |
parent | c6c7be53ce73db70419555ec68104145679d64a8 (diff) |
dashrule
git-svn-id: svn://tug.org/texlive/trunk@815 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/tex/latex/dashrule/dashrule.sty | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/dashrule/dashrule.sty b/Master/texmf-dist/tex/latex/dashrule/dashrule.sty new file mode 100644 index 00000000000..826407dd13b --- /dev/null +++ b/Master/texmf-dist/tex/latex/dashrule/dashrule.sty @@ -0,0 +1,67 @@ +%% +%% This is file `dashrule.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% dashrule.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2001 Scott Pakin <pakin@uiuc.edu> +%% ------------------------------------------------------- +%% +%% This package 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. +%% +%% File: dashrule.dtx Copyright (C) 2001 Scott Pakin <pakin@uiuc.edu> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{dashrule} + [2001/04/23 v1.00 Dashed rules (SDP)] +\def\hdr@do@rule[#1]#2#3{% + \rule[#1]{#2}{#3}% + \let\hdr@do@something=\hdr@do@skip +} +\def\hdr@do@skip[#1]#2#3{% + \hspace*{#2}% + \let\hdr@do@something=\hdr@do@rule +} +\newcounter{hdr@segments} +\def\hdr@tally@segments#1 {% + \ifx#1!% + \else + \addtocounter{hdr@segments}{1}% + \expandafter\hdr@tally@segments% + \fi +} +\DeclareRobustCommand{\hdashrule}{\@testopt{\hdashrule@i}{0pt}} +\def\hdashrule@i[#1]{\@testopt{\hdashrule@ii[#1]}\empty} +\def\hdashrule@ii[#1][#2]#3#4#5{% + \let\hdr@do@something=\hdr@do@rule + \def\hdr@parse@dash##1 {% + \ifx##1!% + \else + \hdr@do@something[#1]{##1}{#4}% + \expandafter\hdr@parse@dash% + \fi + }% + \setcounter{hdr@segments}{0}% + \hdr@tally@segments#5 ! + \ifodd\c@hdr@segments + \csname#2leaders\endcsname% + \hbox{\hdr@parse@dash#5 #5 ! }% + \hskip#3\relax + \else + \csname#2leaders\endcsname% + \hbox{\hdr@parse@dash#5 ! }% + \hskip#3\relax + \fi% +} +\endinput +%% +%% End of file `dashrule.sty'. |