texlive[53768] Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls:

commits+karl at tug.org commits+karl at tug.org
Thu Feb 13 23:11:16 CET 2020


Revision: 53768
          http://tug.org/svn/texlive?view=revision&revision=53768
Author:   karl
Date:     2020-02-13 23:11:15 +0100 (Thu, 13 Feb 2020)
Log Message:
-----------
nlctdoc (13feb20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls

Modified: trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls	2020-02-13 22:10:16 UTC (rev 53767)
+++ trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls	2020-02-13 22:11:15 UTC (rev 53768)
@@ -4,7 +4,7 @@
 % copy the code here to another file and modify it for your own purposes.
 % There's no guarantee that it will work with other packages.
 %
-%  Copyright 2017 Nicola Talbot
+%  Copyright 2013-2020 Nicola Talbot
 % 
 %  This work may be distributed and/or modified under the
 %  conditions of the LaTeX Project Public License, either version 1.3
@@ -15,7 +15,7 @@
 %  version 2005/12/01 or later.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{nlctdoc}[2017/05/13 v1.06 (NLCT)]
+\ProvidesClass{nlctdoc}[2020/02/12 v1.07 (NLCT)]
 \RequirePackage{ifpdf}
 \RequirePackage{ifxetex}
 % tex4ht stopped working with koma during TL2013.
@@ -85,7 +85,11 @@
 \DeclareOption{widecs}{\widecstrue}
 \DeclareOption*{%
     \PassOptionsToClass  {\CurrentOption}{\@nlctdoc at class}}
+\newif\ifwbprompt
+\wbpromptfalse
+\DeclareOption{wbprompt}{\wbprompttrue}
 \ProcessOptions
+
 \@nlctdoc at if@usingtexht
 {%
   \LoadClass{\@nlctdoc at class}
@@ -97,6 +101,7 @@
     \LoadClass[captions=tableheading,abstract=true]{\@nlctdoc at class}
   \fi
 }%
+
 \RequirePackage{xcolor}
 \ifxetex
 \else
@@ -131,6 +136,31 @@
  \@noligs
  \let\do\@makeother \dospecials}
 
