summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/dox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-01-27 23:11:38 +0000
committerKarl Berry <karl@freefriends.org>2017-01-27 23:11:38 +0000
commit7f93679fbc638711cdce5a4705125da8dd26af25 (patch)
tree0dd70946c318fe87e2c21aeec60a7182952ff393 /Master/texmf-dist/source/latex/dox
parent8fd70bc526d298b05a36fd4574a076668851f1f5 (diff)
dox (27jan17)
git-svn-id: svn://tug.org/texlive/trunk@43060 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/dox')
-rw-r--r--Master/texmf-dist/source/latex/dox/dox.dtx104
-rw-r--r--Master/texmf-dist/source/latex/dox/dox.ins42
2 files changed, 84 insertions, 62 deletions
diff --git a/Master/texmf-dist/source/latex/dox/dox.dtx b/Master/texmf-dist/source/latex/dox/dox.dtx
index d9036de1f8e..887b816d7f7 100644
--- a/Master/texmf-dist/source/latex/dox/dox.dtx
+++ b/Master/texmf-dist/source/latex/dox/dox.dtx
@@ -1,31 +1,24 @@
% \iffalse
%
-% dox.dtx --- Doc file for the DoX package (code and documentation)
+% dox.dtx --- Doc file for DoX
%
-% Copyright (C) 2009, 2010 Didier Verna
+% Copyright (C) 2009, 2010, 2017 Didier Verna
%
-% Author: Didier Verna <didier@lrde.epita.fr>
-% Maintainer: Didier Verna <didier@lrde.epita.fr>
-% Created: Thu Sep 10 21:11:32 2009
-% Last Revision: Sat Sep 19 09:55:31 2009
+% Author: Didier Verna <didier@didierverna.net>
%
% 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 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.
%
-% DoX consists of the files listed in the file `README'.
+% DoX consists of the files listed in the file `README.md'.
%
%
% Commentary:
%
-% Contents management by FCM version 0.1.
-%
%
% Code:
%
@@ -48,8 +41,7 @@
%
% \fi
%
-% \catcode`\¡=14
-% \CheckSum{359}
+% \CheckSum{390}
% \GetFileInfo{dox.inc}
%% \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
@@ -79,7 +71,7 @@
%
% \newcommand\dox{\textsf{DoX}\xspace}
% \newcommand\packagecopyright{%
-% Copyright \copyright{} 2009, 2010 Didier Verna}
+% Copyright \copyright{} 2009, 2010, 2017 Didier Verna}
%
% \newcommand\emacs{\textsf{[X]Emacs}\xspace}
% \newcommand\auctex{AUC-\TeX\xspace}
@@ -93,7 +85,7 @@
% Xtended\footnote{\dox homepage:
% \texttt{http://www.lrde.epita.fr/\~{}didier/software/latex.php\#dox}}}
% \author{Didier Verna\\
-% \texttt{mailto:didier@lrde.epita.fr}\\
+% \texttt{mailto:didier@didierverna.net}\\
% \texttt{http://www.lrde.epita.fr/\~{}didier/}}
% \maketitle
%
@@ -198,12 +190,12 @@
% created environment. Be sure to avoid name clashes here! If you start
% experimenting odd behavior, you've probably overridden an existing command
% with your new environment.\footnote{It is a pity that \LaTeX{} use the
-% same namespace for commands and environments. The opening command for
-% environment \texttt{env} should be named \cs{beginenv} and not just
-% \cs{env}}
-% \item \meta{idxcat} (\texttt{options} in our example) is the index category
-% under which your items will appear. For example, all indexed options will
-% be listed in the ``options:'' index entry.
+% same namespace for commands and environments. The opening command for
+% environment \texttt{env} should be named \cs{beginenv} and not just
+% \cs{env}\ldots}
+% \item \meta{idxcat} is the index category under which your items will
+% appear. In our example, all indexed options will be listed under the
+% ``options:'' index entry.
% \end{itemize}
%
% \subsubsection{Options to \cs{doxitem}}
@@ -338,8 +330,10 @@
% \textsf{FiXme} package (version 4.0 or later). In fact, I wrote \dox for it
% in the first place.
%
-% \section{Changes}
+% \section{History}
% \begin{itemize}
+% \item[v2.3] Support \texttt{doc}'s \cs{saved@indexname} internal command,
+% thanks to Falk Hanisch.
% \item[v2.2] New \texttt{macrolike} option allowing to create control
% sequence based documentation items.
% \item[v2.1] New lisp functions |doxitem[s]| to register new documentation
@@ -361,7 +355,7 @@
% \begin{macrocode}
%<dox>\NeedsTeXFormat{LaTeX2e}
%<*header>
-\ProvidesPackage{dox}[2010/12/16 v2.2 Extensions to the doc package]
+\ProvidesPackage{dox}[2017/01/26 v2.3 Extensions to the doc package]
%</header>
%<*dox>
@@ -395,13 +389,24 @@
% parts by testing a boolean condition as its first argument. This mechanism
% is not extensible, so I have to hack away a more generic version that
% would work for any new \texttt{dox} item, only which looks pretty much
-% like the original one.
+% like the original one (with the addition of options management).
% \begin{macrocode}
\long\def\@@doxenv#1#2{%
\endgroup%
\topsep\MacroTopsep%
\trivlist%
\edef\saved@macroname{\string#2}%
+% \end{macrocode}
+% Since version 2.1g, \texttt{doc} creates a \cs{saved@indexname} command
+% which in used by \cs{changes}. We now support that as well. The expansion of
+% this command depends on whether the documented item is macrolike or not,
+% which we don't know here (it's only know by \cs{doxitem}). That's why we
+% need one specific command generating \cs{saved@indexname} the right way for
+% every single item. These commands are named\cs{@Save\meta{item}IndexName};
+% they are technically part of the generated API, only not meant for public
+% use.
+% \begin{macrocode}
+ \@nameuse{@Save#1IndexName}{\saved@macroname}%
\def\makelabel##1{\llap{##1}}%
\if@inlabel%
\let\@tempa\@empty%
@@ -420,8 +425,8 @@
\edef\@tempa{%
\noexpand\item[%
% \end{macrocode}
-% Apart from dependency on options, the first modification to the original
-% macro involves dynamically constructing the name of the print macro:
+% The second notable modification to the original macro involves dynamically
+% constructing the name of the print macro:
% \begin{macrocode}
\expandafter\noexpand\csname Print#1Name\endcsname{\saved@macroname}]}%
\@tempa%
@@ -429,7 +434,7 @@
\ifdox@noindex\else%
\global\advance\c@CodelineNo\@ne%
% \end{macrocode}
-% and the second one involves dynamically constructing the name of the index
+% and the third one involves dynamically constructing the name of the index
% macro:
% \begin{macrocode}
\@nameuse{SpecialMain#1Index}{#2}\nobreak%
@@ -490,6 +495,22 @@
% \end{macro}
%
% \subsection{API construction}
+% First, the two index name generation macros (macrolike or not).
+% \begin{macro}{\@doxsavemacrolikeindexname}
+% \marg{saved macro name}
+% \begin{macrocode}
+\def\@doxsavemacrolikeindexname#1{%
+ \edef\saved@indexname{\expandafter\@gobble#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@doxsaveindexname}
+% \marg{saved macro name}
+% \begin{macrocode}
+\def\@doxsaveindexname#1{\let\saved@indexname#1}
+
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@doxcreatespecialmainindex}
% \marg{item}\marg{idxtype}\marg{idxcat}
% \begin{macro}{\@doxcreatespecialmainmacrolikeindex}
@@ -575,8 +596,8 @@
% \subsection{\texttt{Doc} overrides}
% \subsubsection{Macro facilities}
% Making \cs{DescribeMacro} work the \dox way is straightforward. The only
-% precaution we need is to to provide an alias to \cs{SpecialUsageIndex}
-% because it should really be named \cs{SpecialMacroIndex}.
+% precaution we need is to provide an alias to \cs{SpecialUsageIndex} because
+% it should really be named \cs{SpecialMacroIndex}.
% \begin{macrocode}
\let\SpecialMacroIndex\SpecialUsageIndex
\@doxcreatedescribe{Macro}
@@ -589,6 +610,7 @@
\def\SpecialMainMacroIndex#1{%
\SpecialMainIndex{#1}\nobreak%
\DoNotIndex{#1}}
+\let\@SaveMacroIndexName\@doxsavemacrolikeindexname
\@doxcreateenv{Macro}{macro}
% \end{macrocode}
@@ -599,6 +621,7 @@
% \begin{macrocode}
\@doxcreatedescribe{Env}
\@doxcreateenv{Env}{environment}
+\let\@SaveEnvIndexName\@doxsaveindexname
% \end{macrocode}
%
@@ -669,10 +692,19 @@
% \begin{environment}{item}
% \oarg{options}\marg{name}
% \begin{macrocode}
- \@doxcreateenv{#2}{#3}}
-
+ \@doxcreateenv{#2}{#3}
% \end{macrocode}
% \end{environment}
+% \begin{macro}{\@Ssave...IndexName}
+% \begin{macrocode}
+ \ifdox@macrolike
+ \expandafter\let\csname @Save#2IndexName\endcsname%
+ \@doxsavemacrolikeindexname%
+ \else
+ \expandafter\let\csname @Save#2IndexName\endcsname\@doxsaveindexname%
+ \fi}
+% \end{macrocode}
+% \end{macro}
% \end{macro}
%
% \subsection{Finale}
diff --git a/Master/texmf-dist/source/latex/dox/dox.ins b/Master/texmf-dist/source/latex/dox/dox.ins
index 0f2fde84c64..2a692d58780 100644
--- a/Master/texmf-dist/source/latex/dox/dox.ins
+++ b/Master/texmf-dist/source/latex/dox/dox.ins
@@ -1,29 +1,22 @@
-%%% dox.ins --- Installation file for DoX -*- mode: LaTeX -*-
+%%% dox.ins --- Installation file for DoX
-%% Copyright (C) 2009, 2010 Didier Verna
+%% Copyright (C) 2009, 2010, 2017 Didier Verna
-%% Author: Didier Verna <didier@lrde.epita.fr>
-%% Maintainer: Didier Verna <didier@lrde.epita.fr>
-%% Created: Thu Sep 10 21:25:41 2009
-%% Last Revision: Thu Sep 10 21:26:35 2009
+%% Author: Didier Verna <didier@didierverna.net>
%% 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 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.
-%% DoX consists of the files listed in the file `README'.
+%% DoX consists of the files listed in the file `README.md'.
%%% Commentary:
-%% Contents management by FCM version 0.1.
-
%%% Code:
@@ -35,19 +28,16 @@
\preamble
^^J^^J
-Copyright (C) 2009, 2010 Didier Verna^^J
+Copyright (C) 2009, 2010, 2017 Didier Verna^^J
This file is part of DoX.^^J
-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.^^J
-DoX consists of the files listed in the file `README'.^^J
+DoX 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.^^J
+DoX consists of the files listed in the file `README.md'.^^J
\endpreamble
-\catcode`\¡=14
\generate{
\file{header.inc}{\from{dox.dtx}{header}}
\file{dox.sty}{\from{dox.dtx}{header,dox}}}