diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-27 23:11:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-27 23:11:38 +0000 |
commit | 7f93679fbc638711cdce5a4705125da8dd26af25 (patch) | |
tree | 0dd70946c318fe87e2c21aeec60a7182952ff393 /Master/texmf-dist | |
parent | 8fd70bc526d298b05a36fd4574a076668851f1f5 (diff) |
dox (27jan17)
git-svn-id: svn://tug.org/texlive/trunk@43060 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/NEWS | 32 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/README | 73 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/README.md | 56 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/THANKS | 31 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/dox.el | 27 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/dox.pdf | bin | 153099 -> 157316 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/header.inc | 18 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/dox/dox.dtx | 104 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/dox/dox.ins | 42 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/dox/dox.sty | 34 |
10 files changed, 223 insertions, 194 deletions
diff --git a/Master/texmf-dist/doc/latex/dox/NEWS b/Master/texmf-dist/doc/latex/dox/NEWS index 4a70420eb63..d82292187cd 100644 --- a/Master/texmf-dist/doc/latex/dox/NEWS +++ b/Master/texmf-dist/doc/latex/dox/NEWS @@ -1,49 +1,43 @@ - WHAT'S NEW IN DOX -Copyright (C) 2009, 2010 Didier Verna +Copyright (C) 2009, 2010, 2017 Didier Verna + +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'. +* Version 2.3 +** Support Doc's internal \saved@indexname command +thanks to Falk Hanisch. + * Version 2.2 -============= ** New option 'macrolike' to \doxitem allowing to create control sequence based documentation items. - * Version 2.1 -============= ** New lisp functions doxitem[s] to register new documentation environments with AUC-TeX. - * Version 2.0 -============= ** Optional argument to \doxitem idxtype option to change the item's index type - ** Optional argument to \Describe<Item> and the <Item> environment noprint option to avoid marginal printing noindex option to avoid item indexing - ** Extend \DescribeMacro, \DescribeEnv and their corresponding environments with the same features - * Version 1.0 -============= ** First public version diff --git a/Master/texmf-dist/doc/latex/dox/README b/Master/texmf-dist/doc/latex/dox/README deleted file mode 100644 index d0816be8128..00000000000 --- a/Master/texmf-dist/doc/latex/dox/README +++ /dev/null @@ -1,73 +0,0 @@ - - ABOUT DOX - - -Copyright (C) 2009, 2010 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 following files: - -- NEWS -- README (this file) -- dox.dtx -- dox.el -- dox.ins - - -* Description -============= - -The doc package provides LaTeX developers with means to describe the usage and -the definition of new commands and environments. However, there is no simple -way to extend this functionality to other items (options or counters for -instance). DoX is designed to circumvent this limitation, and provides some -improvements over the existing functionality as well. - -DoX homepage: http://www.lrde.epita.fr/~didier/software/latex.php#dox - - -* Installation -============== - -If you are building DoX from the tarball you need to execute the following -steps in order to extract the necessary files: - -[pdf]latex dox.ins -> will create the style file dox.sty -[pdf]latex dox.dtx -> (twice) will create the documentation files dox.pdf or - dox.dvi. Note that dox.pdf is already part of the - distribution. - -After that, you need to install the generated documentation and style file to -a location where LaTeX can find them. For a TDS-compliant layout, the -following locations are suggested: - -[TEXMF]/tex/latex/dox/dox.sty -[TEXMF]/doc/latex/dox/dox.[pdf|dvi] - -If you're an AUC-TeX user, you may also install the file 'dox.el' in a -suitable AUC-TeX style directory. - - - Have fun! - --- -Didier Verna <didier@lrde.epita.fr> - -Sientific site: http://www.lrde.epita.fr/~didier -Music (Jazz) site: http://www.didierverna.com - - - - -Local Variables: -mode: outline -End: diff --git a/Master/texmf-dist/doc/latex/dox/README.md b/Master/texmf-dist/doc/latex/dox/README.md new file mode 100644 index 00000000000..52d29fadd8b --- /dev/null +++ b/Master/texmf-dist/doc/latex/dox/README.md @@ -0,0 +1,56 @@ +ABOUT DOX +========= + +Copyright (C) 2009, 2010, 2017 Didier Verna + +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.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 following files: + +- README.md (this file) +- NEWS +- dox.ins +- dox.dtx +- dox.el +- THANKS + + +Description +----------- + +The Doc package provides LaTeX developers with means to describe the usage and +the definition of new commands and environments. However, there is no simple +way to extend this functionality to other items (options or counters for +instance). DoX is designed to circumvent this limitation, and provides some +improvements over the existing functionality as well. Dox also comes with +support for [AUC-TeX](https://www.gnu.org/software/auctex/). + +DoX homepage: http://www.lrde.epita.fr/~didier/software/latex.php#dox + + +Installation +------------ +If you are building DoX from the tarball, you need to execute the following +steps in order to extract the necessary files: + + [pdf]latex dox.ins + [pdf]latex dox.dtx + [pdf]latex dox.dtx + +After that, you need to install the generated documentation and style file to +a location where LaTeX can find them. For a TDS-compliant layout, the +following locations are suggested: + + [TEXMF]/tex/latex/dox/dox.sty + [TEXMF]/doc/latex/dox/dox.[pdf|dvi] + +If you're an AUC-TeX user, you may also install the file `dox.el` in a +suitable AUC-TeX style directory. diff --git a/Master/texmf-dist/doc/latex/dox/THANKS b/Master/texmf-dist/doc/latex/dox/THANKS new file mode 100644 index 00000000000..3ad89320f00 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dox/THANKS @@ -0,0 +1,31 @@ + THANK YOU! + + +Copyright (C) 2017 Didier Verna + +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.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.md'. + + +* Contributors + +** The following persons have contributed code, bug reports, localization, +** suggestions etc.: + +Falk Hanisch. + + + + +Local Variables: +mode: outline +End: diff --git a/Master/texmf-dist/doc/latex/dox/dox.el b/Master/texmf-dist/doc/latex/dox/dox.el index 55c36aa3b83..7187c71fc43 100644 --- a/Master/texmf-dist/doc/latex/dox/dox.el +++ b/Master/texmf-dist/doc/latex/dox/dox.el @@ -1,32 +1,23 @@ ;;; dox.el --- AUC-TeX style file for DoX -;; Copyright (C) 2009, 2010 Didier Verna - -;; Author: Didier Verna <didier@lrde.epita.fr> -;; Maintainer: Didier Verna <didier@lrde.epita.fr> -;; Created: Fri Sep 11 11:24:16 2009 -;; Last Revision: Sat Sep 19 09:54:43 2009 -;; Keywords: tex abbrev data +;; Copyright (C) 2009, 2010, 2017 Didier Verna +;; Author: Didier Verna <didier@didierverna.net> +;; Keywords: tex abbrev data ;; 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 all files listed in the file `README'. +;; DoX consists of all files listed in the file `README.md'. ;;; Commentary: -;; Contents management by FCM version 0.1. - - ;;; Code: diff --git a/Master/texmf-dist/doc/latex/dox/dox.pdf b/Master/texmf-dist/doc/latex/dox/dox.pdf Binary files differindex 663c6d9a861..3044171158b 100644 --- a/Master/texmf-dist/doc/latex/dox/dox.pdf +++ b/Master/texmf-dist/doc/latex/dox/dox.pdf diff --git a/Master/texmf-dist/doc/latex/dox/header.inc b/Master/texmf-dist/doc/latex/dox/header.inc index bfbdea0e123..cc2f2d78c37 100644 --- a/Master/texmf-dist/doc/latex/dox/header.inc +++ b/Master/texmf-dist/doc/latex/dox/header.inc @@ -8,19 +8,17 @@ %% -%% Copyright (C) 2009, 2010 Didier Verna +%% Copyright (C) 2009, 2010, 2017 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 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'. %% \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 @@ -37,7 +35,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{dox}[2010/12/16 v2.2 Extensions to the doc package] +\ProvidesPackage{dox}[2017/01/26 v2.3 Extensions to the doc package] \endinput %% 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}}} diff --git a/Master/texmf-dist/tex/latex/dox/dox.sty b/Master/texmf-dist/tex/latex/dox/dox.sty index c2ef47d8a8f..9fa5c0ef3db 100644 --- a/Master/texmf-dist/tex/latex/dox/dox.sty +++ b/Master/texmf-dist/tex/latex/dox/dox.sty @@ -8,19 +8,17 @@ %% -%% Copyright (C) 2009, 2010 Didier Verna +%% Copyright (C) 2009, 2010, 2017 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 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'. %% \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 @@ -38,7 +36,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{dox}[2010/12/16 v2.2 Extensions to the doc package] +\ProvidesPackage{dox}[2017/01/26 v2.3 Extensions to the doc package] \RequirePackage{kvoptions} \SetupKeyvalOptions{family=dox,prefix=dox@} @@ -53,6 +51,7 @@ \topsep\MacroTopsep% \trivlist% \edef\saved@macroname{\string#2}% + \@nameuse{@Save#1IndexName}{\saved@macroname}% \def\makelabel##1{\llap{##1}}% \if@inlabel% \let\@tempa\@empty% @@ -106,6 +105,10 @@ \MakePrivateLetters% \@@doxdescribe{#1}} +\def\@doxsavemacrolikeindexname#1{% + \edef\saved@indexname{\expandafter\@gobble#1}} +\def\@doxsaveindexname#1{\let\saved@indexname#1} + \def\@doxcreatespecialmainindex#1#2#3{% \expandafter\def\csname SpecialMain#1Index\endcsname##1{% \@bsphack% @@ -162,10 +165,12 @@ \def\SpecialMainMacroIndex#1{% \SpecialMainIndex{#1}\nobreak% \DoNotIndex{#1}} +\let\@SaveMacroIndexName\@doxsavemacrolikeindexname \@doxcreateenv{Macro}{macro} \@doxcreatedescribe{Env} \@doxcreateenv{Env}{environment} +\let\@SaveEnvIndexName\@doxsaveindexname \newcommand\doxitem[4][]{% \@nameuse{dox@macrolike\dox@macrolikedefault}% @@ -200,8 +205,13 @@ \fi \expandafter\@doxexpr\expandafter{\dox@idxtype}{#4}% \@doxcreatedescribe{#2} - \@doxcreateenv{#2}{#3}} - + \@doxcreateenv{#2}{#3} + \ifdox@macrolike + \expandafter\let\csname @Save#2IndexName\endcsname% + \@doxsavemacrolikeindexname% + \else + \expandafter\let\csname @Save#2IndexName\endcsname\@doxsaveindexname% + \fi} \ProcessKeyvalOptions* \ifdox@noprint \def\dox@noprintdefault{true} |