summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/dtxdescribe/dtxdescribe.dtx')
-rw-r--r--macros/latex/contrib/dtxdescribe/dtxdescribe.dtx105
1 files changed, 99 insertions, 6 deletions
diff --git a/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx b/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx
index e271465c21..3fb7205f40 100644
--- a/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx
+++ b/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
-% Copyright 2016-2023 Brian Dunn
+% Copyright 2016-2024 Brian Dunn
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{dtxdescribe}
-%<package> [2023/01/03 v1.07 Describe additional object types in source files.]
+%<package> [2024/01/08 v1.08 Describe additional object types in source files.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -187,6 +187,8 @@ pageanchor=true,
% \changes{v1.05}{2022/09/08}{\ 2022/09/08}
% \changes{v1.06}{2022/12/07}{\ 2022/12/07}
% \changes{v1.07}{2023/01/03}{\ 2023/01/03}
+% \changes{v1.08}{2024/01/08}{\ 2024/01/08}
+% \changes{v1.08}{2024/01/08}{\ Updated contact info.}
@@ -211,7 +213,8 @@ pageanchor=true,
%
% \bigskip
%
-% {\small\textcopyright{} 2016--2023} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
+% {\small\textcopyright{} 2016--2024} Brian Dunn\\
+% \small \url{https://github.com/bdtc/dtxdescribe}
%
% \vspace{.5in}
%
@@ -227,7 +230,7 @@ pageanchor=true,
% The \pkg{doc} package includes tools for describing macros and environments
% in \LaTeX\ source \filenm{.dtx} format.
% The \pkg{dtxdescribe} package adds additional tools for describing
-% booleans, lengths, counters, hooks, keys, packages, classes, options,
+% booleans, lengths, counters, hooks, sockets, plugs, keys, packages, classes, options,
% files, commands, arguments, and other objects.
% \pkg{dtxdescribe} also works with the regular document classes, for those
% who do not wish to use the \pkg{ltxdoc} class and \filenm{.dtx} files.
@@ -472,7 +475,7 @@ pageanchor=true,
% See \cref{ex:arguments} on \cpageref{ex:arguments}.
-% \subsection{Booleans, lengths, counters, hooks, keys}
+% \subsection{Booleans, lengths, counters, hooks, sockets, plugs, keys}
%
% See \cref{ex:common} on \cpageref{ex:common}.
%
@@ -503,6 +506,19 @@ pageanchor=true,
% \end{sourceverb}
%
%
+% \DescribeMacro{\DescribeSocket} \oarg{category} \marg{name}
+%
+% \DescribeMacro{\DescribePlug} \oarg{category} \marg{name}
+%
+% Describes a socket or plug. Given a `Socket' or 'Plug' tag in the margin and index.
+% The |category| may be used to categorize sockets and plugs by package.
+% Example:
+% \begin{sourceverb}
+% \DescribeSocket{socketname}
+% \DescribePlug{plugname}
+% \end{sourceverb}
+%
+%
% \DescribeMacro{\DescribeKey} \oarg{category} \marg{name}
%
% Describes a key. Given a `Key' tag in the margin and index.
@@ -591,6 +607,10 @@ pageanchor=true,
%
% \DescribeMacro{\ItemDescribeHook} \oarg{category} \marg{name} A description.
%
+% \DescribeMacro{\ItemDescribeSocket} \oarg{category} \marg{name} A description.
+%
+% \DescribeMacro{\ItemDescribePlug} \oarg{category} \marg{name} A description.
+%
% \DescribeMacro{\ItemDescribeKey} \oarg{category} \marg{name} A description.
%
% \DescribeMacro{\ItemDescribePackage} \oarg{category} \marg{package\_name} With underscores.
@@ -1079,10 +1099,15 @@ pageanchor=true,
% the same as the rest of the objects.
-% \begin{dtxexample}{Hooks\label{ex:hook}}
+% \begin{dtxexample}{Hooks and Sockets\label{ex:hook}}
% \DescribeHook{\hookname} A hook with a backslash.
% \DescribeHook{para/begin} A hook without a backslash.
+
+% \DescribeSocket{socketname} A socket.
+
+% \DescribePlug{plugname} A socket plug.
+
% \end{dtxexample}
% Hooks may or may not have a leading backslash.
@@ -3114,6 +3139,52 @@ pageanchor=true,
% \end{macro}
%
%
+% \begin{macro}{\DescribeSocket} \oarg{category} \marg{name}
+% \changes{v1.08}{2024/01/08}{Added.}
+% \begin{macrocode}
+\IfPackageLoadedTF{doc}{% doc
+
+\NewDocElement[
+ macrolike=false,
+ toplevel=true,
+ idxtype=socket,
+ idxgroup=Sockets,
+ printtype=\textit{Socket}
+]{Socket}{socket}
+
+}{% not doc
+
+\newcommand*{\DescribeSocket}[2][]
+ {\DTXD@margintagindex{#1}{#2}{Socket}{socket}{usage}}
+
+}% not doc
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\DescribePlug} \oarg{category} \marg{name}
+% \changes{v1.08}{2024/01/08}{Added.}
+% \begin{macrocode}
+\IfPackageLoadedTF{doc}{% doc
+
+\NewDocElement[
+ macrolike=false,
+ toplevel=true,
+ idxtype=plug,
+ idxgroup=Plugs,
+ printtype=\textit{Plug}
+]{Plug}{plug}
+
+}{% not doc
+
+\newcommand*{\DescribePlug}[2][]
+ {\DTXD@margintagindex{#1}{#2}{Plug}{plug}{usage}}
+
+}% not doc
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\DescribeKey} \oarg{category} \marg{name}
%
% The |category| may be used to categorize keys by their kev/value group.
@@ -3366,6 +3437,28 @@ pageanchor=true,
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\ItemDescribeSocket} \oarg{category} \marg{name}
+% \changes{v1.08}{2024/01/08}{Added.}
+% \begin{macrocode}
+\newcommand{\ItemDescribeSocket}[2][]{%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeSocket[#1]{#2}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\ItemDescribePlug} \oarg{category} \marg{name}
+% \changes{v1.08}{2024/01/08}{Added.}
+% \begin{macrocode}
+\newcommand{\ItemDescribePlug}[2][]{%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribePlug[#1]{#2}%
+}
+% \end{macrocode}
+% \end{macro}
+
% \begin{macro}{\ItemDescribeKey} \oarg{category} \marg{name}
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}