From 8379012d545fd6a59fae8842d97d14ec0c2b27d7 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 13 Feb 2020 03:00:51 +0000 Subject: CTAN sync 202002130300 --- macros/latex/contrib/gridset/LICENSE.md | 19 ++ macros/latex/contrib/gridset/README | 50 ---- macros/latex/contrib/gridset/README.md | 50 ++++ macros/latex/contrib/gridset/VERSION | 1 - macros/latex/contrib/gridset/gridset.dtx | 256 +++++++++++------ macros/latex/contrib/gridset/gridset.ins | 90 ------ macros/latex/contrib/gridset/gridset.pdf | Bin 122125 -> 223385 bytes macros/latex/contrib/nlctdoc/nlctdoc.cls | 466 ++++++++++++++++++++++++------- 8 files changed, 605 insertions(+), 327 deletions(-) create mode 100644 macros/latex/contrib/gridset/LICENSE.md delete mode 100644 macros/latex/contrib/gridset/README create mode 100644 macros/latex/contrib/gridset/README.md delete mode 100644 macros/latex/contrib/gridset/VERSION delete mode 100644 macros/latex/contrib/gridset/gridset.ins (limited to 'macros/latex') diff --git a/macros/latex/contrib/gridset/LICENSE.md b/macros/latex/contrib/gridset/LICENSE.md new file mode 100644 index 0000000000..99a6973749 --- /dev/null +++ b/macros/latex/contrib/gridset/LICENSE.md @@ -0,0 +1,19 @@ +---------------------------------------------------------------------------- + +This work may be distributed and/or modified under the conditions of the +LaTeX Project Public License, version 1.3c of the license. The latest +version of this license is in http://www.latex-project.org/lppl.txt and +version 1.3c or later is part of all distributions of LaTeX 2005/12/01 +or later. This work has the LPPL maintenance status “maintained”. +The current maintainer and author of this work is Markus Kohm. + +---------------------------------------------------------------------------- + +Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz +in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle +Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und +Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01 +oder später. Dieses Werk hat den LPPL-Verwaltungs-Status „maintained” +Der aktuelle Verwalter und Autor dieses Werks ist Markus Kohm. + +---------------------------------------------------------------------------- diff --git a/macros/latex/contrib/gridset/README b/macros/latex/contrib/gridset/README deleted file mode 100644 index 29029249a3..0000000000 --- a/macros/latex/contrib/gridset/README +++ /dev/null @@ -1,50 +0,0 @@ ----------------------------------------------------------------------------- -Package gridset -Copyright (c) Markus Kohm, 2008 -Licence: LPPL -Version: 2008/11/12 v0.1 ----------------------------------------------------------------------------- -This package provides commands to save positions to and restore positions -from aux-file. This may be used for grid setting (aka strict in-register -setting). The package needs pdfTeX at least version 1.40. ----------------------------------------------------------------------------- -If you have a distribution of gridset with an archive containing the files - - doc/ - doc/latex/gridset - doc/latex/gridset/gridset.pdf - source/ - source/latex/ - source/latex/gridset/ - source/latex/gridset/gridset.dtx - source/latex/gridset/README - tex/ - tex/latex/ - tex/latex/gridset - tex/latex/gridset/gridset.sty - tex/latex/gridset/gridsetexample.tex - -you may simply extract this archive at your local texmf tree (local TDS tree) -that may be e.g. C:\localtexmf or /usr/local/share/texmf or -/usr/TeX/texmf-local. On some systems you may ask for the local TDS tree -using: `kpsewhich -var-value=TEXMFLOCAL'. After extraction you should update -your File Name DataBase e.g. using the MiKTeX Options dialog or texhash. - -If the files are at a root directory gridset the distributor has changed my -original distribution archive and you have to copy the files yourself into -the appropriate directories at one of your texmf trees and update your File -Name DataBase. - -If you instead of this have only the files gridset.dtx, README, and -gridset.pdf (optional), you have to call: - tex gridset.dtx -and follow the instructions. - -Notes: -- If you only want to test gridset without installation, you may simply use - a copy of gridset.dtx renamed to gridset.sty. -- README is not a user documentation file, but only needed until - installation has been done. Because of this, I declare it to be a - source file. Nevertheless distrbutors may install it as an additional - documentation file. ----------------------------------------------------------------------------- diff --git a/macros/latex/contrib/gridset/README.md b/macros/latex/contrib/gridset/README.md new file mode 100644 index 0000000000..0a1963d1eb --- /dev/null +++ b/macros/latex/contrib/gridset/README.md @@ -0,0 +1,50 @@ +# gridset + +An experimental LaTeX package for semi-manual grid (a.k.a. in-register) setting + +------------------------------------------------------------------------------ + +LaTeX package `gridset` +Copyright (c) 2008—2020 Markus Kohm +Release: 2020-02-12 v0.3 +License: LPPL 1.3c (see LICENSE.md) +CTAN Location: https://ctan.org/pkg/gridset + +------------------------------------------------------------------------------ + +## Summary + +This package provides commands to save positions to and restore positions from +`aux`-file. This may be used for grid setting (a.k.a. strict in-register +setting). + +## Status Note + +This package should not have been released, because it was only a very +quick implementation of an idea. You should not use it for any productive +purpose. It has been made for testing only. I would prefer to retire it +from any distribution. Nevertheless I know few persons using the package. +So it will be still there but without any support! + +## Installation + +The package is part of [TeX Live](https://tug.org/texlive) (and therefore +also [MacTeX](https://tug.org/mactex)) and [MiKTeX](http://miktex.org). Users +should use the packages provided by their TeX distribution. + +However, manual extraction can be used to try out the developer version. + +To extract the package use: + +```bash +tex gridset.dtx +``` + +To create the manual use: + +```bash +pdflatex gridset.dtx +mkindex gridset +pdflatex gridset.dtx +pdflatex gridset.dtx +``` diff --git a/macros/latex/contrib/gridset/VERSION b/macros/latex/contrib/gridset/VERSION deleted file mode 100644 index f2f17f4db2..0000000000 --- a/macros/latex/contrib/gridset/VERSION +++ /dev/null @@ -1 +0,0 @@ -2008/11/12 v0.1 diff --git a/macros/latex/contrib/gridset/gridset.dtx b/macros/latex/contrib/gridset/gridset.dtx index 67adeb198b..68b251db55 100644 --- a/macros/latex/contrib/gridset/gridset.dtx +++ b/macros/latex/contrib/gridset/gridset.dtx @@ -1,26 +1,27 @@ -% \CheckSum{416} % \iffalse meta-comment % % gridset.dtx % +%% Copyright (C) 2008-2020 Markus Kohm +%% %% This work may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3 +%% conditions of the LaTeX Project Public License, either version 1.3c %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2003/12/01 or later. +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. %% %% This work has the LPPL maintenance status "maintained". %% -%% The author of the initial version of these work was -%% Markus Kohm +%% The author and current maintainer of this work is +%% Markus Kohm . %% -%% This work consists of the files gridset.dtx and README. +%% This work consists of the files gridset.dtx and README.md. %% %% Important Recommendation: -%% The LPPL requires that distributions of the Work contain all the files of -%% the Work (see ``Important Recommendations'' at lppl.txt). +%% The LPPL requires that distributions of the Work contain all the files of +%% the Work (see ``Important Recommendations'' at lppl.txt). %% % %<*dtx> @@ -31,23 +32,18 @@ % Give me the documentation \ProvidesFile{gridset.dtx} % -%<*dtx|tex|package|example> +%<*dtx|package|example> %\ProvidesPackage{gridset} -%\ProvidesFile{gridset.tex} %\ProvidesFile{gridsetexample.tex} - [2008/11/12 v0.1 grid - aka in-register - setting] -% -%<*dtx|tex> + [2020-02-12 v0.3 grid - a.k.a. in-register - setting] +% +%<*dtx> \documentclass{ltxdoc} \begin{document} \RecordChanges -%<*!tex> \GetFileInfo{gridset.dtx} -% -% \GetFileInfo{gridset.tex} \DocInput{gridset.dtx} -%\end{document} -% +% %<*dtx> \expandafter\expandafter\expandafter\enddocument \fi @@ -60,14 +56,10 @@ %\def\batchfile{gridset.ins} \input docstrip.tex - \ifToplevel{% - \let\ifalpha\iffalse - } \keepsilent \askforoverwritefalse \usedir{tex/latex/gridset} \preamble -Copyright (c) Markus Kohm 2008 IMPORTANT NOTE: @@ -78,9 +70,8 @@ about the files the work consists of. \endpreamble \generate{% - \file{gridset.tex}{\from{gridset.dtx}{tex}}% \file{gridset.ins}{\from{gridset.dtx}{ins}}% - \file{gridsetx.sty}{\from{gridset.dtx}{package}}% + \file{gridset.sty}{\from{gridset.dtx}{package}}% \file{gridsetexample.tex}{\from{gridset.dtx}{example}}% } @@ -90,11 +81,9 @@ about the files the work consists of. \Msg{* gridset} \Msg{* =======} \Msg{*} - \ifalpha% ALPHA - \Msg{* THIS IS AN ALPHA VERSION!} - \Msg{* DON'T USE IT ONLY TEST IT!} - \Msg{*} - \fi + \Msg{* THIS IS AN ALPHA VERSION!} + \Msg{* DON'T USE IT ONLY TEST IT!} + \Msg{*} \Msg{* To finish the installation run} \Msg{* \space\space latex gridset.dtx} \Msg{* or} @@ -108,21 +97,19 @@ about the files the work consists of. \Msg{* \space\space kpsewhich -var-value=TEXMFLOCAL} \Msg{*} \Msg{*********************************************************************} -%<*!ins> - \csname fi\endcsname\csname fi\endcsname\endinput -% } % %<*dtx> \fi +\csname fi\endcsname \csname batchendinput\endcsname % % \fi ^^A meta-comment % -% \title{Semi-Manual Grid Setting Using \textsf{gridset}\iftrue^^A ALPHA +% \title{Semi-Manual Grid Setting Using \textsf{gridset}% % \footnote{This is an alpha version! Don't use it! Only test it! There's no -% support and everything may change!}\fi +% support and everything may change!}% % } % \author{Markus Kohm} % \date{\filedate~\fileversion} @@ -136,6 +123,13 @@ about the files the work consists of. % position. This may be enough under some circumstances. In other % circumstances it may fail. So \textsf{gridset} is only one more step for % grid setting not a complete solution. +% +% \paragraph*{Important Note:} This package should have been never released, +% because it was only a very quick implementation of an idea. You should not +% use it for any productive purpose. It has been made for testing only. I +% would prefer to retire it from any distribution. Nevertheless I know few +% persons using the package. So it will be still there but without any +% support! % \end{abstract} % \tableofcontents % \section{User Manual} @@ -163,12 +157,16 @@ about the files the work consists of. % Because of this, it doesn't matter, that changing them is not really user % friendly. % +% \DescribeMacro{\SavePos}% % \DescribeMacro{\savepos}% -% \cs{savepos}\marg{unique name} saves informations about the current position +% \cs{SavePos}\marg{unique name} saves informations about the current position % to the \texttt{aux}-file. These informations are read at next \LaTeX{} run % and may be used (see \cs{the\dots} commands below) then. The \meta{unique % name} has to be a position name, that is unique for all saved position -% informations of the current document. +% informations of the current document. Note that the command has been renamed +% from \cs{savepos} to \cs{SavePos} in release~0.2, because Lua\TeX{} since +% 0.85 uses \cs{savepos} as a new primitive. On other engines the old name +% \cs{savepos} is still available. % % \DescribeMacro{\vskipnextgrid} % This command moves to the next grid position. To achieve this, a position @@ -214,17 +212,62 @@ about the files the work consists of. % \iffalse meta-comment %<*package> % \fi ^^A meta-comment +% +% \begin{macro}{gridset@luaorpdf} +% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85} +% \begin{macro}{\gridset@pageheight} +% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85} +% \begin{macro}{\gridset@pagewidth} +% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85} +% \begin{macro}{\gridset@savepos} +% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85} +% \begin{macro}{\gridset@lastxpos} +% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85} +% \begin{macro}{\gridset@lastypos} +% \changes{v0.2}{2017/06/05}{new internal because of Lua\TeX~0.85} +% We need some locals because Lua\TeX{} changed the names of several +% primitives inherited from PDF\TeX. % \begin{macrocode} -%\ProvidesPackage{gridset}[\fileversion\space (package)] +\newcommand*{\gridset@luaorpdf}[1]{% + \expandafter\newcommand\csname gridset@#1\endcsname{}% + \ifcsname pdf#1\endcsname + \expandafter\let\csname gridset@#1\expandafter\endcsname + \csname pdf#1\endcsname + \else + \ifcsname #1\endcsname + \expandafter\let\csname gridset@#1\expandafter\endcsname + \csname #1\endcsname + \else + \PackageError{gridset}{% + neither \expandafter\string\csname #1\endcsname\space + nor \xpandafter\string\csname pdf#1\endcsname\space + defined% + }{This package needs either PDFTeX or LuaTeX or XeTeX.}% + \fi + \fi +} +\gridset@luaorpdf{pageheight} +\gridset@luaorpdf{pagewidth} +\gridset@luaorpdf{savepos} +\gridset@luaorpdf{lastxpos} +\gridset@luaorpdf{lastypos} % \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\gridbase} +% \changes{v0.2}{2017/06/05}{prepared for Lua\TeX~0.85} % \begin{macro}{\gridinterval} -% These contain the grid information. \cs{gridbase} is a integer number -% representing the absolute y coordinate of the upper end of the -% grid relative to the same reference point \cs{pdfsavepos} -% uses. \cs{gridinterval} is a integer number representing the distance of -% two grid lines. The unit is `scaled point' (sp) both time. +% \changes{v0.2}{2017/06/05}{prepared for Lua\TeX~0.85} +% These contain the grid information. \cs{gridbase} is a integer number +% representing the absolute y coordinate of the upper end of the +% grid relative to the same reference point \cs{pdfsavepos} +% uses. \cs{gridinterval} is a integer number representing the distance of +% two grid lines. The unit is `scaled point' (sp) both time. % \begin{macrocode} \newcommand*{\gridbase}{} \newcommand*{\gridinterval}{} @@ -235,14 +278,14 @@ about the files the work consists of. % \cs{pdfpagewidth} if this hasn't been done already. % \begin{macrocode} \AtBeginDocument{% - \ifdim\pdfpageheight=\z@ - \pdfpageheight=\pageheight + \ifdim\gridset@pageheight=\z@ + \gridset@pageheight=\paperheight \fi - \ifdim\pdfpagewidth=\z@ - \pdfpagewidth=\pagewidth + \ifdim\gridset@pagewidth=\z@ + \gridset@pagewidth=\paperwidth \fi \begingroup - \@tempdima=\dimexpr \pdfpageheight - \topmargin - 1in + \@tempdima=\dimexpr \gridset@pageheight - \topmargin - 1in - \headheight - \headsep - \topskip \relax \@tempcnta=\@tempdima @@ -256,31 +299,47 @@ about the files the work consists of. % \end{macro} % % \begin{macro}{\savepos} -% Save current position on the page to the \texttt{aux}-file. The argument -% is a unique name for the position. The saved informations are: -% \begin{itemize} -% \item the name of the position, -% \item the arabic page number of the page with the position, -% \item the grid base, that was valid for this position, -% \item the grid interval, that was valid for this position, -% \item the x-coordinate of the absolute position, -% \item the y-coordinate of the absolute position. -% \end{itemize} +% \changes{v0.2}{2017/06/05}{macro renamed} +% \begin{macro}{\SavePos} +% \changes{v0.2}{2017/06/05}{new name} +% \changes{v0.2}{2017/06/05}{prepared for Lua\TeX~0.85} +% Save current position on the page to the \texttt{aux}-file. The argument +% is a unique name for the position. The saved informations are: +% \begin{itemize} +% \item the name of the position, +% \item the arabic page number of the page with the position, +% \item the grid base, that was valid for this position, +% \item the grid interval, that was valid for this position, +% \item the x-coordinate of the absolute position, +% \item the y-coordinate of the absolute position. +% \end{itemize} % \begin{macrocode} -\newcommand*{\savepos}[1]{% +\newcommand*{\SavePos}[1]{% \begingroup - \pdfsavepos + \gridset@savepos \protected@write\@auxout{}{% \protect\newpos{#1}{\the\count\z@}{\gridbase}{\gridinterval}{% - \noexpand\number\pdflastxpos + \noexpand\number\gridset@lastxpos }{% - \noexpand\number\pdflastypos + \noexpand\number\gridset@lastypos }% }% \endgroup } +\ifx\savepos\gridset@savepos + \PackageInfo{gridset}{LuaTeX detected.\MessageBreak + Note, gridset command is \string\SavePos\MessageBreak + but not \string\savepos, which is\MessageBreak + a LuaTeX primitive + }% +\else + \PackageInfo{gridset}{\string\savepos\space defined as an alias of + \string\SavePos}% + \newcommand*{\savepos}{\SavePos}% +\fi % \end{macrocode} % \end{macro} +% \end{macro} % % \begin{macro}{\newpos} % This is the command, that has been written to the \texttt{aux}-file. @@ -377,10 +436,10 @@ about the files the work consists of. % % \begin{macro}{\vskipnextgrid} % \begin{macro}{gridcnt} -% Move to next grid position. The counter \texttt{gridcnt} is used to give -% every move to position a unique position name. The names are -% `\texttt{vp!\meta{number of the move to position}}'. You may use this to -% get informations e.g. about the last move to position. +% Move to next grid position. The counter \texttt{gridcnt} is used to give +% every move to position a unique position name. The names are +% `\texttt{vp!\meta{number of the move to position}}'. You may use this to +% get informations e.g. about the last move to position. % \begin{macrocode} \newcounter{gridcnt} \newcommand*{\vskipnextgrid}{% @@ -388,13 +447,13 @@ about the files the work consists of. \stepcounter{gridcnt}\edef\@tempa{vp!\thegridcnt}% \ifvmode % \end{macrocode} -% \cs{pdfsavepos} in vertical mode is a problem, because the base line -% alignment will be done at least at paragraph breaking. Because of this, -% we have to leave the vertical mode and do it then. But remark: If you -% change the base line skip e.g. changing the font size, the next line would -% not be grid aligned! +% \cs{pdfsavepos} in vertical mode is a problem, because the base line +% alignment will be done at least at paragraph breaking. Because of this, +% we have to leave the vertical mode and do it then. But remark: If you +% change the base line skip e.g. changing the font size, the next line would +% not be grid aligned! % \begin{macrocode} - \leavevmode\savepos{\@tempa}% + \leavevmode\SavePos{\@tempa}% \expandafter\ifx\csname pos@\@tempa @vskip\endcsname\relax \else \expandafter\ifnum \csname pos@\@tempa @vskip\endcsname =\z@\else @@ -407,30 +466,49 @@ about the files the work consists of. \fi \else % \end{macrocode} -% \cs{pdfsavepos} in horizontal mode is a problem too, because we have to -% enter the vertical mode to do vertical skips. Because of this, the remark -% is the same like the vertical mode remark. +% \cs{pdfsavepos} in horizontal mode is a problem too, because we have to +% enter the vertical mode to do vertical skips. Because of this, the remark +% is the same like the vertical mode remark. % \begin{macrocode} \parskip=\z@ - \savepos{vp!\thegridcnt}% + \SavePos{vp!\thegridcnt}% \expandafter\ifx\csname pos@\@tempa @vskip\endcsname\relax \else \expandafter\ifnum \csname pos@\@tempa @vskip\endcsname =\z@\else - \PackageInfo{gridset}{% + \PackageInfo{gridset}{% hmode \string\vskip\csname pos@\@tempa @vskip\endcsname sp% }% - \vskip -\baselineskip - \expandafter\vskip\csname pos@\@tempa @vskip\endcsname sp\relax + \vskip \dimexpr -\baselineskip + + \csname pos@\@tempa @vskip\endcsname sp\relax +% \end{macrocode} +% \changes{v0.3}{2020/02/12}{support for twocolumn mode} +% In twocolumn mode we have to take care that in the second column we reduce +% the horizontal movement by the width of the first column plus the column +% separation. +% Note: This may fail, because the column information may be wrong +% outside the output routine. Maybe we should add this information to +% \cs{SavePos} or correct the x-pos there. +% \begin{macrocode} + \leavevmode \if@twoside \expandafter\ifodd\csname pos@\@tempa @page\endcsname\relax - \leavevmode\hskip \dimexpr - 1in - \oddsidemargin - \parindent + \hskip \dimexpr -1in - \oddsidemargin - \parindent + \if@twocolumn\if@firstcolumn\else + - \columnwidth - \columnsep + \fi\fi + \csname pos@\@tempa @x\endcsname sp\relax \else - \leavevmode\hskip \dimexpr - 1in - \evensidemargin - \parindent + \hskip \dimexpr -1in - \evensidemargin - \parindent + \if@twocolumn\if@firstcolumn\else + - \columnwidth - \columnsep + \fi\fi + \csname pos@\@tempa @x\endcsname sp\relax \fi \else - \leavevmode\hskip \dimexpr - 1in - \oddsidemargin - \parindent + \hskip \dimexpr -1in - \oddsidemargin - \parindent + \if@twocolumn\if@firstcolumn\else + - \columnwidth - \columnsep + \fi\fi + \csname pos@\@tempa @x\endcsname sp\relax \fi \fi @@ -475,7 +553,7 @@ about the files the work consists of. \csname endinput\endcsname % % -% \fi ^^A meta-comment +% \fi % % \section{Example} % @@ -483,7 +561,7 @@ about the files the work consists of. % runs until no new rerun warning occurs. % \iffalse meta-comment %<*example> -% \fi ^^A meta-comment +% \fi % \begin{macrocode} \documentclass[a4paper,12pt]{article} \usepackage{gridset} @@ -499,7 +577,7 @@ about the files the work consists of. \@whilenum \value{Zeile}<40\do {% \stepcounter{Zeile}% \theZeile. Zeile: - \savepos{\thepage.\theZeile}\thegridinfo{\thepage.\theZeile}\par + \SavePos{\thepage.\theZeile}\thegridinfo{\thepage.\theZeile}\par }% \makeatother \clearpage @@ -508,7 +586,7 @@ about the files the work consists of. \@whilenum \value{Zeile}<20\do {% \stepcounter{Zeile}% \theZeile. Zeile: - \savepos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par + \SavePos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par }% \makeatother \clearpage @@ -518,7 +596,7 @@ about the files the work consists of. \@whilenum \value{Zeile}<20\do {% \stepcounter{Zeile}% \theZeile. Zeile: - \savepos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par + \SavePos{\thepage.\theZeile}\theposinfo{\thepage.\theZeile}\par }% \makeatother \clearpage @@ -556,7 +634,7 @@ at hmode}% % \end{macrocode} % \iffalse meta-comment % -% \fi ^^A meta-comment +% \fi % % \Finale % @@ -564,9 +642,7 @@ at hmode}% % % end of `gridset.dtx' % -% \iffalse meta-comment %%% Local Variables: %%% mode: docTeX %%% TeX-master: t %%% End: -% \fi ^^A meta-comment diff --git a/macros/latex/contrib/gridset/gridset.ins b/macros/latex/contrib/gridset/gridset.ins deleted file mode 100644 index 8e0abd49d9..0000000000 --- a/macros/latex/contrib/gridset/gridset.ins +++ /dev/null @@ -1,90 +0,0 @@ -%% -%% This is file `gridset.ins', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% gridset.dtx (with options: `ins') -%% Copyright (c) Markus Kohm 2008 -%% -%% IMPORTANT NOTE: -%% -%% This is a generated file and you are not allowed to distribute it -%% without the source ot the work. See below about more informations -%% about the files the work consists of. -%% -%% This work may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2003/12/01 or later. -%% -%% This work has the LPPL maintenance status "maintained". -%% -%% The author of the initial version of these work was -%% Markus Kohm -%% -%% This work consists of the files gridset.dtx and README. -%% -%% Important Recommendation: -%% The LPPL requires that distributions of the Work contain all the files of -%% the Work (see ``Important Recommendations'' at lppl.txt). -%% -\def\batchfile{gridset.ins} - \input docstrip.tex - - \ifToplevel{% - \let\ifalpha\iffalse - } - \keepsilent - \askforoverwritefalse - \usedir{tex/latex/gridset} - \preamble -Copyright (c) Markus Kohm 2008 - -IMPORTANT NOTE: - -This is a generated file and you are not allowed to distribute it -without the source ot the work. See below about more informations -about the files the work consists of. - -\endpreamble - - \generate{% - \file{gridset.tex}{\from{gridset.dtx}{tex}}% - \file{gridset.ins}{\from{gridset.dtx}{ins}}% - \file{gridsetx.sty}{\from{gridset.dtx}{package}}% - \file{gridsetexample.tex}{\from{gridset.dtx}{example}}% - } - - \ifToplevel{% - \Msg{*********************************************************************} - \Msg{*} - \Msg{* gridset} - \Msg{* =======} - \Msg{*} - \ifalpha% ALPHA - \Msg{* THIS IS AN ALPHA VERSION!} - \Msg{* DON'T USE IT ONLY TEST IT!} - \Msg{*} - \fi - \Msg{* To finish the installation run} - \Msg{* \space\space latex gridset.dtx} - \Msg{* or} - \Msg{* \space\space pdflatex gridset.dtx} - \Msg{* and then copy} - \Msg{* \space\space gridset.sty to .../tex/latex/gridset/} - \Msg{* \space\space gridset.dvi or gridset.pdf to .../doc/latex/gridset/} - \Msg{* \space\space gridset.dtx and README to .../source/latex/gridset/} - \Msg{* where .../ is your local TDS tree.} - \Msg{* On some systems you'll get the local TDS tree using:} - \Msg{* \space\space kpsewhich -var-value=TEXMFLOCAL} - \Msg{*} - \Msg{*********************************************************************} - } - -\endinput -%% -%% End of file `gridset.ins'. diff --git a/macros/latex/contrib/gridset/gridset.pdf b/macros/latex/contrib/gridset/gridset.pdf index dbe5ddfbdb..3f6a39a8e9 100644 Binary files a/macros/latex/contrib/gridset/gridset.pdf and b/macros/latex/contrib/gridset/gridset.pdf differ diff --git a/macros/latex/contrib/nlctdoc/nlctdoc.cls b/macros/latex/contrib/nlctdoc/nlctdoc.cls index 4afd5eb703..1067813691 100644 --- a/macros/latex/contrib/nlctdoc/nlctdoc.cls +++ b/macros/latex/contrib/nlctdoc/nlctdoc.cls @@ -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@class}} +\newif\ifwbprompt +\wbpromptfalse +\DeclareOption{wbprompt}{\wbprompttrue} \ProcessOptions + \@nlctdoc@if@usingtexht {% \LoadClass{\@nlctdoc@class} @@ -97,6 +101,7 @@ \LoadClass[captions=tableheading,abstract=true]{\@nlctdoc@class} \fi }% + \RequirePackage{xcolor} \ifxetex \else @@ -131,13 +136,38 @@ \@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@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@setupmargin \def\@@doxdescribe#1#2{% \endgroup% \ifdox@noprint\else% - \marginpar{\nlctdocmarginfmt\@nameuse{PrintDescribe#1}{#2}}% + \nlctdocmargin{\@nameuse{PrintDescribe#1}{#2}}% \fi% \ifdox@noindex\else% \@nameuse{Special#1Index}{#2}% @@ -145,8 +175,14 @@ \endgroup% \@esphack\ignorespaces} +\newcommand{\nlctdocmargin}[1]{\marginpar{\nlctdocmarginfmt#1}} +\newcommand{\nlctdocmarginwide}[1]{% + \marginpar{\parbox[b][2\baselineskip]{\marginparwidth}{\nlctdocmarginfmt#1\vfill\par}}% +} + +\newrobustcmd\cs[1]{\texttt{\char`\\#1}} -\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} +\newrobustcmd*{\mgroup}[1]{\texttt{\char`\{#1\char`\}}} \providecommand\marg[1]{% \allowbreak{\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}} @@ -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@indexfalse @@ -256,8 +295,6 @@ \PageIndex \CodelineNumbered -\newcommand{\importantsymbol}{\bfseries\Huge\danger} - \newcommand\Describe@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@importantparafter{#1}% + \@importantpar +} + \@nlctdoc@if@usingtexht {% \newenvironment{definition}[1][]{% @@ -275,19 +322,30 @@ \HCode{
}\par\noindent } - \newcommand{\importantpar}[1][-3]{\importantsymbol\space} - + \newcommand{\importantsymbol}{\HCode{&\#9888;}} + \newcommand{\@importantpar}[1][]{\importantsymbol\space} \newenvironment{important}{% \par\HCode{
}\noindent }{% \HCode{
}\par\noindent } - \newenvironment{prompt}{% - \HCode{}\begin{ttfamily}\obeylines\ignorespaces - }{% - \end{ttfamily}\HCode{}\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{
}%
+     \obeylines\ignorespaces}%
+    {\HCode{
}\par\noindent} + + \else + \newenvironment{prompt}% + {\HCode{}\begin{ttfamily}\obeylines\ignorespaces}% + {\end{ttfamily}\HCode{}\noindent} + \fi \newenvironment{display}{% \HCode{}\obeylines\ignorespaces @@ -312,20 +370,18 @@ \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}% \vskip10pt \noindent \ifwidecs - \let\Describe@Macro\Describe@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@tmpsbox + \newcommand{\@importantpar}[1][0pt]{% + \sbox\@nlctdoc@tmpsbox{\importantsymbolfont{\importantsymbol}}% + \settoheight{\tmpheight}{\usebox\@nlctdoc@tmpsbox}% + \settowidth{\tmpwidth}{\usebox\@nlctdoc@tmpsbox}% + \advance\tmpheight by #1\relax \advance\tmpwidth by .5em\relax \par\noindent \hangindent=\tmpwidth - \hangafter=#1\relax + \hangafter=\@nlct@importantparafter\relax \makebox[0pt][l]{\hspace*{-\tmpwidth}% - \smash{\raisebox{-\tmpheight}{\importantsymbol}}% + \smash{\raisebox{-\tmpheight}{\usebox\@nlctdoc@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@iapp\@iapp} + +\newcommand*{\s@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{\idxmarker@SpecialMainIndex}[1]{% + \@bsphack \idxmarker@SpecialIndex@ {#1}{\nlctdocmainencap}\@esphack +} + +\newcommand\idxmarker@SpecialIndex@[2]{% + \@SpecialIndexHelper@#1\@nil + \def\@tempb{ }% + \ifcat \@tempb\@gtempa + \special@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@index{\quotechar##1\actualchar + \doidxmarker\string\verb\quotechar*\verbatimchar + \quotechar\bslash\quotechar##1\verbatimchar#2}}% + \else + \def\@tempc{\special@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@ifplus}[1]{\@ifnextchar+{\@firstoftwo {#1}}} + +\newrobustcmd{\ics}{\@ifstar\s@ics\@ics} + +\newcommand*{\s@ics}[1]{\idxmarkedfont{\cs{#1}}\idxmarker@SpecialMainIndex{#1}} +\newcommand*{\@ics}[1]{\cs{#1}\SpecialMainIndex{#1}} + +\newrobustcmd{\csmeta}{\@ifstar\s@csmeta\@csmeta} -\newcommand*{\icsopt}[2]{\index{#1 options\actualchar\cs{#1} options\levelchar#2\actualchar\textsf{#2}\encapchar hyperpage}} +\newcommand*{\s@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}} -\newcommand*{\csopt}[2]{% - \textsf{#2}% +\newrobustcmd{\csmetameta}{\@ifstar\s@csmetameta\@csmetameta} + +\newcommand*{\s@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@icsopt\ns@icsopt} + +\newcommand*{\ns@icsopt}{\nlctdoc@ifplus\p@icsopt\@icsopt} + +\newcommand*{\s@icsopt}[2]{% + \index{#1 options\actualchar\cs{#1} options\levelchar#2\actualchar\doidxmarker\csoptfmt{#2}\nlctdochyperencap}} + +\newcommand*{\p@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@csopt\@csopt} + +\newcommand*{\s@csopt}[2]{% + \idxmarkedfont{\csoptfmt{#2}}% \@for\@thiscmd:=#1\do{% - \icsopt{\@thiscmd}{#2}% + \s@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@ipkgopt\ns@ipkgopt} + +\newcommand*{\ns@ipkgopt}{\nlctdoc@ifplus\p@ipkgopt\@ipkgopt} + +\newcommand*{\s@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@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}}% } -\newcommand*{\clsoptfmt}[1]{\textsf{#1}} +\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@pkgopt\ns@pkgopt} + +\newcommand*{\ns@pkgopt}{\nlctdoc@ifplus\p@pkgopt\@pkgopt} + +\newcommand*{\s@pkgopt}[2][]{% + \idxmarkedfont{\ifstrempty{#1}{\pkgoptfmt{#2}}{\pkgoptfmt{#2\dequals#1}}}% + \s@ipkgopt[#1]{#2}% +} + +\newcommand*{\p@pkgopt}[2]{% + \idxmarkedfont{\pkgoptfmt{#2\dequals#1}}\p@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@pkgoptval\ns@pkgoptval} + +\newcommand*{\ns@pkgoptval}{\nlctdoc@ifplus\p@pkgoptval\@pkgoptval} + +\newcommand*{\s@pkgoptval}[2]{\idxmarkedfont{\pkgoptfmt{#1}}\s@ipkgopt[#1]{#2}} + +\newcommand*{\p@pkgoptval}[2]{\idxmarkedfont{\pkgoptfmt{#1}}\p@ipkgopt[#1]{#2}} + +\newcommand*{\@pkgoptval}[2]{\pkgoptfmt{#1}\@ipkgopt[#1]{#2}} +% Class options + +% \iclsopt{option} % \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 +% \iclsopt*{option} <- mark option +% \iclsopt*[value]{option} <- mark value +% \iclsopt+{value}{option} <- mark option + +\newcommand*{\clsoptfmt}[1]{\textsf{#1}} + +\newrobustcmd*{\iclsopt}{\@ifstar\s@iclsopt\ns@iclsopt} + +\newcommand*{\ns@iclsopt}{\@ifnextchar+\p@iclsopt\@iclsopt} + +\newcommand*{\s@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@iclsopt}[2]{% + \index{class options:>#2=\doidxmarker\clsoptfmt{#2}>#1=\clsoptfmt{#1}\nlctdocmainencap}% +} + +\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@clsopt\ns@clsopt} + +\newcommand*{\ns@clsopt}{\nlctdoc@ifplus\p@clsopt\@clsopt} + +\newcommand*{\s@clsopt}[2][]{% + \idxmarkedfont{\ifstrempty{#1}{\clsoptfmt{#2}}{\clsoptfmt{#2\dequals#1}}}% + \s@iclsopt[#1]{#2}% +} + +\newcommand*{\p@clsopt}[2]{% + \idxmarkedfont{\ifstrempty{#1}{\clsoptfmt{#2}}{\clsoptfmt{#2\dequals#1}}}% + \p@iclsopt{#1}{#2}% +} + +\newcommand*{\@clsopt}[2][]{% + \ifstrempty{#1}{\clsoptfmt{#2}}{\clsoptfmt{#2\dequals#1}}% + \@iclsopt[#1]{#2}% } -% \clsoptval{value}{option} -\newcommand*{\clsoptval}[2]{% - \clsoptfmt{#1}% - \index{class options:>#2=\clsoptfmt{#2}>#1=\clsoptfmt{#1}|main}% +\newrobustcmd*{\deprecatedclsopt}[2][]{% + \ifstrempty{#1}{\clsoptfmt{#2}}{\clsoptfmt{#2\dequals#1}}% + \ideprecatedclsopt[#1]{#2}% } +\newrobustcmd*{\clsoptval}{\@ifstar\s@clsoptval\ns@clsoptval} + +\newcommand*{\ns@clsoptval}{\nlctdoc@ifplus\p@clsoptval\@clsoptval} + +\newcommand*{\s@clsoptval}[2]{\idxmarkedfont{\clsoptfmt{#1}\s@iclsopt[#1]{#2}}} + +\newcommand*{\p@clsoptval}[2]{\idxmarkedfont{\clsoptfmt{#1}\p@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@isty\@isty} + +\newcommand*{\@isty}[1]{\index{#1 package=\styfmt{#1} + package\nlctdocmainencap}} +\newcommand*{\s@isty}[1]{\index{#1 package=\doidxmarker\styfmt{#1} + package\nlctdocmainencap}} + +\newrobustcmd{\sty}{\@ifstar\s@sty\@sty} + +\newcommand*{\@sty}[1]{\styfmt{#1}\@isty{#1}} +\newcommand*{\s@sty}[1]{\idxmarkedfont{\styfmt{#1}}\s@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@icls\@icls} + +\newcommand*{\@icls}[1]{\index{#1 class=\clsfmt{#1} + class\nlctdocmainencap}} +\newcommand*{\s@icls}[1]{\index{#1 class=\doidxmarker\clsfmt{#1} + class\nlctdocmainencap}} + +\newrobustcmd{\cls}{\@ifstar\s@cls\@cls} + +\newcommand*{\@cls}[1]{\clsfmt{#1}\@icls{#1}} +\newcommand*{\s@cls}[1]{\idxmarkedfont{\clsfmt{#1}}\s@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 @@ bibliography style|hyperpage}} \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{

}}{}{}{}% \Configure{subsection}{\toTop\HCode{

}}{}{}{}% - \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 @@ bibliography style|hyperpage}} {\HCode{

}\thechapter. }{\HCode{

}}% \Configure{section}{\toTop\HCode{

}}{}{}{}% \Configure{subsection}{\toTop\HCode{

}}{}{}{}% - \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;} }% }% }% -- cgit v1.2.3