summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/dox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-28 23:54:47 +0000
committerKarl Berry <karl@freefriends.org>2009-09-28 23:54:47 +0000
commite1ad2371d28982edecd1e4f12ff42cdb6f15dcd6 (patch)
tree3c69d6e5f4b548cb35e1c87163cd2691ff100a0e /Master/texmf-dist/source/latex/dox
parentaa68074d07abe15fed1b4269d79c8c7567702100 (diff)
dox 2.1 (28sep09)
git-svn-id: svn://tug.org/texlive/trunk@15539 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/dox')
-rw-r--r--Master/texmf-dist/source/latex/dox/dox.dtx38
-rw-r--r--Master/texmf-dist/source/latex/dox/dox.ins1
2 files changed, 36 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/dox/dox.dtx b/Master/texmf-dist/source/latex/dox/dox.dtx
index f7eabfa4fef..92c15714f47 100644
--- a/Master/texmf-dist/source/latex/dox/dox.dtx
+++ b/Master/texmf-dist/source/latex/dox/dox.dtx
@@ -136,8 +136,8 @@
% known. \dox supports \auctex by providing a style file named \texttt{dox.el}
% which contains \auctex definitions for the relevant commands. This file
% should be installed in a place where \auctex can find it. Please refer to
-% the \auctex documentation for more information on this.
-%
+% the \auctex documentation for more information on this. See also section
+% \ref{sec:elisp}.
%
% \section{Usage}
% \subsection{Initialization}
@@ -277,6 +277,36 @@
% \DescribeOption[noprint=false]{french}
% \end{verbatim}
%
+% \section{\auctex support for new documentation items\label{sec:elisp}}
+% Recent versions of \auctex (in fact, \texttt{doc}\TeX{} mode) are aware of
+% the \texttt{macro} and \texttt{environment} environments and give them a
+% fixed indentation level of $0$, meaning no indentation at all even when they
+% are nested. This is considered more convenient than the usual indentation
+% for environments when editing \texttt{dtx} files. If you have created new
+% documentation items for your package, you may want to let them behave the
+% same way. For that, the \dox style file provides two Lisp functions to let
+% \auctex know of your new environments: \texttt{doxitem} and
+% \texttt{doxitems}. The first one registers a new environment by name with
+% \auctex, and the second one takes an arbitrary number of environment names
+% and does the same with them. The environment names can in fact be a regular
+% expression, allowing you to combine several names together or build complex
+% ones.
+%
+% Since these functions are located in the style file itself, a good place to
+% use them is in \texttt{TeX-update-style-hook} which will be called after the
+% file is parsed and the relevant style files applied. Note that the effect of
+% calling these functions is always buffer-local.
+%
+% Here is an example to make all of this clearer. The following code sample is
+% what I have at the end of \texttt{fixme.dxt} (another package of mine), in
+% the local variables section:
+% \begin{verbatim}
+% (add-hook 'TeX-update-style-hook
+% (lambda () (doxitems "option" "counter" "lang" "face" "color")) nil t)
+% (add-hook 'TeX-update-style-hook
+% (lambda () (doxitem "\\(env\\|target\\)?layout")) nil t)
+% \end{verbatim}
+%
% \section{Conclusion}
% If you want to see \dox in action, take a look at the documentation of the
% \textsf{FiXme} package (version 4.0 or later). In fact, I wrote \dox for it
@@ -284,6 +314,8 @@
%
% \section{History}
% \begin{itemize}
+% \item[v2.1] New lisp functions |doxitem[s]| to register new documentation
+% environments with \auctex.
% \item[v2.0] Optional argument to \cs{doxitem} (\texttt{idxtype} option to
% change the item's index type).\\
% Optional argument to \cs{Describe}\meta{Item} and the \meta{item}
@@ -301,7 +333,7 @@
% \begin{macrocode}
%<dox>\NeedsTeXFormat{LaTeX2e}
%<*header>
-\ProvidesPackage{dox}[2009/09/21 v2.0 Extensions to the doc package]
+\ProvidesPackage{dox}[2009/09/28 v2.1 Extensions to the doc package]
%</header>
%<*dox>
diff --git a/Master/texmf-dist/source/latex/dox/dox.ins b/Master/texmf-dist/source/latex/dox/dox.ins
index c98430c1396..a6084db6a3c 100644
--- a/Master/texmf-dist/source/latex/dox/dox.ins
+++ b/Master/texmf-dist/source/latex/dox/dox.ins
@@ -29,6 +29,7 @@
\NeedsTeXFormat{LaTeX2e}
\input docstrip.tex
+\InputIfFileExists{ltxpkg.tex}{}{}
\askforoverwritefalse
\keepsilent