diff options
author | Karl Berry <karl@freefriends.org> | 2009-09-12 18:05:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-09-12 18:05:51 +0000 |
commit | 873a6f9281ea219d530a5f1113c54a48a6951703 (patch) | |
tree | f3c715ad9e164cd56d4d0db40b83e986c35d39d1 /Master/texmf-dist/tex/latex/dox/dox.sty | |
parent | 5e4989d7312e4e11eda708529fa09746de41a31e (diff) |
new latex package dox 1.0 (11sep09)
git-svn-id: svn://tug.org/texlive/trunk@15235 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/dox/dox.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/dox/dox.sty | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/dox/dox.sty b/Master/texmf-dist/tex/latex/dox/dox.sty new file mode 100644 index 00000000000..592dfa7a290 --- /dev/null +++ b/Master/texmf-dist/tex/latex/dox/dox.sty @@ -0,0 +1,104 @@ +%% +%% This is file `dox.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% dox.dtx (with options: `header,dox') +%% + + +%% Copyright (C) 2009 Didier Verna + +%% This file is part of DoX. + +%% DoX may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.1 +%% 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.1 or later is part of all distributions of LaTeX +%% version 1999/06/01 or later. + +%% DoX consists of the files listed in the file `README'. + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{dox}[2009/09/11 v1.0 Extensions to the doc package] + +\long\def\doxm@cro@#1#2{% + \endgroup% + \topsep\MacroTopsep\trivlist + \def\makelabel##1{\llap{##1}}% + \if@inlabel + \let\@tempa\@empty + \count@\macro@cnt + \loop\ifnum\count@>\z@ + \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne% + \repeat + \edef\makelabel##1{% + \llap{\vtop to\baselineskip +{\@tempa\hbox{##1}\vss}}}% + \advance\macro@cnt\@ne + \else + \macro@cnt\@ne + \fi + \edef\@tempa{% + \noexpand\item[% + \expandafter\noexpand\csname Print#1Name\endcsname{\string#2}]}% + \@tempa + \global\advance\c@CodelineNo\@ne + \@nameuse{SpecialMain#1Index}{#2}\nobreak + \global\advance\c@CodelineNo\m@ne + \ignorespaces} + +\newcommand\doxitem[3]{% + \@ifundefined{Print#1Name}{% + \expandafter\def\csname Print#1Name\endcsname##1{% + \strut\MacroFont\string##1\ }}{} + \expandafter\def\csname SpecialMain#1Index\endcsname##1{% + \@bsphack% + \special@index{% + ##1\actualchar{\string\ttfamily\space##1} (#2)\encapchar main}% + \special@index{% + #3:\levelchar##1\actualchar% + {\string\ttfamily\space##1}\encapchar main}% + \@esphack} + \@ifundefined{PrintDescribe#1}{% + \expandafter\def\csname PrintDescribe#1\endcsname##1{% + \strut\MacroFont##1\ }}{} + \expandafter\def\csname Special#1Index\endcsname##1{\@bsphack + \index{##1\actualchar{\protect\ttfamily##1} + (#2)\encapchar usage}% + \index{#3:\levelchar##1\actualchar{\protect\ttfamily##1}\encapchar + usage}\@esphack} + \expandafter\def\csname Describe@#1\endcsname##1{% + \endgroup + \marginpar{\raggedleft\@nameuse{PrintDescribe#1}{##1}}% + \@nameuse{Special#1Index}{##1}\@esphack\ignorespaces} + \expandafter\def\csname Describe#1\endcsname{% + \leavevmode\@bsphack\begingroup\MakePrivateLetters + \@nameuse{Describe@#1}} + \expandafter\def\csname #2\endcsname{% + \begingroup + \catcode`\\12 + \MakePrivateLetters\doxm@cro@{#1}} + \expandafter\let\csname end#2\endcsname\endtrivlist} + +\endinput +%% +%% End of file `dox.sty'. |