texlive[68448] Master/texmf-dist: nlctdoc (3oct23)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 3 22:10:20 CEST 2023


Revision: 68448
          https://tug.org/svn/texlive?view=revision&revision=68448
Author:   karl
Date:     2023-10-03 22:10:20 +0200 (Tue, 03 Oct 2023)
Log Message:
-----------
nlctdoc (3oct23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/nlctdoc/README
    trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls
    trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty

Modified: trunk/Master/texmf-dist/doc/latex/nlctdoc/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nlctdoc/README	2023-10-03 20:10:11 UTC (rev 68447)
+++ trunk/Master/texmf-dist/doc/latex/nlctdoc/README	2023-10-03 20:10:20 UTC (rev 68448)
@@ -1,4 +1,4 @@
-nlctdoc.cls and nlctuserguide.sty v1.09 (2023-06-28):
+nlctdoc.cls and nlctuserguide.sty v1.10 (2023-09-29):
 
 This class and package is provided "as is" solely for the benefit 
 of anyone who wants to compile the documentation for

Modified: trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls	2023-10-03 20:10:11 UTC (rev 68447)
+++ trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls	2023-10-03 20:10:20 UTC (rev 68448)
@@ -18,7 +18,7 @@
 % for existing documents that use it.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{nlctdoc}[2023/06/28 v1.09 (NLCT)]
+\ProvidesClass{nlctdoc}[2023/09/29 v1.10 (NLCT)]
 \RequirePackage{ifpdf}
 \RequirePackage{ifxetex}
 % tex4ht stopped working with koma during TL2013.

Modified: trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty	2023-10-03 20:10:11 UTC (rev 68447)
+++ trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty	2023-10-03 20:10:20 UTC (rev 68448)
@@ -15,7 +15,7 @@
 %  version 2005/12/01 or later.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{nlctuserguide}[2023/06/28 v1.09 (NLCT)]
+\ProvidesPackage{nlctuserguide}[2023/09/29 v1.10 (NLCT)]
 
 \newcommand{\nlctdoc at loadxr}{}
 \DeclareOption{xr}{\renewcommand{\nlctdoc at loadxr}{\RequirePackage{xr-hyper}}}
@@ -517,7 +517,7 @@
 \newcommand*{\xrsectionref}[3]{Section~\ref{#1}}
 
 \newcommand{\deflist at item}[1]{\item[]#1}
-\newenvironment{itemdesc}{\par\ignorespaces}{\ignorespacesafterend}
+\newenvironment{itemdesc}{\par\nobreak\ignorespaces}{\ignorespacesafterend}
 
 \newenvironment{deflist}
  {\begin{description}\let\itemtitle\deflist at item}
@@ -806,7 +806,7 @@
 after upper={\GlsXtrDiscardUnsetBuffering},
 halign upper=flush left,halign lower=justify,
 valign upper=top,valign lower=top,
-before lower={\renewcommand*{\nlct at preattachments}{\vspace*{-\baselineskip}}},
+before lower={\let\nlct at ex@title at attachments\nlct at ex@narrow at title@attachments},
 after lower={\noindent},
 #1
 }
@@ -978,7 +978,7 @@
 \newcommand{\example at label@info}{}
 
 \define at key{nlctexample}{label}{%
- \renewcommand{\example at label@info}{\glspercentchar\space Label: #1^^J}%
+ \renewcommand{\example at label@info}{\glspercentchar\space Label: "#1"^^J}%
  \renewcommand*{\example at do@label}{\label{#1}}%
 }
 
@@ -993,6 +993,7 @@
 
 \newcommand{\nlctexamplelets}{%
  \let\gls\glsentrytext
+ \let\glscmd\glsentrytext
  \let\env\@firstofone
  \let\ctr\@firstofone
  \let\texorpdfstring\@secondoftwo
@@ -1003,6 +1004,9 @@
  \def\comment##1{\glspercentchar\space ##1^^J}%
  \def\%{\glspercentchar}%
  \edef\#{\expandafter\@gobble\string\#}%
+% v1.10:
+ \edef\${\expandafter\@gobble\string\$}%
+ \edef\_{\expandafter\@gobble\string\_}%
  \def\-{}%
  \def\codepar{^^J^^J}%
  \def\marg##1{\glsopenbrace##1\glsclosebrace}%
@@ -1032,6 +1036,7 @@
  {\nlctexamplelets\immediate\write\nlct at exampleout{%
     \createexamplefirstline
     \glspercentchar\space \Examplename\space \theexample\space\example at title^^J%
+    \example at label@info
     \nlct at create@example at precls\nlct at create@example at preamble
     #1^^J\string\begin{document}^^J#2^^J%
     \string\end{document}}%
@@ -1117,17 +1122,24 @@
 \newcommand\nlctexamplefilebasename{%
  \jobname-example\ifnum\c at example<10 00\else \ifnum\c at example<100 0\fi\fi\the\c at example}%
 
-\newcommand*{\nlct at preattachments}{}
-
 \newcommand{\nlctexampledisablecmds}{}
 
 \newcommand{\nlctexampletag}{\Examplename~\theexample}
 
 \newcommand{\nlctexampletitlefmt}[1]{%
-  \nlctexampletitlefont\raggedright
+  \nlctexampletitlefont
+  \raggedright\exhyphenpenalty 0 % space intended
   \nlctexampletag\ifstrempty{#1}{}{: #1}\par
 }
 
+\newcommand{\nlct at ex@title at attachments}[2]{%
+   \nlctexampletitlebox{#1}\hfill#2%
+}
+
+\newcommand{\nlct at ex@narrow at title@attachments}[2]{%
+  \nlctexampletitlefmt{#1}\hfill#2%
+}
+
 \newcommand{\nlctexampletitlebox}[2][0.8\linewidth]{%
  \parbox[t]{#1}{\nlctexampletitlefmt{#2}}}
 
@@ -1177,10 +1189,12 @@
   \example at do@label
   \let\nlct at org@cmd\cmd
   \def\cmd##1{\csfmt{##1}}%
+  \def\glscmd##1{\noexpand\glsfmttext{##1}}%
   \protected at edef\example at tex@title{\example at title}%
   \@loe at disable@cmds
   \addtolistofexamples{\example at title}%
   \def\cmd##1{\string\\##1}%
+  \let\glscmd\cmd
   \let\code\@firstofone
   \let\optfmt\@firstofone
   \let\styfmt\@firstofone
@@ -1220,42 +1234,44 @@
   \immediate\write18{\create at example@tex\space\nlct at example@filebasename.tex}%
   \nlct at ifattachsupported
   {%
-    \nlct at preattachments
     \bgroup
-    \nlctexampletitlebox{\example at tex@title}\hfill
-    \nlctexampletagattachfont
-    \textattachfile[mimetype={application/x-tex},
-      author={\@pdfauthor},color={0 0 0},
-      size={\pdf at filesize{\examplesdir/\nlct at example@filebasename.tex}},
-      subject={\example at pdf@title\space (source code)},
-      description={\example at attachdesc\space (source code)}]%
-      {\examplesdir/\nlct at example@filebasename.tex}{\exampleattachtexicon}%
-    \ifnlctdownloadlinks
-     \space
-     \href{\nlctdownloadlink{\examplesdir/\nlct at example@filebasename.tex}}{\exampledownloadtexicon}
-    \fi
-    \ifnlctattachpdf
-      \IfFileExists{\examplesdir/\nlct at example@filebasename.pdf}
-      {%
-         \space
-         \textattachfile[mimetype={application/pdf},
-          author={\@pdfauthor},color={0 0 0},
-          size={\pdf at filesize{\examplesdir/\nlct at example@filebasename.pdf}},
-          subject={\example at pdf@title\space (PDF)},
-          description={\example at attachdesc\space (PDF)}]%
-         {\examplesdir/\nlct at example@filebasename.pdf}{\exampleattachpdficon}%
-      }%
-      {}%
+    \nlct at ex@title at attachments
+    {\example at tex@title}%
+    {%
+      \nlctexampletagattachfont
+      \textattachfile[mimetype={application/x-tex},
+        author={\@pdfauthor},color={0 0 0},
+        size={\pdf at filesize{\examplesdir/\nlct at example@filebasename.tex}},
+        subject={\example at pdf@title\space (source code)},
+        description={\example at attachdesc\space (source code)}]%
+        {\examplesdir/\nlct at example@filebasename.tex}{\exampleattachtexicon}%
       \ifnlctdownloadlinks
        \space
-       \href{\nlctdownloadlink{\examplesdir/\nlct at example@filebasename.pdf}}{\exampledownloadpdficon}
+       \href{\nlctdownloadlink{\examplesdir/\nlct at example@filebasename.tex}}{\exampledownloadtexicon}
       \fi
-    \else
-      \ifnlctdownloadlinks
-       \space
-       \href{\nlctdownloadlink{\examplesdir/\nlct at example@filebasename.pdf}}{\exampledownloadpdficon}
+      \ifnlctattachpdf
+        \IfFileExists{\examplesdir/\nlct at example@filebasename.pdf}
+        {%
+           \space
+           \textattachfile[mimetype={application/pdf},
+            author={\@pdfauthor},color={0 0 0},
+            size={\pdf at filesize{\examplesdir/\nlct at example@filebasename.pdf}},
+            subject={\example at pdf@title\space (PDF)},
+            description={\example at attachdesc\space (PDF)}]%
+           {\examplesdir/\nlct at example@filebasename.pdf}{\exampleattachpdficon}%
+        }%
+        {}%
+        \ifnlctdownloadlinks
+         \space
+         \href{\nlctdownloadlink{\examplesdir/\nlct at example@filebasename.pdf}}{\exampledownloadpdficon}
+        \fi
+      \else
+        \ifnlctdownloadlinks
+         \space
+         \href{\nlctdownloadlink{\examplesdir/\nlct at example@filebasename.pdf}}{\exampledownloadpdficon}
+        \fi
       \fi
-    \fi
+    }%
     \par\egroup\noindent
   }%
   {%
@@ -1272,8 +1288,8 @@
 }
 
 \newenvironment{example}[2]{%
+  \par\vskip10pt\noindent
   \refstepcounter{example}\label{#2}%
-  \par\vskip10pt\noindent
   {%
     \def\cmd##1{\csfmt{##1}}%
     \let\nlctexampletitlefont\nlctexampleenvtitlefont
@@ -1375,7 +1391,9 @@
 \newcommand{\codebackslash}{\texorpdfstring{\char`\\}{\string\\}}
 
 \newcommand{\csmetafmt}[3]{%
- \texorpdfstring{\csfmt{#1\meta{#2}#3}}{\string\\#1\string<#2\string>#3}%
+ \texorpdfstring
+  {\csfmt{#1\ifstrempty{#1}{}{\-}\meta{#2}\ifstrempty{#3}{}{\-}#3}}%
+  {\string\\#1\string<#2\string>#3}%
 }
 \newcommand{\csmetametafmt}[5]{%
  \texorpdfstring{\csfmt{#1\meta{#2}#3\meta{#4}#5}}{\string\\#1\string<#2\string>#3\string<#4\string>#5}%
@@ -1765,6 +1783,12 @@
  \glsxtrglossentry{opt.#2}%
 }
 
+% v1.10
+\newrobustcmd*{\inlinepkgdef}[2][pkgdef]{%
+ \mainglsadd{pkg.#2}{#1}%
+ \glsxtrglossentry{pkg.#2}%
+}
+
 \newcommand*{\mainglsadd}[3][]{%
  \ifstrempty{#3}%
  {\def\mainglsaddcounter{}}%
@@ -1795,8 +1819,10 @@
 
 \newrobustcmd*{\cmddef}{\@ifstar\s at cmddef\@cmddef}
 \newcommand*{\@cmddef}[2][]{%
+ \vskip 1sp plus 2ex\relax
  \pdfbookmark[\cmddefbookmarklevel]{\glsentryname{#2}}{csdef.#2}%
  \nopagebreak\s at cmddef[#1]{#2}%
+ \nopagebreak\ignorespaces
 }
 
 \newcommand*{\cmdnotefmt}[1]{\mbox{#1}}



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