[latex3-commits] [git/LaTeX3-latex3-latex3] main: Update \DescribeOption for doc v3 (fixes #1111) (07f81c9e3)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Nov 9 13:58:29 CET 2022


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/07f81c9e30d13069f234dc05e486a740a06fe2ae

>---------------------------------------------------------------

commit 07f81c9e30d13069f234dc05e486a740a06fe2ae
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Nov 9 12:57:40 2022 +0000

    Update \DescribeOption for doc v3 (fixes #1111)


>---------------------------------------------------------------

07f81c9e30d13069f234dc05e486a740a06fe2ae
 l3kernel/CHANGELOG.md |  4 ++++
 l3kernel/l3doc.dtx    | 48 +++---------------------------------------------
 2 files changed, 7 insertions(+), 45 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index e51617aae..986b06131 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -12,6 +12,10 @@ this project uses date-based 'snapshot' version identifiers.
 - `\codepoint_generate:n` and `\codepoint_str_generate:n`
 - `\str_casefold:n`
 
+### Fixed
+- Appearance of `\DescribeOption` (issue
+  [\#1111](https://github.com/latex3/latex3/issues/1111))
+
 ## [2022-11-02]
 
 ### Added
diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 78a941202..bae70c12e 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -3410,52 +3410,10 @@ and all files in that bundle must be distributed together.
 % \subsubsection{Misc}
 %
 % \begin{macro}{\DescribeOption}
-%   For describing package options.  Due to Joseph Wright.  Name/usage
-%   might change soon.
+%   For describing package options: retained for consistency, but updated for
+%   \pkg{doc}~v3.
 %    \begin{macrocode}
-\newcommand*{\DescribeOption}
-  {
-    \leavevmode
-    \@bsphack
-    \begingroup
-      \MakePrivateLetters
-      \Describe at Option
-  }
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-\newcommand*{\Describe at Option}[1]
-  {
-    \endgroup
-    \marginpar{
-      \raggedleft
-      \PrintDescribeEnv{#1}
-    }
-    \SpecialOptionIndex{#1}
-    \@esphack
-    \ignorespaces
-  }
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-\newcommand*{\SpecialOptionIndex}[1]
-  {
-    \@bsphack
-    \begingroup
-      \@@_target:
-      \index
-        {
-          #1\actualchar{\protect\ttfamily#1}~(option)
-          \encapchar hdclindex{\the\c at HD@hypercount}{usage}
-        }
-      \index
-        {
-          options:\levelchar#1\actualchar{\protect\ttfamily#1}
-          \encapchar hdclindex{\the\c at HD@hypercount}{usage}
-        }
-    \endgroup
-    \@esphack
-  }
+\NewDocElement[idxtype = option, idxgroup = options]{Option}{optionenv}  
 %    \end{macrocode}
 % \end{macro}
 %





More information about the latex3-commits mailing list.