summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty')
-rw-r--r--Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty30
1 files changed, 18 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty b/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty
index f2dc355469b..35e50dd8bc9 100644
--- a/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty
+++ b/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty
@@ -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 2022-2024 Nicola Talbot
+% Copyright 2022-2025 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}
-\ProvidesPackage{nlctuserguide}[2024/11/09 v1.11 (NLCT)]
+\ProvidesPackage{nlctuserguide}[2025/01/03 v1.12 (NLCT)]
\newcommand{\nlctdoc@loadxr}{}
\DeclareOption{xr}{\renewcommand{\nlctdoc@loadxr}{\RequirePackage{xr-hyper}}}
@@ -573,8 +573,10 @@
\newrobustcmd{\mExampleref}[1]{\Exampleref{#1}\examplemarginref{#1}}
\newrobustcmd{\mexampleref}[1]{\exampleref{#1}\examplemarginref{#1}}
+\newcommand{\exmarginfont}{\color{black}\footnotesize}% v1.12
+
\newrobustcmd{\examplemarginref}[1]{%
- \marginpar{\footnotesize\hyperref[#1]{\codesym}\ref{#1}\plabel{#1-backref}}%
+ \marginpar{\exmarginfont\hyperref[#1]{\codesym}\ref{#1}\plabel{#1-backref}}%
}
\newcommand*{\plabel}[2][]{\protected@edef\@currentlabelname{#1}\label{#2}}
@@ -923,6 +925,7 @@ engine (\XeLaTeX\ or \LuaLaTeX)}
% inline
\newcommand{\code}[1]{\texorpdfstring{\@code{#1}}{#1}}
\newrobustcmd{\@code}[1]{{\setupcodeenvfmts\codefont\obeyspaces #1}}
+\newcommand{\smcode}[1]{\@code{\small #1}}
\definecolor{codebackground}{gray}{0.95}
@@ -1992,6 +1995,7 @@ to find out if the example files are installed on your device.\par
\newcommand*{\oarg}[1]{\discretionary{}{}{}[#1]}
\newcommand*{\oargm}[1]{\oarg{\meta{#1}}}
+\newcommand*{\oargnobr}[1]{\discretionary{}{}{}\mbox{[#1]}}% v1.12
% To prevent lonely [ and ] from upsetting the syntax highlighter:
\newrobustcmd*{\nlctopensqbracket}{[}
@@ -2306,6 +2310,8 @@ to find out if the example files are installed on your device.\par
\glsxtrifhasfield{syntax}{opt.#2}{\dequals\glscurrentfieldvalue}{}}%
}
+\newcommand{\summarytagfill}{\space\allowbreak\mbox{}\nolinebreak\hfill}% v1.12
+
\newcommand{\@cmddef@init}{%
\let\csfmtfont\@firstofone
\def\cmdfont##1{\textbf{\texttt{##1}}}%
@@ -2321,7 +2327,7 @@ to find out if the example files are installed on your device.\par
\gathermodifiers{#2}%
\gathervariants{#2}%
\cmddefsyntax{#1}{#2}%
- \def\tagsep{\hfill}%
+ \def\tagsep{\summarytagfill}%
\ifdefempty\nlctmodifierlist
{%
\ifdefempty\nlctvariantlist
@@ -2604,7 +2610,7 @@ to find out if the example files are installed on your device.\par
\def\optfmt##1{\textbf{\texttt{##1}}}%
\mainglsadd{opt.#1}{optdef}\glsxtrglossentry{opt.#1}%
\glsxtrifhasfield{syntax}{opt.#1}{\texttt{=\glscurrentfieldvalue}}{}%
- \ifdefempty\initordefval{}{\hfill\initordefval}%
+ \ifdefempty\initordefval{}{\summarytagfill\initordefval}%
\glsxtrifhasfield*{note}{opt.#1}%
{%
\ifx\optnotefmt\@gobble
@@ -2746,7 +2752,7 @@ to find out if the example files are installed on your device.\par
\par\medskip\ignorespaces
}
-\newrobustcmd*{\summarytagfmt}[1]{\textnormal{\em #1:} }
+\newrobustcmd*{\summarytagfmt}[1]{\textnormal{\em #1:}~}
\newcommand*{\getinitordefval}[1]{%
\let\currentsyntax\@empty
@@ -3279,7 +3285,7 @@ to find out if the example files are installed on your device.\par
\gathermodifiers{#1}%
\ifdefempty\nlctmodifierlist{}
{%
- \hfill\summarytagfmt{\nlctmodifiertag}\nlctmodifierlist
+ \summarytagfill\summarytagfmt{\nlctmodifiertag}\nlctmodifierlist
\gdef\summaryentry@post@fill{\quad }%
}%
}
@@ -3291,7 +3297,7 @@ to find out if the example files are installed on your device.\par
\syntax{#1}%
\glsxtrifhasfield{initvalue}{#1}%
{%
- \hfill\summarytagfmt{initial}\glscurrentfieldvalue
+ \summarytagfill\summarytagfmt{initial}\glscurrentfieldvalue
\gdef\summaryentry@post@fill{\quad }%
}%
{%
@@ -3302,12 +3308,12 @@ to find out if the example files are installed on your device.\par
\ifdefempty\nlctvariantlist
{}%
{%
- \hfill\summarytagfmt{\nlctvarianttag}\nlctvariantlist
+ \summarytagfill\summarytagfmt{\nlctvarianttag}\nlctvariantlist
\gdef\summaryentry@post@fill{\quad }%
}%
}%
{%
- \hfill\summarytagfmt{\nlctmodifiertag}\nlctmodifierlist
+ \summarytagfill\summarytagfmt{\nlctmodifiertag}\nlctmodifierlist
\gdef\summaryentry@post@fill{\quad }%
}%
}%
@@ -3333,7 +3339,7 @@ to find out if the example files are installed on your device.\par
\def\optiontag{#1}%
\textbf{\linkedentryname{#2}}%
\ifdefempty\currentsyntax{}{\dequals\currentsyntax}%
- \hfill
+ \summarytagfill
\textrm{\ifdefempty\initordefval{}{\initordefval}%
\ifdefempty\optiontag{}{ \optiontag}}%
\gdef\summaryentry@post@fill{ }%
@@ -3344,7 +3350,7 @@ to find out if the example files are installed on your device.\par
\getinitordefval{#1}%
\textbf{\linkedentryname{#1}}%
\ifdefempty\currentsyntax{}{\dequals\currentsyntax}%
- \hfill
+ \summarytagfill
\textrm{\ifdefempty\initordefval{}{\initordefval}%
\ifdefempty\settingstitle{}{ \settingstitle}}%
\gdef\summaryentry@post@fill{ }%