+% make it easier to configure index
+
+\begin{filecontents}{nlctdoc.ist}
+actual '='
+quote '!'
+level '>'
+preamble "\n \\begin{theindex} \n \\makeatletter\\scan at allowedfalse\n"
+postamble "\n\n \\end{theindex}\n"
+item_x1   "\\efill \n \\subitem "
+item_x2   "\\efill \n \\subsubitem "
+delim_0   "\\pfill "
+delim_1   "\\pfill "
+delim_2   "\\pfill "
+lethead_prefix   "\\letterheading{"
+lethead_suffix   "}\\nopagebreak\n"
+lethead_flag       1
+heading_prefix   "\\letterheading{"
+heading_suffix   "}\\nopagebreak\n"
+headings_flag       1
+\end{filecontents}
+
+\ifdef\chapter
+{\newcommand{\letterheading}[1]{\pdfbookmark[1]{#1}{index.#1}\textbf{\hfil#1\hfil}}}
+{\newcommand{\letterheading}[1]{\pdfbookmark[2]{#1}{index.#1}\textbf{\hfil#1\hfil}}}
+
 \newcommand*{\nlctdocmarginfmt}{\raggedleft}
 \nlct at setupmargin
 
@@ -137,7 +167,7 @@
 \def\@@doxdescribe#1#2{%
     \endgroup%
     \ifdox at noprint\else%
-      \marginpar{\nlctdocmarginfmt\@nameuse{PrintDescribe#1}{#2}}%
+      \nlctdocmargin{\@nameuse{PrintDescribe#1}{#2}}%
     \fi%
     \ifdox at noindex\else%
       \@nameuse{Special#1Index}{#2}%
@@ -145,9 +175,15 @@
     \endgroup%
 \@esphack\ignorespaces}
 
+\newcommand{\nlctdocmargin}[1]{\marginpar{\nlctdocmarginfmt#1}}
+\newcommand{\nlctdocmarginwide}[1]{%
+ \marginpar{\parbox[b][2\baselineskip]{\marginparwidth}{\nlctdocmarginfmt#1\vfill\par}}%
+}
 
-\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+\newrobustcmd\cs[1]{\texttt{\char`\\#1}}
 
+\newrobustcmd*{\mgroup}[1]{\texttt{\char`\{#1\char`\}}}
+
 \providecommand\marg[1]{%
   \allowbreak{\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
 \providecommand\oarg[1]{%
@@ -163,10 +199,13 @@
 \def\main#1{\underline{\hyperpage{#1}}}
 \def\usage#1{\textit{\hyperpage{#1}}}
 
-\def\SortIndex#1#2{\index{#1\actualchar#2\encapchar hyperpage}}
+\newcommand{\nlctdocmainencap}{\encapchar main}
+\newcommand{\nlctdochyperencap}{\encapchar hyperpage}
 
+\def\SortIndex#1#2{\index{#1\actualchar#2\nlctdochyperencap}}
+
 \newcommand*{\SpecialPageIndex}[1]{\@bsphack
-  \index{#1\encapchar hyperpage}\@esphack}
+  \index{#1\nlctdochyperencap}\@esphack}
 
 \renewcommand*\PageIndex{\makeindex
                \codeline at indexfalse
@@ -256,8 +295,6 @@
 \PageIndex
 \CodelineNumbered
 
-\newcommand{\importantsymbol}{\bfseries\Huge\danger}
-
 \newcommand\Describe at Wide@Macro[1]{%
  \endgroup
   \marginpar{\raggedright\hbox to\marginparwidth{\PrintDescribeMacro{#1}}\par}%
@@ -267,6 +304,16 @@
 
 \newlength\macrowidth
 
+\newcommand{\promptsymbol}{\BeginAccSupp{ActualText={}}\$\EndAccSupp{}}
+
+\newcommand{\importantfmt}{\raggedright}
+\newcommand{\importantsymbolfont}[1]{\textbf{\Huge#1}}
+
+\newcommand{\importantpar}[1][-3]{%
+  \def\@nlct at importantparafter{#1}%
+  \@importantpar
+}
+
 \@nlctdoc at if@usingtexht
 {%
   \newenvironment{definition}[1][]{%
@@ -275,8 +322,8 @@
     \HCode{</div><hr>}\par\noindent
   }
 
-  \newcommand{\importantpar}[1][-3]{\importantsymbol\space}
-
+  \newcommand{\importantsymbol}{\HCode{<span class="warningsymbol">&\#9888;</span>}}
+  \newcommand{\@importantpar}[1][]{\importantsymbol\space}
   \newenvironment{important}{%
     \par\HCode{<div class="important" title="Important Note">}\noindent
   }{%
@@ -283,12 +330,23 @@
     \HCode{</div>}\par\noindent
   }
 
-  \newenvironment{prompt}{%
-    \HCode{<spacer type=vertical size=10>}\begin{ttfamily}\obeylines\ignorespaces
-  }{%
-    \end{ttfamily}\HCode{<spacer type=vertical size=10>}\noindent
-  }
+  \ifwbprompt
+    \AtBeginDocument{\Css{
+       pre.prompt {color: white; background: black; font-weight:
+bold; padding-bottom: 2ex; padding-left: 1em; padding-right: 1em;}
+    }}
 
+    \newenvironment{prompt}%
+    {\par\HCode{<spacer type=vertical size=10><pre class="prompt">}%
+     \obeylines\ignorespaces}%
+    {\HCode{</pre><spacer type=vertical size=10>}\par\noindent}
+
+  \else
+    \newenvironment{prompt}%
+    {\HCode{<spacer type=vertical size=10>}\begin{ttfamily}\obeylines\ignorespaces}%
+    {\end{ttfamily}\HCode{<spacer type=vertical size=10>}\noindent}
+  \fi
+
   \newenvironment{display}{%
     \HCode{<spacer type=vertical size=10>}\obeylines\ignorespaces
   }{%
@@ -312,7 +370,7 @@
       \setlength\defwidth\linewidth
       \addtolength\defwidth{-2\fboxrule}%
       \addtolength\defwidth{-2\fboxsep}%
-      \begin{minipage}{\defwidth}\flushleft\ttfamily
+      \begin{minipage}[t]{\defwidth}\raggedright\ttfamily
   }{%
       \end{minipage}
     \end{lrbox}%
@@ -319,13 +377,11 @@
     \vskip10pt
     \noindent
     \ifwidecs
-     \let\Describe at Macro\Describe at Wide@Macro
-      \defarg
-      \nopagebreak\mbox{}\nopagebreak
-       \par\nopagebreak\vspace{0.5ex plus 0.25ex minus 0.1ex}\nopagebreak\noindent
+      \let\nlctdocmargin\nlctdocmarginwide
+      \par\bigskip\par\noindent
     \else
-      \defarg
     \fi
+    \strut\nopagebreak\defarg\nopagebreak
     \fcolorbox{black}{defbackground}{\usebox\defsbox}%
     \vskip10pt
     \noindent
@@ -335,16 +391,22 @@
   \newlength\tmpwidth
   \newlength\tmpheight
 
-  \newcommand{\importantpar}[1][-3]{%
-    \settoheight{\tmpheight}{\importantsymbol}%
-    \settowidth{\tmpwidth}{\importantsymbol}%
+  \newcommand{\importantsymbol}{\warning}
+
+  \newsavebox\@nlctdoc at tmpsbox
+  \newcommand{\@importantpar}[1][0pt]{%
+    \sbox\@nlctdoc at tmpsbox{\importantsymbolfont{\importantsymbol}}%
+    \settoheight{\tmpheight}{\usebox\@nlctdoc at tmpsbox}%
+    \settowidth{\tmpwidth}{\usebox\@nlctdoc at tmpsbox}%
+    \advance\tmpheight by #1\relax
     \advance\tmpwidth by .5em\relax
     \par\noindent
     \hangindent=\tmpwidth
-    \hangafter=#1\relax
+    \hangafter=\@nlct at importantparafter\relax
     \makebox[0pt][l]{\hspace*{-\tmpwidth}%
-      \smash{\raisebox{-\tmpheight}{\importantsymbol}}%
+      \smash{\raisebox{-\tmpheight}{\usebox\@nlctdoc at tmpsbox}}%
     }%
+    \ignorespaces
   }
 
   \newenvironment{important}{%
@@ -354,7 +416,7 @@
     \addtolength\defwidth{-2\fboxrule}%
     \begin{lrbox}{\defsbox}%
       \begin{minipage}{\defwidth}%
-      \raggedright
+      \importantfmt
       \setlength\parindent{1em}%
       \noindent\ignorespaces
   }{%
@@ -365,14 +427,33 @@
     \noindent\ignorespacesafterend
   }
 
-  \newenvironment{prompt}{%
-    \par\vskip\baselineskip
-    \begin{ttfamily}\obeylines\noindent\ignorespaces
-  }{%
-    \end{ttfamily}%
-    \par\vskip\baselineskip
+  \ifwbprompt
+   \newenvironment{prompt}%
+   {%
+     \setlength\defwidth{\linewidth}%
+     \addtolength\defwidth{-2\fboxsep}%
+     \begin{lrbox}{\defsbox}%
+      \begin{minipage}[t]{\defwidth}%
+      \ttfamily\color{white}\bfseries
+      \everypar{\promptsymbol\ }%
+      \obeylines\raggedright\frenchspacing\ignorespaces%
+   }%
+   {%
+      \end{minipage}%
+    \end{lrbox}\par\noindent\colorbox{black}{\usebox\defsbox}%
+    \everypar{}\par\medskip
     \noindent\ignorespacesafterend
-  }
+   }
+  \else
+    \newenvironment{prompt}{%
+      \par\vskip\baselineskip
+      \begin{ttfamily}\frenchspacing\obeylines\noindent\ignorespaces
+    }{%
+      \end{ttfamily}%
+      \par\vskip\baselineskip
+      \noindent\ignorespacesafterend
+    }
+  \fi
 
   \newenvironment{display}{%
     \par\vskip\baselineskip\noindent
@@ -406,117 +487,308 @@
   }
 }%
 
+\newcommand*{\idxmarker}{\textsuperscript{\textdagger}}
+\newcommand*{\doidxmarker}{\strut\llap{\idxmarker}}
+
 \newcommand*{\appfmt}[1]{\texttt{#1}}
-\DeclareRobustCommand*{\iapp}[1]{\index{#1=\appfmt{#1}\encapchar hyperpage}}
-\DeclareRobustCommand*{\app}[1]{\appfmt{#1}\iapp{#1}}
+\newrobustcmd*{\iapp}{\@ifstar\s at iapp\@iapp}
 
+\newcommand*{\s at iapp}[1]{\index{#1=\doidxmarker\appfmt{#1}\nlctdochyperencap}}
+\newcommand*{\@iapp}[1]{\index{#1=\appfmt{#1}\nlctdochyperencap}}
+
+\newrobustcmd*{\app}[1]{\appfmt{#1}\iapp{#1}}
+
 \newcommand*{\qt}[1]{``#1''}
 
-\DeclareRobustCommand*{\termdef}[1]{\emph{#1}\iterm{#1}}
-\DeclareRobustCommand*{\term}[1]{#1\iterm{#1}}
-\DeclareRobustCommand*{\iterm}[1]{\index{#1|main}}
+\newrobustcmd*{\termdef}[1]{\emph{#1}\iterm{#1}}
+\newrobustcmd*{\term}[1]{#1\iterm{#1}}
+\newrobustcmd*{\iterm}[1]{\index{#1\nlctdocmainencap}}
 \newcommand*{\tableref}[1]{\hyperref[#1]{table~\ref*{#1}}}
 \newcommand*{\Tableref}[1]{\hyperref[#1]{Table~\ref*{#1}}}
 
-\newcommand*{\ics}[1]{\cs{#1}\SpecialMainIndex{#1}}
+\renewcommand{\SpecialMainIndex}[1]{\@bsphack \SpecialIndex@ {#1}{\nlctdocmainencap}\@esphack}
 
-\newcommand*{\icsopt}[2]{\index{#1 options\actualchar\cs{#1} options\levelchar#2\actualchar\textsf{#2}\encapchar hyperpage}}
+\newcommand{\idxmarker at SpecialMainIndex}[1]{%
+ \@bsphack \idxmarker at SpecialIndex@ {#1}{\nlctdocmainencap}\@esphack
+}
 
-\newcommand*{\csopt}[2]{%
-  \textsf{#2}%
+\newcommand\idxmarker at SpecialIndex@[2]{%
+   \@SpecialIndexHelper@#1\@nil
+   \def\@tempb{ }%
+   \ifcat \@tempb\@gtempa
+      \special at index{\quotechar\space\actualchar
+                     \doidxmarker\string\verb\quotechar*\verbatimchar
+                     \quotechar\bslash\quotechar\space\verbatimchar#2}%
+   \else
+     \def\@tempb##1##2\relax{\ifx\relax##2\relax
+          \def\@tempc{\special at index{\quotechar##1\actualchar
+                      \doidxmarker\string\verb\quotechar*\verbatimchar
+                      \quotechar\bslash\quotechar##1\verbatimchar#2}}%
+        \else
+          \def\@tempc{\special at index{##1##2\actualchar
+                       \doidxmarker\string\verb\quotechar*\verbatimchar
+                       \bslash##1##2\verbatimchar#2}}%
+        \fi}%
+     \expandafter\@tempb\@gtempa\relax
+     \@tempc
+   \fi}
+
+\newcommand{\dequals}{%
+ \texorpdfstring
+ {\discretionary{}{}{}\texttt{=}\discretionary{}{}{}}%
+ {=}%
+}
+
+\newcommand{\dcomma}{%
+ \texorpdfstring
+ {\discretionary{}{}{}\texttt{,}\discretionary{}{}{}}%
+ {,}%
+}
+
+\newcommand{\dhyphen}{%
+ \texorpdfstring
+ {\discretionary{}{}{}\texttt{-}\discretionary{}{}{}}%
+ {-}%
+}
+
+
+\newcommand{\idxmarkedfont}[1]{#1}
+
+\newcommand*{\nlctdoc at ifplus}[1]{\@ifnextchar+{\@firstoftwo {#1}}}
+
+\newrobustcmd{\ics}{\@ifstar\s at ics\@ics}
+
+\newcommand*{\s at ics}[1]{\idxmarkedfont{\cs{#1}}\idxmarker at SpecialMainIndex{#1}}
+\newcommand*{\@ics}[1]{\cs{#1}\SpecialMainIndex{#1}}
+
+\newrobustcmd{\csmeta}{\@ifstar\s at csmeta\@csmeta}
+
+\newcommand*{\s at csmeta}[3]{\idxmarkedfont{\cs{#1\meta{#2}#3}}\index{#1#2#3=\protect\doidxmarker\protect\cs{#1\meta{#2}#3}\nlctdochyperencap}}
+\newcommand*{\@csmeta}[3]{\cs{#1\meta{#2}#3}\index{#1#2#3=\protect\cs{#1\meta{#2}#3}\nlctdochyperencap}}
+
+\newrobustcmd{\csmetameta}{\@ifstar\s at csmetameta\@csmetameta}
+
+\newcommand*{\s at csmetameta}[5]{\idxmarkedfont{\cs{#1\meta{#2}#3\meta{#4}#5}}\index{#1#2#3#4#5=\protect\doidxmarker\protect\cs{#1\meta{#2}#3\meta{#4}#5}\nlctdochyperencap}}
+\newcommand*{\@csmetameta}[5]{\cs{#1\meta{#2}#3\meta{#4}#5}\index{#1#2#3#4#5=\protect\cs{#1\meta{#2}#3\meta{#4}#5}\nlctdochyperencap}}
+
+\newcommand*{\csoptfmt}[1]{\textsf{#1}}
+
+\newrobustcmd*{\icsopt}{\@ifstar\s at icsopt\ns at icsopt}
+
+\newcommand*{\ns at icsopt}{\nlctdoc at ifplus\p at icsopt\@icsopt}
+
+\newcommand*{\s at icsopt}[2]{%
+ \index{#1 options\actualchar\cs{#1} options\levelchar#2\actualchar\doidxmarker\csoptfmt{#2}\nlctdochyperencap}}
+
+\newcommand*{\p at icsopt}[2]{%
+ \index{#1 options\actualchar\doidxmarker\cs{#1} options\levelchar#2\actualchar\csoptfmt{#2}\nlctdochyperencap}}
+
+\newcommand*{\@icsopt}[2]{%
+ \index{#1 options\actualchar\cs{#1} options\levelchar#2\actualchar\csoptfmt{#2}\nlctdochyperencap}}
+
+\newrobustcmd*{\csopt}{\@ifstar\s at csopt\@csopt}
+
+\newcommand*{\s at csopt}[2]{%
+  \idxmarkedfont{\csoptfmt{#2}}%
   \@for\@thiscmd:=#1\do{%
-    \icsopt{\@thiscmd}{#2}%
+    \s at icsopt{\@thiscmd}{#2}%
   }%
 }
 
+\newcommand*{\@csopt}[2]{%
+  \csoptfmt{#2}%
+  \@for\@thiscmd:=#1\do{%
+    \@icsopt{\@thiscmd}{#2}%
+  }%
+}
+
+% Package options
 \newcommand*{\pkgoptfmt}[1]{\textsf{#1}}
 
+% \ipkgopt{option}
 % \ipkgopt[value]{option}
-\newcommand*{\ipkgopt}[2][]{%
-  \def\@argi{#1}%
-  \ifx\@argi\@empty
-    \index{package options:>#2=\pkgoptfmt{#2}|main}%
-  \else
-    \index{package options:>#2=\pkgoptfmt{#2}>#1=\pkgoptfmt{#1}|main}%
-\fi
+% \ipkgopt*{option} <- mark option
+% \ipkgopt*[value]{option} <- mark value
+% \ipkgopt+{value}{option} <- mark option
+
+\newrobustcmd*{\ipkgopt}{\@ifstar\s at ipkgopt\ns at ipkgopt}
+
+\newcommand*{\ns at ipkgopt}{\nlctdoc at ifplus\p at ipkgopt\@ipkgopt}
+
+\newcommand*{\s at ipkgopt}[2][]{%
+  \ifstrempty{#1}%
+  {\index{package options:>#2=\doidxmarker\pkgoptfmt{#2}\nlctdocmainencap}}%
+  {\index{package options:>#2=\pkgoptfmt{#2}>#1=\doidxmarker\pkgoptfmt{#1}\nlctdocmainencap}}%
 }
 
-\newcommand*{\pkgopt}[2][]{%
-  \def\@argi{#1}%
-  \ifx\@argi\@empty
-    \pkgoptfmt{#2}\index{package options:>#2=\pkgoptfmt{#2}|main}%
-  \else
-    \pkgoptfmt{#2=#1}%
-    \index{package options:>#2=\pkgoptfmt{#2}>#1=\pkgoptfmt{#1}|main}%
-\fi
+\newcommand*{\p at ipkgopt}[2]{%
+  \index{package options:>#2=\doidxmarker\pkgoptfmt{#2}>#1=\pkgoptfmt{#1}\nlctdocmainencap}%
 }
 
-% \pkgoptval{value}{option}
-\newcommand*{\pkgoptval}[2]{%
-  \pkgoptfmt{#1}%
-  \index{package options:>#2=\pkgoptfmt{#2}>#1=\pkgoptfmt{#1}|main}%
+\newcommand*{\@ipkgopt}[2][]{%
+  \ifstrempty{#1}%
+  {\index{package options:>#2=\pkgoptfmt{#2}\nlctdocmainencap}}%
+  {\index{package options:>#2=\pkgoptfmt{#2}>#1=\pkgoptfmt{#1}\nlctdocmainencap}}%
 }
 
+\newrobustcmd*{\ideprecatedpkgopt}[2][]{%
+  \ifstrempty{#1}%
+  {\index{package options:>#2=\pkgoptfmt{#2} (deprecated)\nlctdocmainencap}}%
+  {\index{package options:>#2=\pkgoptfmt{#2} (deprecated)>#1=\pkgoptfmt{#1}\nlctdocmainencap}}%
+}
+
+\newrobustcmd*{\pkgopt}{\@ifstar\s at pkgopt\ns at pkgopt}
+
+\newcommand*{\ns at pkgopt}{\nlctdoc at ifplus\p at pkgopt\@pkgopt}
+
+\newcommand*{\s at pkgopt}[2][]{%
+  \idxmarkedfont{\ifstrempty{#1}{\pkgoptfmt{#2}}{\pkgoptfmt{#2\dequals#1}}}%
+  \s at ipkgopt[#1]{#2}%
+}
+
+\newcommand*{\p at pkgopt}[2]{%
+  \idxmarkedfont{\pkgoptfmt{#2\dequals#1}}\p at ipkgopt{#1}{#2}%
+}
+
+\newcommand*{\@pkgopt}[2][]{%
+  \ifstrempty{#1}{\pkgoptfmt{#2}}{\pkgoptfmt{#2\dequals#1}}%
+  \@ipkgopt[#1]{#2}%
+}
+
+\newrobustcmd*{\deprecatedpkgopt}[2][]{%
+  \ifstrempty{#1}{\pkgoptfmt{#2}}{\pkgoptfmt{#2\dequals#1}}%
+  \ideprecatedpkgopt[#1]{#2}%
+}
+
+\newrobustcmd*{\pkgoptval}{\@ifstar\s at pkgoptval\ns at pkgoptval}
+
+\newcommand*{\ns at pkgoptval}{\nlctdoc at ifplus\p at pkgoptval\@pkgoptval}
+
+\newcommand*{\s at pkgoptval}[2]{\idxmarkedfont{\pkgoptfmt{#1}}\s at ipkgopt[#1]{#2}}
+
+\newcommand*{\p at pkgoptval}[2]{\idxmarkedfont{\pkgoptfmt{#1}}\p at ipkgopt[#1]{#2}}
+
+\newcommand*{\@pkgoptval}[2]{\pkgoptfmt{#1}\@ipkgopt[#1]{#2}}
+
+% Class options
+
+% \iclsopt{option}
+% \iclsopt[value]{option}
+% \iclsopt*{option} <- mark option
+% \iclsopt*[value]{option} <- mark value
+% \iclsopt+{value}{option} <- mark option
+
 \newcommand*{\clsoptfmt}[1]{\textsf{#1}}
 
-% \iclsopt[value]{option}
-\newcommand*{\iclsopt}[2][]{%
-  \def\@argi{#1}%
-  \ifx\@argi\@empty
-    \index{class options:>#2=\clsoptfmt{#2}|main}%
-  \else
-    \index{class options:>#2=\clsoptfmt{#2}>#1=\clsoptfmt{#1}|main}%
-\fi
+\newrobustcmd*{\iclsopt}{\@ifstar\s at iclsopt\ns at iclsopt}
+
+\newcommand*{\ns at iclsopt}{\@ifnextchar+\p at iclsopt\@iclsopt}
+
+\newcommand*{\s at iclsopt}[2][]{%
+  \ifstrempty{#1}%
+  {\index{class options:>#2=\doidxmarker\clsoptfmt{#2}\nlctdocmainencap}}%
+  {\index{class options:>#2=\clsoptfmt{#2}>#1=\doidxmarker\clsoptfmt{#1}\nlctdocmainencap}}%
 }
 
-\newcommand*{\clsopt}[2][]{%
-  \def\@argi{#1}%
-  \ifx\@argi\@empty
-    \clsoptfmt{#2}\index{class options:>#2=\clsoptfmt{#2}|main}%
-  \else
-    \clsoptfmt{#2=#1}%
-    \index{class options:>#2=\clsoptfmt{#2}>#1=\clsoptfmt{#1}|main}%
-\fi
+\newcommand*{\p at iclsopt}[2]{%
+  \index{class options:>#2=\doidxmarker\clsoptfmt{#2}>#1=\clsoptfmt{#1}\nlctdocmainencap}%
 }
 
-% \clsoptval{value}{option}
-\newcommand*{\clsoptval}[2]{%
-  \clsoptfmt{#1}%
-  \index{class options:>#2=\clsoptfmt{#2}>#1=\clsoptfmt{#1}|main}%
+\newcommand*{\@iclsopt}[2][]{%
+  \ifstrempty{#1}%
+  {\index{class options:>#2=\clsoptfmt{#2}\nlctdocmainencap}}%
+  {\index{class options:>#2=\clsoptfmt{#2}>#1=\clsoptfmt{#1}\nlctdocmainencap}}%
 }
 
+\newrobustcmd*{\ideprecatedclsopt}[2][]{%
+  \ifstrempty{#1}%
+  {\index{class options:>#2=\clsoptfmt{#2} (deprecated)\nlctdocmainencap}}%
+  {\index{class options:>#2=\clsoptfmt{#2} (deprecated)>#1=\clsoptfmt{#1}\nlctdocmainencap}}%
+}
+
+\newrobustcmd*{\clsopt}{\@ifstar\s at clsopt\ns at clsopt}
+
+\newcommand*{\ns at clsopt}{\nlctdoc at ifplus\p at clsopt\@clsopt}
+
+\newcommand*{\s at clsopt}[2][]{%
+  \idxmarkedfont{\ifstrempty{#1}{\clsoptfmt{#2}}{\clsoptfmt{#2\dequals#1}}}%
+  \s at iclsopt[#1]{#2}%
+}
+
+\newcommand*{\p at clsopt}[2]{%
+  \idxmarkedfont{\ifstrempty{#1}{\clsoptfmt{#2}}{\clsoptfmt{#2\dequals#1}}}%
+  \p at iclsopt{#1}{#2}%
+}
+
+\newcommand*{\@clsopt}[2][]{%
+  \ifstrempty{#1}{\clsoptfmt{#2}}{\clsoptfmt{#2\dequals#1}}%
+  \@iclsopt[#1]{#2}%
+}
+
+\newrobustcmd*{\deprecatedclsopt}[2][]{%
+  \ifstrempty{#1}{\clsoptfmt{#2}}{\clsoptfmt{#2\dequals#1}}%
+  \ideprecatedclsopt[#1]{#2}%
+}
+
+\newrobustcmd*{\clsoptval}{\@ifstar\s at clsoptval\ns at clsoptval}
+
+\newcommand*{\ns at clsoptval}{\nlctdoc at ifplus\p at clsoptval\@clsoptval}
+
+\newcommand*{\s at clsoptval}[2]{\idxmarkedfont{\clsoptfmt{#1}\s at iclsopt[#1]{#2}}}
+
+\newcommand*{\p at clsoptval}[2]{\idxmarkedfont{\clsoptfmt{#1}\p at iclsopt[#1]{#2}}}
+
+\newcommand*{\@clsoptval}[2]{\clsoptfmt{#1}\@iclsopt[#1]{#2}}
+
 \newcommand*{\filetypefmt}[1]{\texttt{#1}}
 \newcommand*{\ifiletype}[1]{\index{file
-  types>#1=\filetypefmt{#1}|hyperpage}}
+  types>#1=\filetypefmt{#1}\nlctdochyperencap}}
 
 \newcommand*{\filetype}[1]{\filetypefmt{#1}\ifiletype{#1}}
 
 \newcommand*{\styfmt}[1]{\textsf{#1}}
 
-\newcommand*{\isty}[1]{\index{#1 package=\styfmt{#1}
-  package|hyperpage}}
-\newcommand*{\sty}[1]{\styfmt{#1}\isty{#1}}
+\newrobustcmd{\isty}{\@ifstar\s at isty\@isty}
 
+\newcommand*{\@isty}[1]{\index{#1 package=\styfmt{#1}
+  package\nlctdocmainencap}}
+\newcommand*{\s at isty}[1]{\index{#1 package=\doidxmarker\styfmt{#1}
+  package\nlctdocmainencap}}
+
+\newrobustcmd{\sty}{\@ifstar\s at sty\@sty}
+
+\newcommand*{\@sty}[1]{\styfmt{#1}\@isty{#1}}
+\newcommand*{\s at sty}[1]{\idxmarkedfont{\styfmt{#1}}\s at isty{#1}}
+
 \newcommand*{\clsfmt}[1]{\textsf{#1}}
 
-\newcommand*{\icls}[1]{\index{#1 class=\clsfmt{#1} class|hyperpage}}
-\newcommand*{\cls}[1]{\clsfmt{#1}\icls{#1}}
+\newrobustcmd{\icls}{\@ifstar\s at icls\@icls}
 
+\newcommand*{\@icls}[1]{\index{#1 class=\clsfmt{#1}
+  class\nlctdocmainencap}}
+\newcommand*{\s at icls}[1]{\index{#1 class=\doidxmarker\clsfmt{#1}
+  class\nlctdocmainencap}}
+
+\newrobustcmd{\cls}{\@ifstar\s at cls\@cls}
+
+\newcommand*{\@cls}[1]{\clsfmt{#1}\@icls{#1}}
+\newcommand*{\s at cls}[1]{\idxmarkedfont{\clsfmt{#1}}\s at icls{#1}}
+
 \newcommand*{\envfmt}[1]{\textsf{#1}}
 \newcommand*{\ienv}[1]{\SpecialMainEnvIndex{#1}}
 \newcommand*{\env}[1]{\envfmt{#1}\ienv{#1}}
 
 \newcommand*{\ctrfmt}[1]{\textsf{#1}}
-\newcommand*{\ictr}[1]{\index{#1={\protect\ttfamily#1} (counter)|hyperpage}}
+\newcommand*{\ictr}[1]{\index{#1={\protect\ttfamily#1} (counter)\nlctdochyperencap}}
 \newcommand*{\ctr}[1]{\ctrfmt{#1}\ictr{#1}}
 
 \newcommand*{\boolfmt}[1]{\textsf{#1}}
-\newcommand*{\ibool}[1]{\index{#1={\ttfamily#1} (boolean variable)|hyperpage}}
+\newcommand*{\ibool}[1]{\index{#1={\ttfamily#1} (boolean variable)\nlctdochyperencap}}
 \newcommand*{\bool}[1]{\boolfmt{#1}\ibool{#1}}
 
 \newcommand*{\bstfmt}[1]{\textsf{#1}}
 \newcommand*{\ibst}[1]{\index{#1 bibliography style=\bstfmt{#1} 
-bibliography style|hyperpage}}
+bibliography style\nlctdochyperencap}}
 \newcommand*{\bst}[1]{\bstfmt{#1}\ibst{#1}}
 
 \newcommand*{\menu}[1]{\textsf{#1}}
@@ -545,13 +817,17 @@
 
   \newcommand*{\toTop}{\par\noindent\hyperlink{top}{Top}}
 
+  \AtBeginDocument{%
+    \Css{.warningsymbol { color: red; font-weight: bold;}}%
+    \Css{div.important { border : solid red; }}%
+    \Css{div.verbatim { font-family: monospace; white-space: nowrap; text-align:left; clear:both; padding-top: 2ex; padding-bottom: 2ex;} }%
+  }
+
   \@ifundefined{chapter}
   {%
   \AtBeginDocument{%
       \Configure{section}{\toTop\HCode{<h2 class="sectionHead">}}{}{}{}%
       \Configure{subsection}{\toTop\HCode{<h3 class="subsectionHead">}}{}{}{}%
-      \Css{div.important { border : solid red; }}%
-      \Css{div.verbatim { font-family: monospace; white-space: nowrap; text-align:left; clear:both; padding-top: 2ex; padding-bottom: 2ex;} }%
     }
   }%
   {%
@@ -563,8 +839,6 @@
       {\HCode{<h2 class="chapterHead">}\thechapter. }{\HCode{</h2>}}%
       \Configure{section}{\toTop\HCode{<h3 class="sectionHead">}}{}{}{}%
       \Configure{subsection}{\toTop\HCode{<h4 class="subsectionHead">}}{}{}{}%
-      \Css{div.important { border : solid red; }}%
-      \Css{div.verbatim { font-family: monospace; white-space: nowrap; text-align:left; clear:both; padding-top: 2ex; padding-bottom: 2ex;} }%
     }%
   }%
 



More information about the tex-live-commits mailing list.