diff options
author | Karl Berry <karl@freefriends.org> | 2009-09-28 23:54:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-09-28 23:54:47 +0000 |
commit | e1ad2371d28982edecd1e4f12ff42cdb6f15dcd6 (patch) | |
tree | 3c69d6e5f4b548cb35e1c87163cd2691ff100a0e /Master | |
parent | aa68074d07abe15fed1b4269d79c8c7567702100 (diff) |
dox 2.1 (28sep09)
git-svn-id: svn://tug.org/texlive/trunk@15539 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/NEWS | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/dox.el | 25 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/dox.pdf | bin | 114170 -> 119743 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/dox/header.inc | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/dox/dox.dtx | 38 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/dox/dox.ins | 1 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/dox/dox.sty | 2 |
7 files changed, 69 insertions, 5 deletions
diff --git a/Master/texmf-dist/doc/latex/dox/NEWS b/Master/texmf-dist/doc/latex/dox/NEWS index bdd77517df2..865bcc8a5f1 100644 --- a/Master/texmf-dist/doc/latex/dox/NEWS +++ b/Master/texmf-dist/doc/latex/dox/NEWS @@ -17,6 +17,12 @@ version 1999/06/01 or later. DoX consists of the files listed in the file `README'. +* Version 2.1 +============= +** New lisp functions doxitem[s] +to register new documentation environments with AUC-TeX. + + * Version 2.0 ============= ** Optional argument to \doxitem diff --git a/Master/texmf-dist/doc/latex/dox/dox.el b/Master/texmf-dist/doc/latex/dox/dox.el index ca6496fb870..04638176083 100644 --- a/Master/texmf-dist/doc/latex/dox/dox.el +++ b/Master/texmf-dist/doc/latex/dox/dox.el @@ -37,6 +37,31 @@ '("doxitem" [ "Options" ] "Function name" "Environment name" "Index category name"))))) +(defun doxitem (envname) + "Register a new environment ENVNAME with AUC-TeX. + +The effect is to make docTeX mode treat this new environment just like +the macro and environment ones. Currently, this means avoiding inner +indentation. + +ENVNAME is actually a regexp appearing in a logical group. +This means that you can register several environments simultaneously +by means or regexp combination." + (make-local-variable 'docTeX-indent-inner-fixed) + (push (list + (concat (regexp-quote TeX-esc) + "\\(begin\\|end\\)[ \t]*{\\(" + envname + "\\)\\*?}") + 0 nil) + docTeX-indent-inner-fixed)) + +(defun doxitems (&rest envnames) + "Register environments ENVNAMES with AUC-TeX. +See the function `doxitem' for more information." + (mapc #'doxitem envnames)) + + ;;; Local variables: diff --git a/Master/texmf-dist/doc/latex/dox/dox.pdf b/Master/texmf-dist/doc/latex/dox/dox.pdf Binary files differindex ecc1d727932..1bf45de595d 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 163ed9c6f68..64062065dae 100644 --- a/Master/texmf-dist/doc/latex/dox/header.inc +++ b/Master/texmf-dist/doc/latex/dox/header.inc @@ -37,7 +37,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{dox}[2009/09/21 v2.0 Extensions to the doc package] +\ProvidesPackage{dox}[2009/09/28 v2.1 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 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 diff --git a/Master/texmf-dist/tex/latex/dox/dox.sty b/Master/texmf-dist/tex/latex/dox/dox.sty index c493fb6b8b1..15e35086540 100644 --- a/Master/texmf-dist/tex/latex/dox/dox.sty +++ b/Master/texmf-dist/tex/latex/dox/dox.sty @@ -38,7 +38,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{dox}[2009/09/21 v2.0 Extensions to the doc package] +\ProvidesPackage{dox}[2009/09/28 v2.1 Extensions to the doc package] \RequirePackage{kvoptions} \SetupKeyvalOptions{family=dox,prefix=dox@} |