summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ncctools/nccrules.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:00:29 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:00:29 +0000
commit8b8fbae5990dee3b8ab739df0de8b7c365e4d227 (patch)
tree824392c1bb07fe8c8b620efd3992cc0daa3e433a /Master/texmf-dist/tex/latex/ncctools/nccrules.sty
parente9351f8ac4f8603d6020be78e092e939e24d89d0 (diff)
ncctools
git-svn-id: svn://tug.org/texlive/trunk@1132 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ncctools/nccrules.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ncctools/nccrules.sty126
1 files changed, 126 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ncctools/nccrules.sty b/Master/texmf-dist/tex/latex/ncctools/nccrules.sty
new file mode 100644
index 00000000000..8d9bf8802e9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ncctools/nccrules.sty
@@ -0,0 +1,126 @@
+%%
+%% This is file `nccrules.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% nccrules.dtx (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% This file is a generated file from the sources of the `ncctools'
+%% bundle.
+%%
+%% You are not allowed to modify this file.
+%%
+%% You are allowed to distribute this file if and only if
+%% it is distributed with the corresponding source files in
+%% the `ncctools' bundle.
+%%
+%% For the copying and distribution conditions of the source files,
+%% see the README file distributed with the ncctools bundle.
+%%
+%% File: nccrules.dtx Copyright (C) 2005 by Alexander I. Rozhenko
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{nccrules}
+ [2005/05/13 v1.0 More rules (NCC)]
+\RequirePackage{mboxfill}
+\newcommand\dashrule{}
+\DeclareRobustCommand*\dashrule[3][\z@]{%
+ \setbox\@tempboxa\vbox{}%
+ \NCC@composedash{\NCC@vdash{#2}}{#3}%
+ \setlength\@tempdima{#1}\leavevmode
+ \raise\@tempdima\hbox{%
+ \vbox to\@tempdimc{\vss\unvbox\@tempboxa\vss}}%
+}
+\newcommand*\dashrulefill[1][\z@]{%
+ \@ifnextchar[{\NCC@dashfill{#1}}{\NCC@dashfill{#1}[]}%
+}
+\def\NCC@dashfill#1[#2]#3#4{%
+ \NCC@composedash{}{#3}%
+ \advance\@tempdimb-\@tempdimc
+ \setbox\@tempboxa\hb@xt@-\@tempdimb
+ {\hss\dashrule[#1]{#3}{#4}\hss}%
+ \mboxfill[\@tempdimc][#2]{\box\@tempboxa}%
+}
+\def\NCC@composedash#1#2{%
+ \@tempdimb\z@ % Last space
+ \@tempdimc\z@ % Accumulator
+ \@tempswatrue % True value means producing an entry
+ \NCC@parsedash#2 ! !\@nil{%
+ \advance\@tempdimc\@tempdima
+ \if@tempswa #1\@tempswafalse \else
+ \@tempdimb\@tempdima \@tempswatrue
+ \fi
+ }%
+}
+\def\NCC@parsedash#1 #2\@nil#3{%
+ \if/#1/\else % Empty arg. ignored
+ \ifx#1!\else % Exclamation mark ends the list
+ \@defaultunits\@tempdima#1pt\relax\@nnil
+ #3\NCC@parsedash#2\@nil{#3}%
+ \fi
+ \fi
+}
+\def\NCC@vdash#1{%
+ \setbox\@tempboxa\vbox{%
+ \unvbox\@tempboxa \vskip\@tempdimb
+ \setbox\@tempboxa\hbox{}%
+ \@tempskipa\@tempdima % Save rule height in \@tempskipa
+ \NCC@composedash{\NCC@hdash}{#1}%
+ \hb@xt@\@tempdimc{\hss\unhbox\@tempboxa\hss}%
+ }%
+}
+\def\NCC@hdash{%
+ \setbox\@tempboxa\hbox{%
+ \unhbox\@tempboxa \kern\@tempdimb
+ \vrule \@width\@tempdima \@height\@tempskipa
+ }%
+}
+\def\NCC@fnoterule#1#2{%
+ \setlength\@tempdima{#1}%
+ \setbox\@tempboxa\hb@xt@\@tempdima{#2}%
+ \@tempdima\ht\@tempboxa \advance\@tempdima\dp\@tempboxa
+ \@tempdimb 2.8\p@ \@tempdimc .5\@tempdima
+ \ifdim\@tempdimc>\@tempdimb \@tempdimb\@tempdimc \fi
+ \advance\@tempdimb\@tempdimc
+ \kern-\@tempdimb
+ \box\@tempboxa
+ \advance\@tempdimb -\@tempdima
+ \kern\@tempdimb
+}
+\def\NCC@fnotedashrule#1#2#3{%
+ \NCC@fnoterule{#1}{\def\@tempa{#2}%
+ \ifx\@tempa\@empty
+ \@tempskipb\@tempdima \dashrule{\@tempskipb}{#3}%
+ \else
+ \dashrulefill[\z@][s]{#2}{#3}%
+ \fi
+ }%
+}
+\def\NCC@fnotecreate#1{%
+ \edef\@tempa{\noexpand\newcommand*%
+ \expandafter\noexpand\csname #1footnoterule\endcsname}%
+ \@tempa
+}
+\@onlypreamble\NCC@fnotecreate
+\def\NCC@fnoteprepare#1#2{%
+ \@ifnextchar[{#1{#2}}{#1{#2}[.4\columnwidth]}%
+}
+\@onlypreamble\NCC@fnoteprepare
+\newcommand\newfootnoterule{\NCC@fnoteprepare\NCC@fnotedriver}
+\def\NCC@fnotedriver#1[#2]#3{%
+ \NCC@fnotecreate{#1}{\NCC@fnoterule{#2}{#3}}%
+}
+\@onlypreamble\newfootnoterule
+\@onlypreamble\NCC@fnotedriver
+\newcommand\newfootnotedashrule{\NCC@fnoteprepare\NCC@fnotedashdriver}
+\def\NCC@fnotedashdriver#1[#2]#3#4{%
+ \NCC@fnotecreate{#1}{\NCC@fnotedashrule{#2}{#3}{#4}}%
+}
+\@onlypreamble\newfootnotedashrule
+\@onlypreamble\NCC@fnotedashdriver
+\endinput
+%%
+%% End of file `nccrules.sty'.