diff options
author | Karl Berry <karl@freefriends.org> | 2023-10-03 20:10:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-10-03 20:10:20 +0000 |
commit | 4ebc1cb6e9b0d92f22e7c9c1a59695cc423e767e (patch) | |
tree | a70b023b1ae3ea804caf832db36ac390273bd8c2 /Master | |
parent | 752d9d81988b1887af42729f2f83443f12d05648 (diff) |
nlctdoc (3oct23)
git-svn-id: svn://tug.org/texlive/trunk@68448 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/nlctdoc/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty | 106 |
3 files changed, 68 insertions, 42 deletions
diff --git a/Master/texmf-dist/doc/latex/nlctdoc/README b/Master/texmf-dist/doc/latex/nlctdoc/README index dbb9ffafaf3..0fddcd3120f 100644 --- a/Master/texmf-dist/doc/latex/nlctdoc/README +++ b/Master/texmf-dist/doc/latex/nlctdoc/README @@ -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 diff --git a/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls b/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls index 8086ada1fbf..f48b30f0c5c 100644 --- a/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls +++ b/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls @@ -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. diff --git a/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty b/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty index 156b98fa29f..bb474690d2c 100644 --- a/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty +++ b/Master/texmf-dist/tex/latex/nlctdoc/nlctuserguide.sty @@ -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@loadxr}{} \DeclareOption{xr}{\renewcommand{\nlctdoc@loadxr}{\RequirePackage{xr-hyper}}} @@ -517,7 +517,7 @@ \newcommand*{\xrsectionref}[3]{Section~\ref{#1}} \newcommand{\deflist@item}[1]{\item[]#1} -\newenvironment{itemdesc}{\par\ignorespaces}{\ignorespacesafterend} +\newenvironment{itemdesc}{\par\nobreak\ignorespaces}{\ignorespacesafterend} \newenvironment{deflist} {\begin{description}\let\itemtitle\deflist@item} @@ -806,7 +806,7 @@ before upper={% after upper={\GlsXtrDiscardUnsetBuffering}, halign upper=flush left,halign lower=justify, valign upper=top,valign lower=top, -before lower={\renewcommand*{\nlct@preattachments}{\vspace*{-\baselineskip}}}, +before lower={\let\nlct@ex@title@attachments\nlct@ex@narrow@title@attachments}, after lower={\noindent}, #1 } @@ -978,7 +978,7 @@ halign upper=flush left,halign lower=justify, \newcommand{\example@label@info}{} \define@key{nlctexample}{label}{% - \renewcommand{\example@label@info}{\glspercentchar\space Label: #1^^J}% + \renewcommand{\example@label@info}{\glspercentchar\space Label: "#1"^^J}% \renewcommand*{\example@do@label}{\label{#1}}% } @@ -993,6 +993,7 @@ halign upper=flush left,halign lower=justify, \newcommand{\nlctexamplelets}{% \let\gls\glsentrytext + \let\glscmd\glsentrytext \let\env\@firstofone \let\ctr\@firstofone \let\texorpdfstring\@secondoftwo @@ -1003,6 +1004,9 @@ halign upper=flush left,halign lower=justify, \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 @@ halign upper=flush left,halign lower=justify, {\nlctexamplelets\immediate\write\nlct@exampleout{% \createexamplefirstline \glspercentchar\space \Examplename\space \theexample\space\example@title^^J% + \example@label@info \nlct@create@example@precls\nlct@create@example@preamble #1^^J\string\begin{document}^^J#2^^J% \string\end{document}}% @@ -1117,17 +1122,24 @@ halign upper=flush left,halign lower=justify, \newcommand\nlctexamplefilebasename{% \jobname-example\ifnum\c@example<10 00\else \ifnum\c@example<100 0\fi\fi\the\c@example}% -\newcommand*{\nlct@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@ex@title@attachments}[2]{% + \nlctexampletitlebox{#1}\hfill#2% +} + +\newcommand{\nlct@ex@narrow@title@attachments}[2]{% + \nlctexampletitlefmt{#1}\hfill#2% +} + \newcommand{\nlctexampletitlebox}[2][0.8\linewidth]{% \parbox[t]{#1}{\nlctexampletitlefmt{#2}}} @@ -1177,10 +1189,12 @@ halign upper=flush left,halign lower=justify, \example@do@label \let\nlct@org@cmd\cmd \def\cmd##1{\csfmt{##1}}% + \def\glscmd##1{\noexpand\glsfmttext{##1}}% \protected@edef\example@tex@title{\example@title}% \@loe@disable@cmds \addtolistofexamples{\example@title}% \def\cmd##1{\string\\##1}% + \let\glscmd\cmd \let\code\@firstofone \let\optfmt\@firstofone \let\styfmt\@firstofone @@ -1220,42 +1234,44 @@ halign upper=flush left,halign lower=justify, \immediate\write18{\create@example@tex\space\nlct@example@filebasename.tex}% \nlct@ifattachsupported {% - \nlct@preattachments \bgroup - \nlctexampletitlebox{\example@tex@title}\hfill - \nlctexampletagattachfont - \textattachfile[mimetype={application/x-tex}, - author={\@pdfauthor},color={0 0 0}, - size={\pdf@filesize{\examplesdir/\nlct@example@filebasename.tex}}, - subject={\example@pdf@title\space (source code)}, - description={\example@attachdesc\space (source code)}]% - {\examplesdir/\nlct@example@filebasename.tex}{\exampleattachtexicon}% - \ifnlctdownloadlinks - \space - \href{\nlctdownloadlink{\examplesdir/\nlct@example@filebasename.tex}}{\exampledownloadtexicon} - \fi - \ifnlctattachpdf - \IfFileExists{\examplesdir/\nlct@example@filebasename.pdf} - {% - \space - \textattachfile[mimetype={application/pdf}, - author={\@pdfauthor},color={0 0 0}, - size={\pdf@filesize{\examplesdir/\nlct@example@filebasename.pdf}}, - subject={\example@pdf@title\space (PDF)}, - description={\example@attachdesc\space (PDF)}]% - {\examplesdir/\nlct@example@filebasename.pdf}{\exampleattachpdficon}% - }% - {}% + \nlct@ex@title@attachments + {\example@tex@title}% + {% + \nlctexampletagattachfont + \textattachfile[mimetype={application/x-tex}, + author={\@pdfauthor},color={0 0 0}, + size={\pdf@filesize{\examplesdir/\nlct@example@filebasename.tex}}, + subject={\example@pdf@title\space (source code)}, + description={\example@attachdesc\space (source code)}]% + {\examplesdir/\nlct@example@filebasename.tex}{\exampleattachtexicon}% \ifnlctdownloadlinks \space - \href{\nlctdownloadlink{\examplesdir/\nlct@example@filebasename.pdf}}{\exampledownloadpdficon} + \href{\nlctdownloadlink{\examplesdir/\nlct@example@filebasename.tex}}{\exampledownloadtexicon} \fi - \else - \ifnlctdownloadlinks - \space - \href{\nlctdownloadlink{\examplesdir/\nlct@example@filebasename.pdf}}{\exampledownloadpdficon} + \ifnlctattachpdf + \IfFileExists{\examplesdir/\nlct@example@filebasename.pdf} + {% + \space + \textattachfile[mimetype={application/pdf}, + author={\@pdfauthor},color={0 0 0}, + size={\pdf@filesize{\examplesdir/\nlct@example@filebasename.pdf}}, + subject={\example@pdf@title\space (PDF)}, + description={\example@attachdesc\space (PDF)}]% + {\examplesdir/\nlct@example@filebasename.pdf}{\exampleattachpdficon}% + }% + {}% + \ifnlctdownloadlinks + \space + \href{\nlctdownloadlink{\examplesdir/\nlct@example@filebasename.pdf}}{\exampledownloadpdficon} + \fi + \else + \ifnlctdownloadlinks + \space + \href{\nlctdownloadlink{\examplesdir/\nlct@example@filebasename.pdf}}{\exampledownloadpdficon} + \fi \fi - \fi + }% \par\egroup\noindent }% {% @@ -1272,8 +1288,8 @@ halign upper=flush left,halign lower=justify, } \newenvironment{example}[2]{% - \refstepcounter{example}\label{#2}% \par\vskip10pt\noindent + \refstepcounter{example}\label{#2}% {% \def\cmd##1{\csfmt{##1}}% \let\nlctexampletitlefont\nlctexampleenvtitlefont @@ -1375,7 +1391,9 @@ halign upper=flush left,halign lower=justify, \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 @@ halign upper=flush left,halign lower=justify, \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 @@ halign upper=flush left,halign lower=justify, \newrobustcmd*{\cmddef}{\@ifstar\s@cmddef\@cmddef} \newcommand*{\@cmddef}[2][]{% + \vskip 1sp plus 2ex\relax \pdfbookmark[\cmddefbookmarklevel]{\glsentryname{#2}}{csdef.#2}% \nopagebreak\s@cmddef[#1]{#2}% + \nopagebreak\ignorespaces } \newcommand*{\cmdnotefmt}[1]{\mbox{#1}} |