summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/dtxdescribe/dtxdescribe.sty316
1 files changed, 193 insertions, 123 deletions
diff --git a/Master/texmf-dist/tex/latex/dtxdescribe/dtxdescribe.sty b/Master/texmf-dist/tex/latex/dtxdescribe/dtxdescribe.sty
index d5a58b29837..db5c60150b7 100644
--- a/Master/texmf-dist/tex/latex/dtxdescribe/dtxdescribe.sty
+++ b/Master/texmf-dist/tex/latex/dtxdescribe/dtxdescribe.sty
@@ -18,7 +18,13 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{dtxdescribe}
- [2019/07/16 v1.02 Describe additional object types in source files.]
+ [2022/02/01 v1.03 Describe additional object types in source files.]
+
+
+
+
+
+
@@ -106,7 +112,8 @@
\RequirePackage{xparse}
-\RequirePackage{xifthen}
+
+\RequirePackage{calc}
\RequirePackage{xcolor}
\definecolor{myurlcolor}{rgb}{0,0,.7}
@@ -149,7 +156,6 @@
\def\filenm#1{\detokenize{#1}}%
\def\brand#1{#1}%
\def\acro#1{#1}%
- \def\HTML{HTML}%
\def\ODT{ODT}%
\def\SVG{SVG}%
\def\PNG{PNG}%
@@ -162,6 +168,7 @@
\def\URL{URL}%
\def\element#1{#1}%
\def\attribute#1{#1}%
+ \def\attrib#1{#1}%
\def\HTML{HTML}%
\def\HTMLfive{HTML5}%
\def\CSS{CSS}%
@@ -279,16 +286,20 @@
\let\DTXD@origwrindex\@wrindex
\newcommand*{\DTXD@margintag}[3]{%
-\@ifundefined{@captype}{% not float?
-\leavevmode%
-\marginpar{%
-\DTXD@printtype{%
-#3% margintag
-\ifblank{#1}{}{ [#1]}% class
-}% Desc@Type
-\texttt{#2}% name
-}% marginpar
-}{}% not float?
+ \@ifundefined{@captype}{% not float?
+ \leavevmode%
+ \marginpar{%
+ {%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \DTXD@printtype{%
+ #3% margintag
+ \ifblank{#1}{}{ [#1]}% class
+ }%
+ \texttt{#2}% name
+ }%
+ }% marginpar
+ }{}% not float?
}
\newcommand*{\DTXD@index}[5]{%
@@ -334,11 +345,15 @@
\@ifundefined{@captype}{% not float?
\leavevmode%
\marginpar{%
-\DTXD@printtype{%
-#3% margin tag
-\ifblank{#1}{}{ [#1]}% class
-}% Desc@Type
-\cmd{#2}% name
+ {%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \DTXD@printtype{%
+ #3% margin tag
+ \ifblank{#1}{}{ [#1]}% class
+ }%
+ \cmd{#2}% name
+ }%
}% marginpar
}{}% not float?
\begingroup%
@@ -364,24 +379,29 @@
\@ifundefined{@captype}{% not float?
\leavevmode%
\marginpar{%
-\raggedleft%
-\ifblank{#1}{}{{\scriptsize\textsf{[#1]}} }% class
-\cmd{#2}% name
+ {%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \raggedleft%
+ \ifblank{#1}{}{{\scriptsize\textsf{[#1]}} }% class
+ \cmd{#2}% name
+ }%
}% marginpar
}{}% not float?
\begingroup%
\DTXD@origwrindex{%
-\DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}% name
-\ifblank{#1}{}{\levelchar[#1]}% class
-\encapchar usage}%
+ \DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}% name
+ \ifblank{#1}{}{\levelchar[#1]}% class
+ \encapchar usage%
+}%
\ifblank{#1}%
{}% no class
{% class given
-\begingroup%
-\DTXD@origwrindex{%
-#1\actualchar[#1]:\levelchar%
-\DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}%
-\encapchar usage}%
+ \begingroup%
+ \DTXD@origwrindex{%
+ #1\actualchar[#1]:\levelchar%
+ \DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}%
+ \encapchar usage}%
}% class given
\@esphack%
\ignorespaces%
@@ -447,60 +467,67 @@
{\DTXD@cmdmargintagindex{#1}{#2}{Len}{length}{usage}}
\newcommand*{\DescribeCounter}[2][]
{\DTXD@margintagindex{#1}{#2}{Ctr}{counter}{usage}}
+\newcommand*{\DescribeHook}[2][]
+ {\DTXD@margintagindex{#1}{#2}{Hook}{hook}{usage}}
\newcommand*{\DescribeKey}[2][]
{\DTXD@margintagindex{#1}{#2}{Key}{key}{usage}}
\newcommand*{\DescribeObject}[2][]{%
\@ifundefined{@captype}{% not float?
-\@bsphack%
-\leavevmode%
-\marginpar{%
- \raggedleft%
- \ifblank{#1}{}{\raggedleft{\scriptsize[#1]} }
- \texttt{#2}%
-}%
+ \@bsphack%
+ \leavevmode%
+ \marginpar{%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \raggedleft%
+ \ifblank{#1}{}{\raggedleft{\scriptsize[#1]} }
+ \texttt{#2}%
+ }%
}{}% not float?
\ifblank{#1}%
-{\begingroup%
-\DTXD@origwrindex{%
-#2\actualchar{\protect\ttfamily#2}%
-\encapchar usage%
-}%
-}%
{%
-\begingroup%
-\DTXD@origwrindex{%
-#2\actualchar{\protect\ttfamily#2} [#1]%
-\encapchar usage%
-}%
-\begingroup%
-\DTXD@origwrindex{%
-#1\actualchar[#1]:\levelchar#2\actualchar{\protect\ttfamily#2}%
-\encapchar usage%
+ \begingroup%
+ \DTXD@origwrindex{%
+ #2\actualchar{\protect\ttfamily#2}%
+ \encapchar usage%
+ }%
}%
+{%
+ \begingroup%
+ \DTXD@origwrindex{%
+ #2\actualchar{\protect\ttfamily#2} [#1]%
+ \encapchar usage%
+ }%
+ \begingroup%
+ \DTXD@origwrindex{%
+ #1\actualchar[#1]:\levelchar#2\actualchar{\protect\ttfamily#2}%
+ \encapchar usage%
+ }%
}%
\@esphack%
\ignorespaces%
}
\newcommand*{\DescribeOther}[2][]{%
\@ifundefined{@captype}{% not float?
-\@bsphack%
-\leavevmode%
-\marginpar{%
- \raggedleft%
- \ifblank{#1}{}{\raggedleft{\scriptsize[#1]} }%
- #2%
-}%
+ \@bsphack%
+ \leavevmode%
+ \marginpar{%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \raggedleft%
+ \ifblank{#1}{}{\raggedleft{\scriptsize[#1]} }%
+ #2%
+ }%
}{}% not float?
\ifblank{#1}%
{%
-\begingroup%
-\DTXD@origwrindex{#2\encapchar usage}%
+ \begingroup%
+ \DTXD@origwrindex{#2\encapchar usage}%
}%
{%
-\begingroup%
-\DTXD@origwrindex{#2 [#1]\encapchar usage}%
-\begingroup%
-\DTXD@origwrindex{#1\actualchar[#1]:\levelchar#2\encapchar usage}%
+ \begingroup%
+ \DTXD@origwrindex{#2 [#1]\encapchar usage}%
+ \begingroup%
+ \DTXD@origwrindex{#1\actualchar[#1]:\levelchar#2\encapchar usage}%
}%
\@esphack%
\ignorespaces%
@@ -519,118 +546,124 @@
}
\newcommand{\ItemDescribeMacro}[2][]{%
-\item[\cmd{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeMacro[#1]{#2}%
+ \item[\cmd{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeMacro[#1]{#2}%
}
\newcommand{\ItemDescribeEnv}[2][]{%
-\item[\env{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeEnv[#1]{#2}%
+ \item[\env{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeEnv[#1]{#2}%
}
\newcommand{\ItemDescribeArgument}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeArgument[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeArgument[#1]{#2}%
}
\newcommand{\ItemDescribeBoolean}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeBoolean[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeBoolean[#1]{#2}%
}
\newcommand{\ItemDescribeLength}[2][]{%
-\item[\cmd{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeLength[#1]{#2}%
+ \item[\cmd{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeLength[#1]{#2}%
}
\newcommand{\ItemDescribeCounter}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeCounter[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeCounter[#1]{#2}%
+}
+
+\newcommand{\ItemDescribeHook}[2][]{%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeHook[#1]{#2}%
}
\newcommand{\ItemDescribeKey}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeKey[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeKey[#1]{#2}%
}
\newcommand{\DTXD@ItemDescribePackage}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribePackage[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribePackage[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribePackage}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribePackage%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribePackage%
}
\newcommand{\DTXD@ItemDescribeClass}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeClass[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeClass[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribeClass}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribeClass%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribeClass%
}
\newcommand{\ItemDescribeOption}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeOption[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeOption[#1]{#2}%
}
\newcommand{\DTXD@ItemDescribeFile}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeFile[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeFile[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribeFile}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribeFile%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribeFile%
}
\newcommand{\DTXD@ItemDescribeProgram}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeProgram[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeProgram[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribeProgram}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribeProgram%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribeProgram%
}
\newcommand{\DTXD@ItemDescribeCommand}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeCommand[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeCommand[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribeCommand}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribeCommand%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribeCommand%
}
\newcommand{\ItemDescribeObject}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeObject[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeObject[#1]{#2}%
}
\newcommand{\ItemDescribeOther}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeOther[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeOther[#1]{#2}%
}
@@ -655,6 +688,22 @@
}{}% not float?
}
+\NewDocumentCommand{\shownesting}{s O{1} m m}{
+ \IfBooleanF{#1}{
+ \par\smallskip
+ }
+ \fbox{
+ \begin{minipage}{#2\linewidth-2em}
+ \hbadness=10000\relax%
+ #3\par\smallskip
+ \hspace{1em}
+ \begin{minipage}{\linewidth-1.5em}
+ #4
+ \end{minipage}
+ \end{minipage}
+ }
+}
+
\definecolor{DTXD@examplerulecolor}{rgb}{.9,.9,.9}
\newcommand*{\dtxexamplecodename}{Code:}
@@ -788,8 +837,19 @@ position=top,
}
\providerobustcmd*{\pkg}[1]{\mbox{\textsf{#1}}}
+\providerobustcmd*{\cs}[1]{\texttt{\char`\\#1}}
+
\providerobustcmd*{\env}[1]{\mbox{\texttt{#1}}}
+\providecommand\marg[1]{%
+ {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
+
+\providecommand\oarg[1]{%
+ {\ttfamily[}\meta{#1}{\ttfamily]}}
+
+\providecommand\parg[1]{%
+ {\ttfamily(}\meta{#1}{\ttfamily)}}
+
\providerobustcmd*{\ctr}[1]{\mbox{\texttt{#1}}}
\providerobustcmd*{\bool}[1]{\mbox{\texttt{#1}}}
@@ -851,6 +911,8 @@ position=top,
\providerobustcmd*{\element}[1]{\texttt{<#1>}}
+\providerobustcmd*{\attrib}[1]{\mbox{\texttt{#1}}}
+
\providerobustcmd*{\attribute}[1]{\mbox{\texttt{#1}}}
\providerobustcmd*{\HTML}{\acro{HTML}}
@@ -864,16 +926,20 @@ position=top,
\providerobustcmd*{\EPUB}{\acro{EPUB}}
\providerobustcmd*{\tikz}{Ti\textit{k}z}
-\providerobustcmd*{\MathML}{Math\acro{ML}}
-
\providerobustcmd*{\CTAN}{\acro{CTAN}}
\providerobustcmd*{\TDS}{\acro{TDS}}
+\providerobustcmd*{\MathML}{Math\acro{ML}}
+\providerobustcmd*{\MathJax}{\brand{MathJax}}
\providerobustcmd*{\brand}[1]{\textsc{#1}}
\providerobustcmd*{\acro}[1]{\textsc{\lowercase{#1}}}
\providerobustcmd*{\supregistered}{\textsuperscript{\textregistered}}
+\providerobustcmd*{\dviTeX}{\mbox{\DVI\,\TeX}}
+\providerobustcmd*{\dviLaTeX}{\mbox{\DVI\,\LaTeX}}
+\providerobustcmd*{\pdfTeX}{\mbox{\PDF\,\TeX}}
+\providerobustcmd*{\pdfLaTeX}{\mbox{\PDF\,\LaTeX}}
\providerobustcmd*{\LuaTeX}{\mbox{Lua\TeX}}
\providerobustcmd*{\LuaLaTeX}{\mbox{Lua\LaTeX}}
\providerobustcmd*{\XeTeXrevE}
@@ -900,8 +966,12 @@ position=top,
\DeclareRobustCommand{\thinskip}{\hskip 0.16667em\relax}
\def\endash{–}
\def\emdash{—}
-\newcommand{\thinbrspace}{\hspace{.16667em}\penalty\exhyphenpenalty\hspace{0pt}}
-\newcommand{\thinthinbrspace}{\hspace{.08333em}\penalty\exhyphenpenalty\hspace{0pt}}
+\newcommand{\thinbrspace}{%
+ \hspace{.16667em}\penalty\exhyphenpenalty\hspace{0pt}%
+}
+\newcommand{\thinthinbrspace}{%
+ \hspace{.08333em}\penalty\exhyphenpenalty\hspace{0pt}%
+}
\newrobustcmd{\Dash}{\unskip\thinspace\emdash\thinbrspace}
\newrobustcmd{\dash}{\unskip\thinspace\endash\thinbrspace}
\newrobustcmd{\Slash}{\unskip\hspace{.08333em}/\thinthinbrspace}