From fe29944c3d5256062708e9b1ae62dc378f9d9993 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 9 May 2022 03:01:47 +0000 Subject: CTAN sync 202205090301 --- .../themes/beamertheme-trigon/demo/trigon_demo.pdf | Bin 416694 -> 416463 bytes .../themes/beamertheme-trigon/docs/trigontheme.pdf | Bin 367005 -> 364442 bytes .../source/beamercolorthemetrigon.dtx | 2 +- .../source/beamerfontthemetrigon.dtx | 2 +- .../source/beamerinnerthemetrigon.dtx | 7 +- .../source/beamerouterthemetrigon.dtx | 2 +- .../source/beamerthemetrigon.dtx | 2 +- macros/latex/contrib/changebar/CATALOG | 6 +- macros/latex/contrib/changebar/README | 4 +- macros/latex/contrib/changebar/cbtest1-ltx.pdf | Bin 31002 -> 0 bytes macros/latex/contrib/changebar/cbtest1-pdf.pdf | Bin 97927 -> 0 bytes macros/latex/contrib/changebar/cbtest1.tex | 322 ----------- macros/latex/contrib/changebar/cbtest1good.pdf | Bin 61872 -> 0 bytes macros/latex/contrib/changebar/cbtest1wrong.pdf | Bin 45449 -> 0 bytes macros/latex/contrib/changebar/cbtest2-ltx.pdf | Bin 30930 -> 0 bytes macros/latex/contrib/changebar/cbtest2-pdf.pdf | Bin 97839 -> 0 bytes macros/latex/contrib/changebar/cbtest2.tex | 322 ----------- macros/latex/contrib/changebar/changebar.bug | 5 +- macros/latex/contrib/changebar/changebar.dtx | 15 +- macros/latex/contrib/changebar/changebar.ins | 2 +- macros/latex/contrib/changebar/changebar.pdf | Bin 373858 -> 380646 bytes macros/latex/contrib/changebar/chbar.1 | 117 ---- macros/latex/contrib/changebar/chbar.sh | 240 -------- macros/latex/contrib/hvextern/Changes | 2 + macros/latex/contrib/hvextern/doc/hvdoctools.sty | 7 +- macros/latex/contrib/hvextern/doc/hvextern.pdf | Bin 1195275 -> 1202031 bytes macros/latex/contrib/hvextern/doc/hvextern.tex | 122 ++-- macros/latex/contrib/hvextern/latex/hvextern.sty | 94 +++- macros/latex/contrib/hvlogos/Changes | 1 + macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf | Bin 86119 -> 86942 bytes macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex | 2 +- macros/latex/contrib/hvlogos/latex/hvlogos.sty | 146 ++--- .../latex/contrib/nicematrix/nicematrix-french.pdf | Bin 501742 -> 504733 bytes .../latex/contrib/nicematrix/nicematrix-french.tex | 230 ++++---- macros/latex/contrib/nicematrix/nicematrix.dtx | 253 +++++---- macros/latex/contrib/nicematrix/nicematrix.pdf | Bin 1511486 -> 1512102 bytes macros/latex/contrib/simplebnf/simplebnf-doc.pdf | Bin 133699 -> 152698 bytes macros/latex/contrib/simplebnf/simplebnf-doc.tex | 64 ++- macros/latex/contrib/simplebnf/simplebnf.sty | 126 ++++- macros/xetex/latex/xduts/README.md | 4 +- macros/xetex/latex/xduts/xdulogo.pdf | Bin 0 -> 881135 bytes macros/xetex/latex/xduts/xduts.dtx | 620 +++++++++++++++++---- macros/xetex/latex/xduts/xduts.ins | 2 +- macros/xetex/latex/xduts/xduts.pdf | Bin 395564 -> 429543 bytes macros/xetex/latex/xduts/xidian-logo.pdf | Bin 463660 -> 0 bytes macros/xetex/latex/xduts/xidian-text.pdf | Bin 416455 -> 0 bytes 46 files changed, 1198 insertions(+), 1523 deletions(-) delete mode 100644 macros/latex/contrib/changebar/cbtest1-ltx.pdf delete mode 100644 macros/latex/contrib/changebar/cbtest1-pdf.pdf delete mode 100644 macros/latex/contrib/changebar/cbtest1.tex delete mode 100644 macros/latex/contrib/changebar/cbtest1good.pdf delete mode 100644 macros/latex/contrib/changebar/cbtest1wrong.pdf delete mode 100644 macros/latex/contrib/changebar/cbtest2-ltx.pdf delete mode 100644 macros/latex/contrib/changebar/cbtest2-pdf.pdf delete mode 100644 macros/latex/contrib/changebar/cbtest2.tex delete mode 100644 macros/latex/contrib/changebar/chbar.1 delete mode 100755 macros/latex/contrib/changebar/chbar.sh create mode 100644 macros/xetex/latex/xduts/xdulogo.pdf delete mode 100644 macros/xetex/latex/xduts/xidian-logo.pdf delete mode 100644 macros/xetex/latex/xduts/xidian-text.pdf (limited to 'macros') diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/demo/trigon_demo.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/demo/trigon_demo.pdf index 0b5b1c54dd..f9616191a3 100644 Binary files a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/demo/trigon_demo.pdf and b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/demo/trigon_demo.pdf differ diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/docs/trigontheme.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/docs/trigontheme.pdf index 44f97f0726..23b44851fb 100644 Binary files a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/docs/trigontheme.pdf and b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/docs/trigontheme.pdf differ diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamercolorthemetrigon.dtx b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamercolorthemetrigon.dtx index e45237be4d..0674562c27 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamercolorthemetrigon.dtx +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamercolorthemetrigon.dtx @@ -13,7 +13,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamercolorthemetrigon}[2022/03/19 v0.6.4 Trigon color theme] +\ProvidesPackage{beamercolorthemetrigon}[2022/05/08 v0.6.5 Trigon color theme] % % \fi % \CheckSum{0} diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerfontthemetrigon.dtx b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerfontthemetrigon.dtx index d3c8c302d5..8329019f27 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerfontthemetrigon.dtx +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerfontthemetrigon.dtx @@ -13,7 +13,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerfontthemetrigon}[2022/03/19 v0.6.4 Trigon font theme] +\ProvidesPackage{beamerfontthemetrigon}[2022/05/08 v0.6.5 Trigon font theme] % % \fi % \CheckSum{0} diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx index a0adf0a1c4..c79cb5d522 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx @@ -13,7 +13,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerinnerthemetrigon}[2022/03/19 v0.6.4 Trigon inner theme] +\ProvidesPackage{beamerinnerthemetrigon}[2022/05/08 v0.6.5 Trigon inner theme] % % \fi % \CheckSum{0} @@ -181,6 +181,7 @@ % Defines a colored triangle with the base on the left side (pointing right). % \begin{macrocode} \newcommand{\leftColorTriangle}[3]{ + \clip(0,0) rectangle(\the\paperwidth,\the\paperheight); \path[fill=#3] \leftTriangle{#1}{#2} } @@ -191,6 +192,7 @@ % Defines a colored triangle with the base on the right side (pointing left). % \begin{macrocode} \newcommand{\rightColorTriangle}[3]{ + \clip(0,0) rectangle(\the\paperwidth,\the\paperheight); \path[fill=#3] \rightTriangle{#1}{#2} } @@ -201,6 +203,7 @@ % Defines a colored triangle with the base on the bottom side (pointing top). % \begin{macrocode} \newcommand{\topColorTriangle}[3]{ + \clip(0,0) rectangle(\the\paperwidth,\the\paperheight); \path[fill=#3] \topTriangle{#1}{#2} } @@ -281,6 +284,7 @@ \begin{tikzpicture} \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight); \begin{scope}[blend group=multiply] + \clip(0,0) rectangle(\the\paperwidth,\the\paperheight); \path[fill=tTheme]\leftTriangle{0.5\paperwidth}{0}; \topColorTriangle{0.73\paperwidth}{0.70\paperheight}{tGrey!30!tBg}; \ifx\inserttitlegraphic\@empty @@ -290,6 +294,7 @@ \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,\the\paperheight) {\inserttitlegraphic}; \fi \end{scope} + \clip(0,0) rectangle(\the\paperwidth,\the\paperheight); \path[fill=tBg]\rightTriangle{0.45\paperwidth}{\the\paperheight}; \ifx\logbig\@empty \else \node[anchor=north east,inner sep=0mm] at diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerouterthemetrigon.dtx b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerouterthemetrigon.dtx index 29eaa37c40..c350cf9c63 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerouterthemetrigon.dtx +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerouterthemetrigon.dtx @@ -13,7 +13,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerouterthemetrigon}[2022/03/19 v0.6.4 Trigon outer theme] +\ProvidesPackage{beamerouterthemetrigon}[2022/05/08 v0.6.5 Trigon outer theme] % % \fi % \CheckSum{0} diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerthemetrigon.dtx b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerthemetrigon.dtx index 71fd1a5978..26ba892133 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerthemetrigon.dtx +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerthemetrigon.dtx @@ -13,7 +13,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerthemetrigon}[2022/03/19 v0.6.4 Trigon Beamer theme] +\ProvidesPackage{beamerthemetrigon}[2022/05/08 v0.6.5 Trigon Beamer theme] % % \fi % \CheckSum{0} diff --git a/macros/latex/contrib/changebar/CATALOG b/macros/latex/contrib/changebar/CATALOG index 93611fa94a..a4ecdec11f 100644 --- a/macros/latex/contrib/changebar/CATALOG +++ b/macros/latex/contrib/changebar/CATALOG @@ -1,7 +1,7 @@ Name: ChangeBar -Problems-To: texniek(at)braams.xs4all.nl +Problems-To: johannes.braams(at)texniek.nl Author: J.L. Braams -Version: 3.6c +Version: 3.6d Description: @@ -15,6 +15,4 @@ See-Also: Address: TeXniek J.L. Braams -Kersengaarde 33 -2723 BP Zoetermeer The Netherlands diff --git a/macros/latex/contrib/changebar/README b/macros/latex/contrib/changebar/README index 1f51eec6e6..ffc63526e7 100644 --- a/macros/latex/contrib/changebar/README +++ b/macros/latex/contrib/changebar/README @@ -1,6 +1,6 @@ changebar bundle - March 08, 2018 + May 06, 2022 This bundle contains a package that I maintain to add changebars to a LaTeX document. @@ -14,7 +14,7 @@ be used to compare two versions of a document and automatically add the changebars. The file chbar.1, also contributed, documents the workings of chbar.sh -Copyright (C) 2018 Johannes L. Braams texniek(at)braams.xs4all.nl +Copyright (C) 2022 Johannes L. Braams johannes.braams(at)texniek.nl This program can be redistributed and/or modified under the terms of the LaTeX Project Public License Distributed from CTAN diff --git a/macros/latex/contrib/changebar/cbtest1-ltx.pdf b/macros/latex/contrib/changebar/cbtest1-ltx.pdf deleted file mode 100644 index a146caad90..0000000000 Binary files a/macros/latex/contrib/changebar/cbtest1-ltx.pdf and /dev/null differ diff --git a/macros/latex/contrib/changebar/cbtest1-pdf.pdf b/macros/latex/contrib/changebar/cbtest1-pdf.pdf deleted file mode 100644 index fcdb761c73..0000000000 Binary files a/macros/latex/contrib/changebar/cbtest1-pdf.pdf and /dev/null differ diff --git a/macros/latex/contrib/changebar/cbtest1.tex b/macros/latex/contrib/changebar/cbtest1.tex deleted file mode 100644 index 040518bbd9..0000000000 --- a/macros/latex/contrib/changebar/cbtest1.tex +++ /dev/null @@ -1,322 +0,0 @@ -\documentclass[12pt,twoside]{article} -\usepackage{amsmath} -\usepackage[outerbars,color]{changebar} -\ifx\pdfoutput\undefined -\else\ifnum\pdfoutput>0 - \usepackage{pdfcolmk} -\fi\fi - -%\setcounter{changebargrey}{60} -\cbcolor{red} - -\usepackage{fancyhdr} - -%Header-footer instructions -\pagestyle{fancy} -\setlength{\headheight}{15pt} -\lhead{\scriptsize Changebar test file} -\chead{} -\rhead{v3.5} -\lfoot{Onecolumn text} -\cfoot{Page \thepage} -\rfoot{} -\renewcommand{\headrulewidth}{0.4pt} %print a rule below the header -\renewcommand{\footrulewidth}{0.4pt} %print a rule above the footer - -\setcounter{page}{16} -\setlength{\emergencystretch}{4em} - -\begin{document} - -%\tableofcontents - -\title{CHANGEBAR TEST FILE \\FOR ADVANCED FEATURES} -\author{Piet van Oostrum} -\maketitle - -\raggedbottom - -\begin {abstract} - -This file tests various advanced features of the changebar package. -\cbstart\textcolor{red}{\textbf{Text that should have a changebar is - printed in red, so that it can easily be checked that the changebars are - in the proper position.} This changebar should be on the left. -\cbend} - -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. -\end{abstract} - -\newpage - -This file tests various advanced features of the changebar package. -\cbstart\textcolor{red}{Text that should have a changebar (like this) is - printed in red, so that it can easily be checked that the changebars are - in the proper position.On this page, the changebar should be on the right. -\cbend} -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. - -\cbstart[3mm] \textcolor{red}{Here is a thicker changebar. Text that should - have a changebar (like this) is printed in red, so that it can easily be - checked that the changebars are in the proper position.On this page, the - changebar should be on the right. We also include a formula with large - descenders which should be completely covered by the changebar: - $\displaystyle \cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\cdots}}}$ - \cbend} - -\twocolumn -\lfoot{Twocolumn page} - -\section{Introduction} - -\cbstart -\color{red} -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. -\cbend -\color{black} - -\begin{figure} - \centering - \cbstart \color{red} - \fbox{ - \parbox{0.8\linewidth}{ - This is a figure. It has its - own changebar. This is a figure. This is a figure. It has its own - changebar. This is a figure. This is a figure. It has its own - changebar. This is a figure. This is a figure.\cbend}} - \color{black} - \caption{This is a test figure} -\end{figure} - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. - -\cbstart -\color{red} -Sections that have been added or modified are marked with a bar in -the margins. This is a small paragraph that crosses a column boundary. It -should have a changebar in both parts.\cbend -\color{black} - -\section{Continuation} -\cbstart -\color{red} - -\begin{figure} -\centering -\color{red} - \fbox{ - \parbox{0.8\linewidth}{ This is a figure. It inherits a changebar from - the environment. This is a figure. This is a figure. This is a - figure. This is a figure. It inherits a changebar from the - environment. This is a figure. This is a figure.}} -\caption{This is a test figure} -\color{black} -\end{figure} -\cbend -\color{black} - -\begin{figure}[p] -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. This is a figure. This is a figure. This is a figure. - This is a figure. This is a figure. This is a figure. This is a figure. - This is a figure. This is a figure. This is a figure. This is a figure. - This is a figure. This is a figure. This is a figure. This is a figure. - }} - \caption{Test figure} -\end{figure} - -\begin{figure}[p] -\cbstart \color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has its own changebar. This is a figure. It has - its own changebar. - This is a figure. It has its own changebar. This is a figure. It has - its own changebar. - This is a figure. It has its own changebar. This is a figure. It has - its own changebar. - }} \cbend\color{black} - \caption{Test figure} -\end{figure} - -\color{red} -\cbstart - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -This part contains a changebar that crosses several column and page -boundaries. Please note that it crosses several figures also but those have -their own changebars (or not), they do not fall inside the continuation -changebar. - -\enlargethispage{1cm} -\subsection{Enlarged column} - -\noindent\parbox{\linewidth}{% -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -\\ -\textbf{This column is enlarged, therefore its extends in the footer. -The changebar should also cover the extended text.}} - -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. - -\section*{Specific issues} - -\addtocounter{page}{1} -\textbf{Here we change the page number (skipping one page). Therefore we - have two even pages in a row. The page change is in the righthand column - which is not proper LaTeX coding, but it should be handled properly.} -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. - -This part contains a changebar that crosses several column and page -boundaries. Please note that it crosses several figures also but those have -their own changebars (or not), they do not fall inside the continuation -changebar. - - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. - -This part contains a changebar that crosses several column and page -boundaries. Please note that it crosses several figures also but those have -their own changebars (or not), they do not fall inside the continuation -changebar. - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -This part contains a changebar that crosses several column and page -boundaries. Please note that it crosses several figures also but those have -their own changebars (or not), they do not fall inside the continuation -changebar. \cbend -\color{black} The last sentence of this part is outside the changebar. -\\[1ex] - -\color{red}\cbstart -\noindent\fbox{\parbox[t]{0.95\linewidth}{% -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -}}\cbend\color{black} -\\[2cm] -There should be a lonely figure with a changebar at the right. -\end{document} - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/macros/latex/contrib/changebar/cbtest1good.pdf b/macros/latex/contrib/changebar/cbtest1good.pdf deleted file mode 100644 index 1ebbe7300d..0000000000 Binary files a/macros/latex/contrib/changebar/cbtest1good.pdf and /dev/null differ diff --git a/macros/latex/contrib/changebar/cbtest1wrong.pdf b/macros/latex/contrib/changebar/cbtest1wrong.pdf deleted file mode 100644 index 2281a41da9..0000000000 Binary files a/macros/latex/contrib/changebar/cbtest1wrong.pdf and /dev/null differ diff --git a/macros/latex/contrib/changebar/cbtest2-ltx.pdf b/macros/latex/contrib/changebar/cbtest2-ltx.pdf deleted file mode 100644 index dbc4221f5c..0000000000 Binary files a/macros/latex/contrib/changebar/cbtest2-ltx.pdf and /dev/null differ diff --git a/macros/latex/contrib/changebar/cbtest2-pdf.pdf b/macros/latex/contrib/changebar/cbtest2-pdf.pdf deleted file mode 100644 index 769b847f2e..0000000000 Binary files a/macros/latex/contrib/changebar/cbtest2-pdf.pdf and /dev/null differ diff --git a/macros/latex/contrib/changebar/cbtest2.tex b/macros/latex/contrib/changebar/cbtest2.tex deleted file mode 100644 index 1f53624e4e..0000000000 --- a/macros/latex/contrib/changebar/cbtest2.tex +++ /dev/null @@ -1,322 +0,0 @@ -\documentclass[12pt,twoside]{article} -\usepackage{amsmath} -\usepackage[outerbars,xcolor]{changebar} -\ifx\pdfoutput\undefined -\else\ifnum\pdfoutput>0 - \usepackage{pdfcolmk} -\fi\fi - -%\setcounter{changebargrey}{60} -\cbcolor{red} - -\usepackage{fancyhdr} - -%Header-footer instructions -\pagestyle{fancy} -\setlength{\headheight}{15pt} -\lhead{\scriptsize Changebar test file} -\chead{} -\rhead{v3.5} -\lfoot{Onecolumn text} -\cfoot{Page \thepage} -\rfoot{} -\renewcommand{\headrulewidth}{0.4pt} %print a rule below the header -\renewcommand{\footrulewidth}{0.4pt} %print a rule above the footer - -\setcounter{page}{16} -\setlength{\emergencystretch}{4em} - -\begin{document} - -%\tableofcontents - -\title{CHANGEBAR TEST FILE \\FOR ADVANCED FEATURES} -\author{Piet van Oostrum} -\maketitle - -\raggedbottom - -\begin {abstract} - -This file tests various advanced features of the changebar package. -\cbstart\textcolor{red}{\textbf{Text that should have a changebar is - printed in red, so that it can easily be checked that the changebars are - in the proper position.} This changebar should be on the left. -\cbend} - -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. -\end{abstract} - -\newpage - -This file tests various advanced features of the changebar package. -\cbstart\textcolor{red}{Text that should have a changebar (like this) is - printed in red, so that it can easily be checked that the changebars are - in the proper position.On this page, the changebar should be on the right. -\cbend} -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. - -\cbstart[3mm] \textcolor{red}{Here is a thicker changebar. Text that should - have a changebar (like this) is printed in red, so that it can easily be - checked that the changebars are in the proper position.On this page, the - changebar should be on the right. We also include a formula with large - descenders which should be completely covered by the changebar: - $\displaystyle \cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\cdots}}}$ - \cbend} - -\twocolumn -\lfoot{Twocolumn page} - -\section{Introduction} - -\cbstart -\color{red} -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. -\cbend -\color{black} - -\begin{figure} - \centering - \cbstart \color{red} - \fbox{ - \parbox{0.8\linewidth}{ - This is a figure. It has its - own changebar. This is a figure. This is a figure. It has its own - changebar. This is a figure. This is a figure. It has its own - changebar. This is a figure. This is a figure.\cbend}} - \color{black} - \caption{This is a test figure} -\end{figure} - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. - -\cbstart -\color{red} -Sections that have been added or modified are marked with a bar in -the margins. This is a small paragraph that crosses a column boundary. It -should have a changebar in both parts.\cbend -\color{black} - -\section{Continuation} -\cbstart -\color{red} - -\begin{figure} -\centering -\color{red} - \fbox{ - \parbox{0.8\linewidth}{ This is a figure. It inherits a changebar from - the environment. This is a figure. This is a figure. This is a - figure. This is a figure. It inherits a changebar from the - environment. This is a figure. This is a figure.}} -\caption{This is a test figure} -\color{black} -\end{figure} -\cbend -\color{black} - -\begin{figure}[p] -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. This is a figure. This is a figure. This is a figure. - This is a figure. This is a figure. This is a figure. This is a figure. - This is a figure. This is a figure. This is a figure. This is a figure. - This is a figure. This is a figure. This is a figure. This is a figure. - }} - \caption{Test figure} -\end{figure} - -\begin{figure}[p] -\cbstart \color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has its own changebar. This is a figure. It has - its own changebar. - This is a figure. It has its own changebar. This is a figure. It has - its own changebar. - This is a figure. It has its own changebar. This is a figure. It has - its own changebar. - }} \cbend\color{black} - \caption{Test figure} -\end{figure} - -\color{red} -\cbstart - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -This part contains a changebar that crosses several column and page -boundaries. Please note that it crosses several figures also but those have -their own changebars (or not), they do not fall inside the continuation -changebar. - -\enlargethispage{1cm} -\subsection{Enlarged column} - -\noindent\parbox{\linewidth}{% -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -\\ -\textbf{This column is enlarged, therefore its extends in the footer. -The changebar should also cover the extended text.}} - -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. - -\section*{Specific issues} - -\addtocounter{page}{1} -\textbf{Here we change the page number (skipping one page). Therefore we - have two even pages in a row. The page change is in the righthand column - which is not proper LaTeX coding, but it should be handled properly.} -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. - -This part contains a changebar that crosses several column and page -boundaries. Please note that it crosses several figures also but those have -their own changebars (or not), they do not fall inside the continuation -changebar. - - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. - -This part contains a changebar that crosses several column and page -boundaries. Please note that it crosses several figures also but those have -their own changebars (or not), they do not fall inside the continuation -changebar. - -This file tests various advanced features of the changebar package. -This file contains the following features which in combinations used to -give problems in versions of changebar before version 3.5: -Twoside document, onecolumn and towcolumn text, figures, columns of -figures, page changes in the midst of a document. -It should work both with latex, followed by a supported Postscript driver, -and with pdflatex. - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -\begin{figure}[p] -\color{red} -\centering \fbox{\parbox{.9\linewidth}{ - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - This is a figure. It has a changebar from the environment. This is a - figure. It has a changebar from the environment. - }} - \caption{Test figure} -\end{figure} - -This part contains a changebar that crosses several column and page -boundaries. Please note that it crosses several figures also but those have -their own changebars (or not), they do not fall inside the continuation -changebar. \cbend -\color{black} The last sentence of this part is outside the changebar. -\\[1ex] - -\color{red}\cbstart -\noindent\fbox{\parbox[t]{0.95\linewidth}{% -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -This is a parbox. It should have a changebar along its total height. -}}\cbend\color{black} -\\[2cm] -There should be a lonely figure with a changebar at the right. -\end{document} - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/macros/latex/contrib/changebar/changebar.bug b/macros/latex/contrib/changebar/changebar.bug index 2d239c93e6..bc04f1ca68 100644 --- a/macros/latex/contrib/changebar/changebar.bug +++ b/macros/latex/contrib/changebar/changebar.bug @@ -199,7 +199,10 @@ % % v3.6c JLB: changed the definition of \cb@checkPDF in order to prevent % an extra page at the end of the document, filled with "spsp" - +% +% v3.6d JLB: Added \relax at the end of \openin statements in order to +% prevent teX from looking too far ahead. +% % Known problems % - changebars for mmarginal paragraphs collide with changebars % for the main body of text diff --git a/macros/latex/contrib/changebar/changebar.dtx b/macros/latex/contrib/changebar/changebar.dtx index e146293a0c..b07d80083f 100644 --- a/macros/latex/contrib/changebar/changebar.dtx +++ b/macros/latex/contrib/changebar/changebar.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% Copyright 1994-2018 (C) Johannes Braams. All rights reserved. +%% Copyright 1994-2022 (C) Johannes Braams. All rights reserved. % % This file is part of the changebar package. % ------------------------------------------- @@ -24,7 +24,7 @@ % and covered by LPPL is defined by the unpacking scripts (with % extension .ins) which are part of the distribution. % \fi -% \CheckSum{2591} +% \CheckSum{2594} % %\iffalse % This file is built for \LaTeXe, so we make sure an error is @@ -39,7 +39,7 @@ \ProvidesFile{changebar.dtx} % %<+package>\ProvidesPackage{changebar} - [2018/03/09 v3.6c Indicate changes with marginal bars] + [2022-05-06 v3.6d Indicate changes with marginal bars] % \end{macrocode} % % \section{A driver for this document} @@ -2997,6 +2997,7 @@ % Compute the left and right positions of the changebars. % \changes{v3.4g}{2004/01/09}{Added tracing information for the left % and right postions} +% \changes{v3.6d}{2022-05-06}{Added \cs{relax} to end the filename} % \begin{macrocode} \cb@positions \cb@trace{% @@ -3006,7 +3007,7 @@ Even right: \the\cb@even@right }% \immediate\closeout\cb@write - \immediate\openin\cb@read=\jobname.cb} + \immediate\openin\cb@read=\jobname.cb\relax} % \end{macrocode} % \end{macro} % @@ -3021,13 +3022,13 @@ % checking. % \changes{3.2}{1994/04/21}{Use \cs{AtEndDocument} now instead of % redefining \cs{enddocument}} -% +% \changes{v3.6d}{2022-05-06}{Added \cs{relax} to end the filename} % \begin{macrocode} \AtEndDocument{% \clearpage \cb@initstack\cb@historystack \immediate\closein\cb@read - \immediate\openin\cb@read=\jobname.cb% + \immediate\openin\cb@read=\jobname.cb\relax % \end{macrocode} % % \changes{v3.5a}{2005/05/23}{For pdftex we also close and reread the @@ -3037,7 +3038,7 @@ \ifx\cb@readxy\@undefined \else \immediate\closein\cb@readxy - \immediate\openin\cb@readxy=\jobname.cb2% + \immediate\openin\cb@readxy=\jobname.cb2\relax \def\cb@pdfpoints{}% \def\cb@pdfpagenr{0}% \fi diff --git a/macros/latex/contrib/changebar/changebar.ins b/macros/latex/contrib/changebar/changebar.ins index 8b5a9684f6..21a5332223 100644 --- a/macros/latex/contrib/changebar/changebar.ins +++ b/macros/latex/contrib/changebar/changebar.ins @@ -24,7 +24,7 @@ \preamble This is a generated file. -Copyright (C) 1994-2018 Johannes Braams, All rights reserved. +Copyright (C) 1994-2022 Johannes Braams, All rights reserved. This file was generated from file(s) of the changebar package. -------------------------------------------------------------- diff --git a/macros/latex/contrib/changebar/changebar.pdf b/macros/latex/contrib/changebar/changebar.pdf index 31ddeb649c..bbe1281088 100644 Binary files a/macros/latex/contrib/changebar/changebar.pdf and b/macros/latex/contrib/changebar/changebar.pdf differ diff --git a/macros/latex/contrib/changebar/chbar.1 b/macros/latex/contrib/changebar/chbar.1 deleted file mode 100644 index f36e68e2bb..0000000000 --- a/macros/latex/contrib/changebar/chbar.1 +++ /dev/null @@ -1,117 +0,0 @@ -.ds AL L\\v'.3m'A\\v'-.3m'\\*(ET -.TH CHBAR 1 TeX -.SH NAME -chbar \- write \*(AL file with `change bars' showing change between input \*(AL files -.SH SYNOPSIS -.B chbar -[ -.B \-h -] [ -.B \-g -] [ -.B \-G -] [ -.BI \-d " dir" -] [ -.BI \-r " rev" -] -.I old new -[ -.I output -] -.sp -.B chbar -[ -.B \-h -] [ -.B \-g -] [ -.B \-G -] [ -.BI \-d " dir" -] [ -.BI \-r " rev" -] -.I old -.sp -.B chbar -[ -.B \-h -] [ -.B \-g -] [ -.B \-G -] -.BI \-d " dir" -.BI \-r " rev" -.I files -.SH DESCRIPTION -.I chbar -takes two \*(AL files and produce a third which -has change bars highlighting the difference between them. There -are three basic modes of operation: first, pathnames can -be given for -.I old -and -.IR new ; -second, if only -.I old -is named, the -.I new -file is taken from standard input and the output is written to standard -output; thirdly, if the -.B \-r -option is used -.I files -held by RCS must be named - (see the explanation of the -.B \-r -option). -.sp -Change bars are inserted for differences after '\ebegin{document}'. -.SH OPTIONS -.TP -.BI \-d " dir" -Write the output to file -.IR dir/new , -if -.I new -is given or to file -.IR dir/old . -If -.I dir -does not exist, it is created. -If -.I output -is given, it is discarded. -.TP -.BI \-r " rev" -If the \*(AL -.I files -are kept under control of the Revision Control System RCS, the old files of -the revision -.I rev -can be retrieved. -.I rev -is specified using the RCS conventions. -This option must be used together with the -.BI \-d " dir" -option. -.I files -must be a nonempty list of files. -.TP -.B \-h -Print a help text. -.TP -.B \-g -Print some debugging info. -.TP -.B \-G -Even more debug info. -.SH SEE ALSO -.IR diff (1), -.IR rcs (1) -.SH BUGS -The -.I new -file can not be named `-'. - diff --git a/macros/latex/contrib/changebar/chbar.sh b/macros/latex/contrib/changebar/chbar.sh deleted file mode 100755 index 232b1fcc37..0000000000 --- a/macros/latex/contrib/changebar/chbar.sh +++ /dev/null @@ -1,240 +0,0 @@ -#!/bin/sh -# Gadget to take two LaTeX files and produce a third which -# has changebars highlighting the difference between them. -# -# Version 1.2 -# Author: -# Don Ward, Careful Computing (don@careful.co.uk) -# v1.0 April 1989 -# v1.1 Feb 93 Amended to use changebar.sty (v3.0) and dvips -# v1.2 Aug 95 Added support for LaTeX209/LaTeX2e -# Added RCS support to retrive old files - -CMD=`basename $0` - -SED=sed -RM="rm -f" -DIFF=diff -ED=ed -AWK=awk -GREP=grep -MV=mv -CAT=cat -MKDIR=mkdir -CO="co" - -TMPFILE=/tmp/$CMD.$$ -SED_CMD_FILE=$TMPFILE.sed - -usage() -{ -$CAT << _END_ -Usage: - $CMD [-hgG] [-d dir] old new [output] - default output is stdout - - $CMD [-hgG] [-d dir] old - new file on stdin, output on stdout - - $CMD [-hgG] -d dir -r rev files - old file retrieved using RCS - - Gadget to take two LaTeX files and produce a third which - has changebars highlighting the difference between them. - Changebars are inserted for differences after '\begin{document}'. - - Feature: \`new' can not be named \`-'. - - Options are: - -d dir : Write the output to file \`dir/new', if \`new' is given or - to file \`dir/old'. - If \`dir' does not exist, it is created. - If \`output' is given, it is discarded. - - -r rev : If the LaTeX \`files' are kept under control of the - Revision Control System RCS, the old files of - the revision \`rev' can be retrived. - \`rev' is specified using the RCS conventions. - This option must be used together with the \`-d dir' option. - \`files' must be a nonempty list of files. - - -h : Print this info text. - -g : Print some debugging info. - -G : Even more debug info. - - Version 1.2: August 3. 1995 -_END_ -exit 1 -} - -# parse options and arguments -DEBUG="NO" -DIR= -REV= -# process options -while getopts d:r:gGh i $* -do - case $i in - d ) DIR=$OPTARG;; - r ) REV=$OPTARG;; - g ) DEBUG="YES" ;; - G ) set -x; DEBUG="YES";; - h | \ - * ) usage ;; - esac -done - -shift `expr $OPTIND - 1` - -case $# in - 1 ) OLD=$1; NEW="-"; OUT="" ;; - 2 ) OLD=$1; NEW=$2; OUT="" ;; - 3 ) OLD=$1; NEW=$2; OUT="$3" ;; - * ) usage ;; -esac - -# check correct options -if [ ! -z "$DIR" ] -then - [ -d $DIR ] || $MKDIR $DIR -fi - -if [ ! -z "$REV" ] -then - [ -z "$DIR" ] && usage - FILES=$* -else - FILES=$NEW -fi - -# do the work -for NEW in $FILES -do - if [ ! -z "$DIR" ] - then - if [ $NEW = "-" ] - then - OUT=$DIR/$OLD - else - OUT=$DIR/$NEW - fi - fi - if [ ! -z "$REV" ] - then - OLD=${TMPFILE}.old - $CO -p"$REV" -q $NEW > $OLD - fi - - [ $DEBUG = "YES" ] && echo "OLD=\`$OLD' NEW=\`$NEW' OUT=\`$OUT'" - - # gather some info about the file - # Since we have for sure only the name of the OLD file, ... - $GREP "^\\\\begin{document}" $OLD > /dev/null - if [ $? -eq 0 ] - then - [ $DEBUG = "YES" ] && echo "contains a \\begin{document}" - HAS_BEGIN_DOC="YES" - else - [ $DEBUG = "YES" ] && echo "contains no \\begin{document}" - HAS_BEGIN_DOC="NO" - fi - - # Method to do the work: - # 1 Use diff to get an ed script to go from file1 to file2. - # 2 Breath on it a bit (with sed) to insert changebar commands. - # 3 Apply modified ed script to produce (nearly) the output. - # 4 Use awk to insert the changebars option into the \documentstyle - # and to handle changebar commands inside verbatim environments. - # 5 Remove changebars before \begin{document} with sed - - # SED commands to edit ED commands to edit old file - $CAT > $SED_CMD_FILE <<\_END_ -/^\.$/i\ -\\cbend{}% -/^[0-9][0-9]*[ac]$/a\ -\\cbstart{}% -/^[0-9][0-9]*,[0-9][0-9]*[ac]$/a\ -\\cbstart{}% -/^[0-9][0-9]*d$/a\ -i\ -\\cbdelete{}%\ -. -/^[0-9][0-9]*,[0-9][0-9]*d$/a\ -i\ -\\cbdelete{}%\ -. -_END_ - - # note DIFF accepts `-' as stdin - $DIFF -b -e $OLD $NEW | \ - ( $SED -f $SED_CMD_FILE ; echo w ${TMPFILE}.1 ; echo q ) | \ - $ED - $OLD - - # AWK commands to insert Changebars style and to protect - # changebar commands in verbatim environments - # and to tell what driver is in use; we assume the `dvips' driver - - $AWK ' - BEGIN {kind=""; # we saw now \documentXXX[]{} - } - /^\\documentstyle/{ - kind = "209"; - if (index($0, "changebar") == 0 ) { - opts = index($0, "[") - if (opts > 0) - printf "%schangebar,%s\n",substr($0,1,opts),substr($0,opts+1) - else - printf "\\documentstyle[changebar]%s\n", substr($0,15) - next - } - } - /^\\documentclass/{ - kind = "2e"; - printf "%s\n", $0 - printf "\\usepackage[dvips]{changebar}\n" - next - } - /\\begin{document}/ {if (kind == "209" ) {print "\\driver{dvips}"}} - /\\begin{verbatim}/{++nesting} - /\\end{verbatim}/{--nesting} - /\\cbstart{}%|\\cbend{}%|\cbdelete{}%/ { - if ( nesting > 0) { - # changebar command in a verbatim environment: Temporarily exit, - # do the changebar command and reenter. - # - # The obvious ( printf "\\end{verbatim}%s\\begin{verbatim} , $0 ) - # leaves too much vertical space around the changed line(s). - # The following magic seeems to work - # - print "\\end{verbatim}\\nointerlineskip" - print "\\vskip -\\ht\\strutbox\\vskip -\\ht\\strutbox" - printf "\\vbox to 0pt{\\vskip \\ht\\strutbox%s\\vss}\n", $0 - print "\\begin{verbatim}" - next - } - } - { print $0 } - ' ${TMPFILE}.1 > ${TMPFILE}.2 - - # if a \begin{document} is contained in the file, - # remove the changebar commands before them - - if [ $HAS_BEGIN_DOC = "YES" ] - then - SED_CMD="1,/\\\\begin{document}/s/\(\\\\cb[sed][tne][adl][^{}]*{}%\)$/%%\1/" - $SED "$SED_CMD" ${TMPFILE}.2 > ${TMPFILE}.3 - else - $CAT ${TMPFILE}.2 > ${TMPFILE}.3 - fi - if [ -z "$OUT" ] - then - $CAT ${TMPFILE}.3 - else - $MV ${TMPFILE}.3 $OUT - fi - -done - -[ $DEBUG = "NO" ] && $RM ${TMPFILE}.* - -############################################################### diff --git a/macros/latex/contrib/hvextern/Changes b/macros/latex/contrib/hvextern/Changes index 512bf9c194..0204c888fb 100644 --- a/macros/latex/contrib/hvextern/Changes +++ b/macros/latex/contrib/hvextern/Changes @@ -1,5 +1,7 @@ hvextern.sty ---------------- +v 0.23 2022-05-08 - added \runExtCmd + - added doctype shell v 0.22 2022-05-05 - added mpvalign, tclbox v 0.21 2022-04-30 - added java support v 0.20 2022-04-27 - use L3 for the comma separated lists diff --git a/macros/latex/contrib/hvextern/doc/hvdoctools.sty b/macros/latex/contrib/hvextern/doc/hvdoctools.sty index 04cdd46724..23ff524a9a 100644 --- a/macros/latex/contrib/hvextern/doc/hvdoctools.sty +++ b/macros/latex/contrib/hvextern/doc/hvdoctools.sty @@ -24,13 +24,17 @@ \def\Lprog#1{\texttt{#1}\index{#1@\texttt{#1} (program)}} \def\Lcolor#1{\texttt{#1}\index{#1@\texttt{#1} (color)}} \def\Loption#1{\texttt{#1}\index{#1@\texttt{#1} (package option)}} -\def\Lkeyword#1{\texttt{#1}\index{#1@\texttt{#1} (keyword)}} +\def\Lkeyword#1{\texttt{#1}\index{#1@\texttt{#1} (keyword)}\index{Keyword!#1@\texttt{#1}}} \def\Lkeyval#1{\texttt{#1}\index{#1@\texttt{#1} (value)}} \def\Lskip#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1} (skip)}} \def\Lkeyset#1{\expandafter\Lkeyset@i#1\@nil} \def\Lkeyset@i#1=#2\@nil{\texttt{#1=#2}% \index{#1@\texttt{#1} (keyword)}\index{Keyword!#1@\texttt{#1}} \index{#2@\texttt{#2} (value)}\index{Value!#2@\texttt{#2}}} + +\def\LKeyset#1{\expandafter\LKeyset@i#1\@nil} +\def\LKeyset@i#1=#2\@nil{\texttt{#1=#2}% + \index{#1@\texttt{#1} (keyword)}\index{Keyword!#1@\texttt{#1}}} \newsavebox\boxdef \newenvironment{BDef} {\begin{lrbox}{\boxdef} @@ -40,6 +44,7 @@ {\BCmd\fbox{\usebox\boxdef}\endBCmd} \aftergroup\@afterindentfalse\aftergroup\@afterheading } +\def\Lclass#1{\texttt{#1}\index{#1@\texttt{#1} (doc class)}} \newskip\BDefaboveskip \newskip\BDefbelowskip diff --git a/macros/latex/contrib/hvextern/doc/hvextern.pdf b/macros/latex/contrib/hvextern/doc/hvextern.pdf index 2817fa93b8..c521b487ea 100644 Binary files a/macros/latex/contrib/hvextern/doc/hvextern.pdf and b/macros/latex/contrib/hvextern/doc/hvextern.pdf differ diff --git a/macros/latex/contrib/hvextern/doc/hvextern.tex b/macros/latex/contrib/hvextern/doc/hvextern.tex index c26ac017a0..8c104803e6 100644 --- a/macros/latex/contrib/hvextern/doc/hvextern.tex +++ b/macros/latex/contrib/hvextern/doc/hvextern.tex @@ -30,7 +30,7 @@ from within a main \LaTeX\ document~--v. \hvexternFileversion} \newpage -\setkeys{hv}{moveToExampleDir,ExampleDir=Examples,showFilename} +\setkeys{hv}{moveToExampleDir,ExampleDir=Examples,showFilename,verbose} \section{Syntax} \begin{verbatim} @@ -44,7 +44,7 @@ it into the main \LaTeX\ document. \end{sloppypar} -There is only one environment: +There is only one environment and one command: \begin{verbatim} \begin{externalDocument}[]{} @@ -52,6 +52,8 @@ There is only one environment: source code ... \end{externalDocument} + +\runExtCmd[]{}{} \end{verbatim} The main document \emph{must} be run with the \Loption{-shell-escape} option, otherwise it won't work, e.g.: @@ -71,7 +73,7 @@ automatically in the main document.. \noindent \fbox{\begin{minipage}{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax} \emph{All} examples in this document are created on-the-fly while running this \LaTeX\ document -with \texttt{lualatex} with the \texttt{-\kern2pt-shell-escape} option. +with \texttt{lualatex} with the \texttt{-\kern1pt-shell-escape} option. \end{minipage}} @@ -114,7 +116,7 @@ shown by the environment \Lenv{externalDocument}. \end{minipage} \begin{minipage}{.39\linewidth} \begin{externalDocument}[ - compiler=pdflatex,force,cleanup={log,aux},verbose]{voss} + compiler=pdflatex,force=false,cleanup={log,aux},verbose]{voss} \documentclass{standalone} %StartVisiblePreamble \usepackage{fontenc} @@ -172,7 +174,7 @@ catagory, which is done internally by the package. The complete definition of th showFilename, code, ext=py, - force, + force=false, docType=py, usefancyvrb, grfOptions={width=\linewidth}]{python} @@ -222,7 +224,7 @@ line in the above code shows how it can be done with Python. \begin{externalDocument}[ compiler=python3, progpath=/usr/local/bin/, - force, + force=false, showFilename, runs=1, code, @@ -271,7 +273,7 @@ image.save(imageName+".png", "PNG") \begin{externalDocument}[grfOptions={width=0.95\linewidth}, compiler=xelatex,code,mpwidth=0.6\linewidth, - crop,cleanup,force,usefancyvrb=false,ext=tex]{voss} + crop,cleanup,force=false,usefancyvrb=false,ext=tex]{voss} \documentclass{article} %StartVisiblePreamble \usepackage{tikz} @@ -354,7 +356,7 @@ ext=lua, compiler=lua, docType=lua, ... The default setting is always shown in brackets. \subsection{Programs and runs} -The \texttt{progpath} should only in some +The \Lkeyword{progpath} should only in some rare cases needed. In general all used compilers will be found by the system. A given \Lkeyword{progpath} must be end with a slash, e.g. \Lkeyval{./bin/} @@ -366,9 +368,9 @@ must be end with a slash, e.g. \Lkeyval{./bin/} \end{verbatim} Instead of the optional arguments - \\Lkeyword{compiler}, \\Lkeyword{biber}, and \\Lkeyword{xindex} one can define an individual + \Lkeyword{compiler}, \Lkeyword{biber}, and \Lkeyword{xindex} one can define an individual command sequence by using the optional argument - \\Lkeyword{runsequence}. It must be comma separated list: + \Lkeyword{runsequence}. It must be comma separated list: \begin{verbatim} runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex} @@ -381,7 +383,7 @@ runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex} runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex}, showFilename, verbose, - force, + force=false, cleanup={log,aux,toc,bbl,blg}, code,docType=latex, lstOptions={columns=fixed}]{voss} @@ -420,7 +422,7 @@ the environment \Lenv{externalDocument} is: \begin{externalDocument}[ verbose, compiler=java,ext=java,code, - force,docType=java,includegraphic, + force=false,docType=java,includegraphic, usefancyvrb,grfOptions={width=0.9\linewidth}]{java} import java.awt.Color; import java.awt.Graphics; @@ -484,7 +486,7 @@ public class Main { \end{externalDocument} - +%$ \subsection{Grafik options} @@ -545,7 +547,7 @@ to \Lcs{VerbatimInput}. The following example uses mpwidth=0.6\linewidth, crop, cleanup, - force, + force=false, docType=latex]{voss} \RequirePackage{pdfmanagement-testphase} \DeclareDocumentMetadata{} @@ -571,7 +573,7 @@ There are different colors for the preamble and body listing: the backgrund and \define@key{hv}{BObody}[black8]{\def\hv@extern@BObody{#1}} \end{verbatim} -The options are passed to \Lpack{tcolorbox} and preset to \Lcolor{black12} and \Lcolor{black!8}. +The options are passed to \Lpack{tcolorbox} and preset to \Lcolor{black"!12} and \Lcolor{black"!8}. The color of the frame is set to the same values, hence not seen. The following example uses \begin{verbatim} @@ -591,7 +593,7 @@ The color of the frame is set to the same values, hence not seen. The following mpwidth=0.6\linewidth, crop, cleanup, - force, + force=false, usefancyvrb, docType=latex]{voss} \RequirePackage{pdfmanagement-testphase} @@ -668,7 +670,7 @@ The image Figure~\ref{img:cox} shows an example for a floting object. % mpwidth=0.6\linewidth, crop, cleanup, - force, + force=false, usefancyvrb, float, caption={An example for Coxeter images}, @@ -730,7 +732,7 @@ The following example uses: % mpwidth=0.6\linewidth, % crop, cleanup, - force, + force=false, frame, % usefancyvrb, % float, @@ -756,7 +758,7 @@ The following example uses: \subsection{Cropping the PDF} -Instead of using the \Index{documentclass} \Lcs{standalone}, which already crops the created PDF, +Instead of using the \Index{documentclass} \Lclass{standalone}, which already crops the created PDF, one can use the optional argument \Lkeyword{crop}. \begin{verbatim} @@ -789,7 +791,7 @@ The follwoing example was created with % mpwidth=0.6\linewidth, crop, cropmargin=5, cleanup, - force, + force=false, frame, % usefancyvrb, % float, @@ -849,7 +851,7 @@ or \Lkeyval{b}. code, crop, cleanup, - force, + force=false, docType=latex]{voss} \documentclass{article} \pagestyle{empty} @@ -872,7 +874,7 @@ or \Lkeyval{b}. code, crop, cleanup, - force, + force=false, docType=latex]{voss} \documentclass{article} \pagestyle{empty} @@ -896,7 +898,7 @@ or \Lkeyval{b}. code, crop, cleanup, - force, + force=false, docType=latex]{voss} \documentclass{article} \pagestyle{empty} @@ -920,7 +922,7 @@ or \Lkeyval{b}. code, crop, cleanup, - force, + force=false, mpwidth=0.5\linewidth, docType=latex]{voss} \documentclass{article} @@ -944,7 +946,7 @@ or \Lkeyval{b}. code, crop, cleanup, - force, + force=false, mpwidth=0.5\linewidth, docType=latex]{voss} \documentclass{article} @@ -969,7 +971,7 @@ or \Lkeyval{b}. code, crop, cleanup, - force, + force=false, mpwidth=0.5\linewidth, docType=latex]{voss} \documentclass{article} @@ -981,18 +983,18 @@ or \Lkeyval{b}. \subsection{Inline images} By default code and image are own paragraphs. With the optional argument \Lkeyword{inline} the created -image can be part of the current line. This may make sense, if you need characters which are +image can be part of the \Index{current line}. This may make sense, if you need characters which are not part of your current font. \begin{verbatim} \define@boolkey{hv}[hv@extern@]{inline}[true]{\hv@extern@codefalse} \end{verbatim} -With \texttt{inline=true} the optional argument \texttt{code} is automatically set to false. The +With the setting \LKeyset{inline=true} the optional keyword \Lkeyword{code} is automatically set to false. The next Chinese characters \begin{externalDocument}[ compiler=xelatex, inline, runs=2, grfOptions={height=8pt}, - crop, cropmargin=0, cleanup, force, docType=latex]{voss}% + crop, cropmargin=0, cleanup, force=false, docType=latex]{voss}% \documentclass{ctexart} \pagestyle{empty} \begin{document} @@ -1008,7 +1010,7 @@ With \Lkeyset{inline} the optional argument \Lkeyword{code} is automatically set next Chinese characters \begin{externalDocument}[ compiler=xelatex, inline, runs=2, grfOptions={height=8pt}, - crop, cropmargin=0, cleanup, force, docType=latex]{voss} + crop, cropmargin=0, cleanup, force=false, docType=latex]{voss} \documentclass{ctexart} \pagestyle{empty} \begin{document} @@ -1020,9 +1022,9 @@ are inserted as inline image without showing the code. The complete code looks l \subsection{Input text instead of an image} -By default the created pdf which can be, of course, only test, wil be insert by \verb|\incudegraphics|. -If you have only text as output and dont want to create a pdf you can insert this kind of -output as verbatim text by setting \verb|includegraphic=false|. +By default the created pdf which can be, of course, only text, will be inserted by \Lcs{includegraphics}. +If you have only text as output and don't want to create a pdf you can insert this kind of +output as verbatim text by setting \Lkeyset{includegraphic=false}. \begin{verbatim} \define@boolkey{hv}[hv@extern@]{includegraphic}[true]{} @@ -1046,7 +1048,7 @@ sorted digits of the number $A$: $495=954-459$. \begin{externalDocument}[ - compiler=perl, force, docType=pl, ext=pl, includegraphic=false, + compiler=perl, force=false, docType=pl, ext=pl, includegraphic=false, code, mpwidth=0.6\linewidth]{voss} #!/usr/bin/perl # @@ -1101,7 +1103,7 @@ outFile = io.open(shortFN..".txt","w+") -- open external file \begin{externalDocument}[ - compiler=lua, force, docType=lua, ext=lua, includegraphic=false, code, usefancyvrb=false]{voss} + compiler=lua, force=false, docType=lua, ext=lua, includegraphic=false, code, usefancyvrb=false]{voss} #!/usr/bin/env lua local filename = arg[0] local shortFN = filename:match("(.+)%..+") @@ -1140,7 +1142,7 @@ outFile:close() \subsection{Running additional external programs} -For a \LaTeX\ additional programs for bibliography, index, a.s.o. maybe needed. +For a \LaTeX\ additional programs for \Index{bibliography}, \Index{index}, a.s.o. maybe needed. \begin{verbatim} \define@boolkey{hv}[hv@extern@]{biber}[true]{} @@ -1174,7 +1176,7 @@ The following examples uses pages=2, crop, cleanup, - force, + force=false, xindex, xindexOptions={-l DE --config AU}, mpwidth=0.6\linewidth, @@ -1230,7 +1232,7 @@ runsequence={lualatex,biber,{xindex -l de -c AU},lualatex,lualatex} runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex}, showFilename, verbose, - force, + force=false, cleanup={log,aux,toc,bbl,blg}, code,docType=latex, lstOptions={columns=fixed}]{voss} @@ -1264,7 +1266,7 @@ Sort with xindex \verb|-l DE --config AU| \subsection{Using \texttt{listings}} -The default is using \verb|\lstinputlisting| for the printed code sequences. +The default is using \Lcs{lstinputlisting} for the printed code sequences. \begin{externalDocument}[ grfOptions={width=0.45\linewidth}, @@ -1272,7 +1274,7 @@ The default is using \verb|\lstinputlisting| for the printed code sequences. frame,compiler=pdflatex, showFilename, % crop, - force,runs=2,code,docType=latex, + force=false,runs=2,code,docType=latex, frame, lstOptions={columns=fixed}]{voss} %StartVisiblePreamble @@ -1322,7 +1324,7 @@ The default is using \verb|\lstinputlisting| for the printed code sequences. -It also possible to use \verb|\VerbatimInput| from package \texttt{fancyvrb}. In general +It also possible to use \Lcs{VerbatimInput} from package \Lpack{fancyvrb}. In general it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not. @@ -1332,7 +1334,7 @@ it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not frame,compiler=pdflatex, showFilename, % crop, - force,runs=2,code,docType=latex, + force=false,runs=2,code,docType=latex, frame,usefancyvrb]{voss} %StartVisiblePreamble \documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrbook} @@ -1392,7 +1394,7 @@ it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not compiler=mpost, showFilename, % crop, - force, + force=false, cleanup, code, docType=mp, @@ -1424,7 +1426,7 @@ end; compiler=tex, showFilename, % crop, - force, + force=false, code, docType=tex, ext=tex,]{voss} @@ -1488,7 +1490,7 @@ This is the start of the introduction. compiler=lualatex, showFilename, crop, - force, + force=false, code, docType=latex, ext=tex,]{voss} @@ -1528,7 +1530,7 @@ This is the start of the introduction. compiler=context, showFilename, runs=2, - force, + force=false, code, docType=context, ext=tex,]{voss} @@ -1569,18 +1571,32 @@ foo \end{externalDocument} +\section{Running external commands} +Integrating the current directory of this document we can use the macro \Lcs{runExtCmd} with +the optional argument \Lkeyword{redirect} + +\begin{verbatim} +\runExtCmd[redirect]{ls -la}{voss} +\end{verbatim} + +to get the directory listed: + +\medskip +\runExtCmd[redirect,verbose]{ls -la}{voss} + + \section{Other options} \begin{description} -\item[\texttt{force=false}] can speed up the comiling time for the document. If a created image/output +\item[\Lkeyset{force=false}] can speed up the comiling time for the document. If a created image/output already exists, there is no need to create it with the next run again and again. -\item[\texttt{cleanup}] the auxiliary files of a \LaTeX-run are deleted, preset to \texttt{.aux}, \texttt{.log}. +\item[\Lkeyword{cleanup}] the auxiliary files of a \LaTeX-run are deleted, preset to \texttt{aux}, \texttt{log}. It must be a comma seperated list of the extensions of the main file, s.g. \texttt{cleanup=\{aux,log\}}. -\item[\texttt{copyToExampleDir}] name of a directory for the examples, must first be created by the user himself -\item[\texttt{ExamplesDir}] move all examples into a directory -\item[\texttt{tclbox=false}] Can be used if there are some negative interactions between package \texttt{listing} - and package \texttt{tcolorbox}. -\item[\texttt{eps}] create an eps from the pdf (historical) +\item[\Lkeyword{copyToExampleDir}] name of a directory for the examples, must first be created by the user himself +\item[\Lkeyword{ExamplesDir}] move all examples into a directory +\item[\Lkeyset{tclbox=false}] Can be used if there are some negative interactions between package \Lpack{listings} + and package \Lpack{tcolorbox}. +\item[\Lkeyword{eps}] create an eps from the pdf (historical). \end{description} diff --git a/macros/latex/contrib/hvextern/latex/hvextern.sty b/macros/latex/contrib/hvextern/latex/hvextern.sty index f728f941ae..5179123aa2 100644 --- a/macros/latex/contrib/hvextern/latex/hvextern.sty +++ b/macros/latex/contrib/hvextern/latex/hvextern.sty @@ -11,8 +11,8 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\def\hvexternFileversion{0.22} -\ProvidesFile{hvextern}[2022/05/05 v\hvexternFileversion: package for running external documents (HV)] +\def\hvexternFileversion{0.23} +\ProvidesFile{hvextern}[2022/05/08 v\hvexternFileversion: package for running external documents (HV)] \RequirePackage{shellesc,xkeyval,graphicx,marginnote,fancyvrb,tikz,listings,ifplatform} \RequirePackage{tcolorbox,xparse} @@ -81,7 +81,7 @@ %\define@key{hv}{compiler}[pdflatex]{\def\hv@extern@compiler{#1}} \define@choicekey*+{hv}{compiler}[\val\nr]{mpost,tex,latex,luatex,python3,perl,lua,java,% - xetex,pdflatex,lualatex,xelatex,context}[pdflatex]{% + xetex,pdflatex,lualatex,xelatex,context,sh,texlua}[pdflatex]{% \hv@typeout{>>>> Compiler type \nr}% \def\hv@extern@compiler{\val}% \edef\hv@extern@compilerNo{\nr}% @@ -297,6 +297,15 @@ {//StopVisiblePreamble} +%---- Shell +%\input{hvextern-sh.cfg} +\hv@extern@ExampleType{sh} + {\NumChar StartVisibleMain} + {\NumChar StopVisibleMain} + {\NumChar StartVisiblePreamble} + {\NumChar StopVisiblePreamble} + + %%%--------------------------------- end config part ------------------ %% @@ -305,6 +314,7 @@ \newenvironment{externalDocument}[2][]{% \xdef\hvExternDateiname{#2-\arabic{hv@example@counter}}% \setkeys{hv}{#1}% \begin + \hv@typeout{External filename: \hvExternDateiname}% \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.pdf}{}{% \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.png}{}{% \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.txt}{}{% @@ -332,10 +342,11 @@ \hv@typeout{>>>> running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% \hv@extern@runLATEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% \else - \hv@typeout{>>>> running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% \ifhv@extern@redirect + \hv@typeout{>>>> running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext > \hvExternDateiname.txt}% \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext\space > \hvExternDateiname.txt}% \else + \hv@typeout{>>>> running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext}% \fi \fi @@ -350,7 +361,7 @@ \ShellEscape{xindex \hv@extern@xindexOptions\space \hvExternDateiname.idx}% NAch xindex nochmal latex \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname}% \fi - \else + \else % runsequence \expandafter\run@hv@extern@sequenceList\expandafter{\hv@extern@runsequence}% \fi \ifhv@extern@crop @@ -360,8 +371,9 @@ \ifhv@extern@eps \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternDateiname.pdf}% \fi - \fi + \fi% end force \ifhv@extern@code%-------------- Code Part + \hv@typeout{>>>>Starting Code part ...}% \par\noindent \begingroup \ifdim\hv@extern@mpwidth>\z@ \minipage[\hv@extern@mpvalign]{\hv@extern@mpwidth}\vspace{0pt}\fi @@ -402,8 +414,8 @@ \fi \ifdim\hv@extern@mpwidth > \z@\relax \endminipage\fi \endgroup - \fi - \ifhv@extern@code\else + \fi % end code part + \ifhv@extern@code\else % only if no code \ifhv@extern@showFilename \hv@typeout{>>>> Set filename in the margin!}% \marginnote{\rotatebox{90}{\hvExternDateiname}}% @@ -412,6 +424,7 @@ \ifhv@extern@moveToExampleDir % \ShellEscape{mkdir\space\hv@extern@ExamplesDir/}% \hv@typeout{>>>> Move file into example dir}% + \hv@typeout{>>>>>>\hvExternDateiname ---- \hv@extern@ExamplesDir}% \ShellEscape{\hv@move \hvExternDateiname.*\space \hv@extern@ExamplesDir}% \fi \ifhv@extern@includegraphic @@ -452,15 +465,76 @@ \else% no graphic, only text \ifdim\hv@extern@mpwidth>\z@ \hfill\minipage[t]{\dimexpr\linewidth-\hv@extern@mpwidth-1em\relax}\vspace{0pt} - \noindent\VerbatimInput{\hv@extern@ExamplesDir\hvExternDateiname.txt} + \noindent\BodyListing{\hv@extern@ExamplesDir\hvExternDateiname.txt} \endminipage \else - \noindent\VerbatimInput{\hv@extern@ExamplesDir\hvExternDateiname.txt} + \noindent\BodyListing{\hv@extern@ExamplesDir\hvExternDateiname.txt} \fi \fi \ifhv@extern@force\expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}\fi% cleanup } + \stepcounter{hv@example@counter}% + + +\newcommand\runExtCmd[3][]{% + \begingroup + \setkeys{hv}{code=false,includegraphic=false,#1}% + \xdef\hvExternDateiname{#3-\arabic{hv@example@counter}}% + \hv@typeout{>>>> running #2}% + \ifhv@extern@redirect + \ShellEscape{\hv@extern@progpath#2 > \hv@extern@ExamplesDir\hvExternDateiname.txt}% + \else + \ShellEscape{\hv@extern@progpath#2}% + \fi + \global\stepcounter{hv@example@counter}% + %------------------------------------- output ----------------------------------- + \ifhv@extern@includegraphic + \ifhv@extern@inline + \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@ExamplesDir\hvExternDateiname}% + \else + \ifhv@extern@float + \hv@typeout{>>>> Floating environment}% + \begin{figure}[!htb] + \else + \hv@typeout{>>>> No floating environment}% + \par\noindent\begingroup + \fi + \hv@extern@align + \hv@typeout{>>>> Input image \hv@extern@ExamplesDir\hvExternDateiname}% + \ifhv@extern@frame + \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{% + \fbox{\expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]{\hv@extern@ExamplesDir\hvExternDateiname}}% + \hspace{5pt}}\hspace*{-5pt}% + \else + \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{% + \expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]% + {\hv@extern@ExamplesDir\hvExternDateiname}% + \hspace{5pt}}\hspace*{-5pt}% + \fi + \ifx\hv@extern@caption\@empty\else\caption{\hv@extern@caption}\fi + \ifx\hv@extern@label\@empty\else\label{\hv@extern@label}\fi + \ifhv@extern@float + \end{figure}% + \else + \ifdim\hv@extern@mpwidth>\z@ \endminipage\else\par\endgroup\fi + \fi + \fi + \else% no graphic, only text + \ifhv@extern@float + \hv@typeout{>>>> Floating environment}% + \begin{figure}[!htb] + \noindent\BodyListing{\hv@extern@ExamplesDir\hvExternDateiname.txt} + \ifx\hv@extern@caption\@empty\else\caption{\hv@extern@caption}\fi + \ifx\hv@extern@label\@empty\else\label{\hv@extern@label}\fi + \end{figure} + \else + \noindent\BodyListing{\hv@extern@ExamplesDir\hvExternDateiname.txt} + \fi + \fi + \ifhv@extern@force\expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}\fi% cleanup + \endgroup +} % %% \endinput diff --git a/macros/latex/contrib/hvlogos/Changes b/macros/latex/contrib/hvlogos/Changes index 9517b17c84..3e81878f5a 100644 --- a/macros/latex/contrib/hvlogos/Changes +++ b/macros/latex/contrib/hvlogos/Changes @@ -1,4 +1,5 @@ hvlogos.sty: +0.09 2022-05-06 - changed almost all \def to \providecommand 0.08 2022-04-25 - added \mkII, \mkIV 0.07 2022-02-28 - fix for \dante and \eV 0.06 2022-01-23 - added \BibLaTeXML diff --git a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf index 8b483f54d1..c279a280b2 100644 Binary files a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf and b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf differ diff --git a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex index 30ffb01ad5..bf2e1a54ee 100644 --- a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex +++ b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex @@ -13,7 +13,7 @@ \title{\texttt{hvlogos} -- Print \TeX-related Logos} \author{Herbert Voß\thanks{Thanks to -Denis Bitouzé, Heiko Oberdiek, Mark Senn}} +Karl Berry, Denis Bitouzé, Heiko Oberdiek, Mark Senn}} \begin{document} \maketitle diff --git a/macros/latex/contrib/hvlogos/latex/hvlogos.sty b/macros/latex/contrib/hvlogos/latex/hvlogos.sty index 5a94c04554..6fab62f878 100644 --- a/macros/latex/contrib/hvlogos/latex/hvlogos.sty +++ b/macros/latex/contrib/hvlogos/latex/hvlogos.sty @@ -10,7 +10,7 @@ % % % ------------------------------------- -\ProvidesPackage{hvlogos}[2022/04/25 v. 0.08 Logos (hv)] +\ProvidesPackage{hvlogos}[2022/05/06 v. 0.09 Logos (hv)] % \newif\if@dtk@newengine \@dtk@newenginetrue % @@ -28,13 +28,13 @@ \DeclareRobustCommand\ffmfamily{\not@math@alphabet\ffmfamily\relax \fontencoding{T1}\fontfamily{ffm}\selectfont} \DeclareTextFontCommand{\textffm}{\ffmfamily} -\def\MF{\textffm{META}\@dischyph\textffm{FONT}\@} -\def\MP{\textffm{META}\@dischyph\textffm{POST}\@} -\def\MT{\textffm{META}\@dischyph\textffm{TYPE1}\@} +\providecommand\MF{\textffm{META}\@dischyph\textffm{FONT}\@} +\providecommand\MP{\textffm{META}\@dischyph\textffm{POST}\@} +\providecommand\MT{\textffm{META}\@dischyph\textffm{TYPE1}\@} \fi -\def\mpShort{\textffm{MP}\@} -\def\mfShort{\textffm{MF}\@} +\providecommand\mpShort{\textffm{MP}\@} +\providecommand\mfShort{\textffm{MF}\@} \ExplSyntaxOn \DeclareDocumentCommand\hologo@La{ O{-0.25em} }% @@ -68,13 +68,13 @@ \ExplSyntaxOff -\def\AmS{\textsf{AMS}} +\providecommand\AmS{\textsf{AMS}} \let\AMS\AmS %{\ifluatex\mathversion{XITS}\fi% % $\mathcal{A}$\kern-.1667em\lower.5ex\hbox{$\mathcal{M}$}\kern-.125em$\mathcal{S}$}}% $ -\def\amsmath{\AMS\textsf{math}} -\def\AmSLaTeX{\mbox{\textsf{AMS}-\LaTeX}} -\def\AmSTeX{\mbox{\textsf{AMS}-\hologo{TeX}}} +\providecommand\amsmath{\AMS\textsf{math}} +\providecommand\AmSLaTeX{\mbox{\textsf{AMS}-\LaTeX}} +\providecommand\AmSTeX{\mbox{\textsf{AMS}-\hologo{TeX}}} \DeclareRobustCommand\Biber{\textsf{Biber}} \let\biber\Biber \DeclareRobustCommand{\BibLaTeXML}{B\kern-.05em% @@ -86,28 +86,28 @@ \kern-.08em\-\LaTeX{}ML} \DeclareRobustCommand\BibTeX{\@ifnextchar8\@@BibTeX\@BibTeX} \def\@BibTeX{{\hologoLogoSetup{BibTeX}{variant=sc}\hologo{BibTeX}}} -\def\BibTeXacht{{\hologoLogoSetup{BibTeX8}{variant=sc}\hologo{BibTeX8}}} +\providecommand\BibTeXacht{{\hologoLogoSetup{BibTeX8}{variant=sc}\hologo{BibTeX8}}} \def\@@BibTeX8{\hologo{BibTeX8}} \DeclareRobustCommand\BibLaTeX{Bib\LaTeX} \let\biblatex\BibLaTeX -\def\ConTeXt{\hologo{ConTeXt}} +\providecommand\ConTeXt{\hologo{ConTeXt}} \let\context\ConTeXt -\def\emTeX{\hologo{emTeX}} -\def\eTeX{\hologo{eTeX}} -\def\ExTeX{\hologo{ExTeX}} -\def\HanTheThanh{\hologo{HanTheThanh}}% +\providecommand\emTeX{\hologo{emTeX}} +\providecommand\eTeX{\hologo{eTeX}} +\providecommand\ExTeX{\hologo{ExTeX}} +\providecommand\HanTheThanh{\hologo{HanTheThanh}}% \let\HTT\HanTheThanh -\def\iniTeX{\hologo{iniTeX}} -\def\KOMAScript{\hologo{KOMAScript}} +\providecommand\iniTeX{\hologo{iniTeX}} +\providecommand\KOMAScript{\hologo{KOMAScript}} -%\def\LaTeX{\hologo{LaTeX}} -%\def\LaTeXTeX{\hologo{(La)TeX}} -\def\LaTeXe{\hologo{LaTeX2e}} -\def\LaTeXIII{\hologo{LaTeX3}} -\def\LaTeXML{\hologo{LaTeXML}} -\def\LuaLaTeX{\hologo{LuaLaTeX}} +%\providecommand\LaTeX{\hologo{LaTeX}} +%\providecommand\LaTeXTeX{\hologo{(La)TeX}} +\providecommand\LaTeXe{\hologo{LaTeX2e}} +\providecommand\LaTeXIII{\hologo{LaTeX3}} +\providecommand\LaTeXML{\hologo{LaTeXML}} +\providecommand\LuaLaTeX{\hologo{LuaLaTeX}} \let\lualatex\LuaLaTeX -\def\LuaTeX{\hologo{LuaTeX}} +\providecommand\LuaTeX{\hologo{LuaTeX}} \let\HoLogoHtml@LuaHBTeX\HoLogo@LuaHBTeX \def\HoLogo@LuaHBTeX#1{% @@ -117,13 +117,13 @@ }% } -\def\LuaHBTeX{\hologo{LuaHBTeX}} +\providecommand\LuaHBTeX{\hologo{LuaHBTeX}} \let\luahbtex\LuaHBTeX \let\LuahbTeX\LuaHBTeX \let\luatex\LuaTeX % -\def\LuaMetaTeX{% +\providecommand\LuaMetaTeX{% \mbox{Lua}% % \HOLOGO@discretionary % \mbox{\fontfamily{logo}\fontencoding{U}\selectfont META} @@ -131,7 +131,7 @@ % \HOLOGO@discretionary \hologo{TeX}% } -\def\LuaMetaLaTeX{% +\providecommand\LuaMetaLaTeX{% \mbox{Lua}% % \HOLOGO@discretionary % \mbox{\fontfamily{logo}\fontencoding{U}\selectfont META} @@ -139,61 +139,61 @@ % \HOLOGO@discretionary \hologo{LaTeX}% } -\def\LMTX{\textsf{LMTX}} +\providecommand\LMTX{\textsf{LMTX}} \let\lmtx\LMTX -\def\LyX{\hologo{LyX}} -\def\META{\HoLogoFont@font{METAFONT}{logo}{\mbox{META}}} -\def\METAFONT{\hologo{METAFONT}} +\providecommand\LyX{\hologo{LyX}} +\providecommand\META{\HoLogoFont@font{METAFONT}{logo}{\mbox{META}}} +\providecommand\METAFONT{\hologo{METAFONT}} \let\MF\METAFONT -\def\MetaFun{\textffm{METAFUN}} +\providecommand\MetaFun{\textffm{METAFUN}} \let\MFun\MetaFun -\def\METAPOST{\hologo{METAPOST}} -\def\MetaPost{\hologo{MetaPost}} -\def\mkII{\textsf{mkII}} +\providecommand\METAPOST{\hologo{METAPOST}} +\providecommand\MetaPost{\hologo{MetaPost}} +\providecommand\mkII{\textsf{mkII}} \let\mkii\mkII -\def\mkIV{\textsf{mkIV}} +\providecommand\mkIV{\textsf{mkIV}} \let\mkiv\mkIV \let\MP\METAPOST -\def\MiKTeX{\hologo{MiKTeX}} -\def\NTS{\hologo{NTS}} -\def\OzMF{\hologo{OzMF}} -\def\OzMP{\hologo{OzMP}} -\def\OzTeX{\hologo{OzTeX}} -\def\OzTtH{\hologo{OzTtH}} -\def\PCTeX{\hologo{PCTeX}} -\def\pdfTeX{\hologo{pdfTeX}} +\providecommand\MiKTeX{\hologo{MiKTeX}} +\providecommand\NTS{\hologo{NTS}} +\providecommand\OzMF{\hologo{OzMF}} +\providecommand\OzMP{\hologo{OzMP}} +\providecommand\OzTeX{\hologo{OzTeX}} +\providecommand\OzTtH{\hologo{OzTtH}} +\providecommand\PCTeX{\hologo{PCTeX}} +\providecommand\pdfTeX{\hologo{pdfTeX}} \let\pdftex\pdfTeX -\def\pdfLaTeX{\hologo{pdfLaTeX}} +\providecommand\pdfLaTeX{\hologo{pdfLaTeX}} \let\pdflatex\pdfLaTeX -\def\PiC{\hologo{PiC}} -\def\PiCTeX{\hologo{PiCTeX}} -\def\plainTeX{\hologo{plainTeX}} -\def\PostScript{Post\-Script} +\providecommand\PiC{\hologo{PiC}} +\providecommand\PiCTeX{\hologo{PiCTeX}} +\providecommand\plainTeX{\hologo{plainTeX}} +\providecommand\PostScript{Post\-Script} \let\PS\PostScript -\def\SageTeX{\hologo{SageTeX}} -\def\SLiTeX{\hologo{SLiTeX}} -\def\teTeX{\hologo{teTeX}} -\def\TeXivht{\hologo{TeX4ht}} +\providecommand\SageTeX{\hologo{SageTeX}} +\providecommand\SLiTeX{\hologo{SLiTeX}} +\providecommand\teTeX{\hologo{teTeX}} +\providecommand\TeXivht{\hologo{TeX4ht}} \def\tex4ht{\hologo{TeX4ht}} -\def\TTH{\hologo{TTH}} -\def\virTeX{\hologo{virTeX}} -\def\VTeX{\hologo{VTeX}} -\def\XeLaTeX{\hologo{XeLaTeX}} -\def\XeTeX{\hologo{XeTeX}} +\providecommand\TTH{\hologo{TTH}} +\providecommand\virTeX{\hologo{virTeX}} +\providecommand\VTeX{\hologo{VTeX}} +\providecommand\XeLaTeX{\hologo{XeLaTeX}} +\providecommand\XeTeX{\hologo{XeTeX}} \DeclareRobustCommand\xypic{\textsf{\hbox{\kern-.1em X\kern-.1em\lower.4ex\hbox{Y\kern-.1em}-pic}}} \let\XYpic\xypic %% % \newcommand\BibTool{\textsc{Bib\hskip-.1em T\hskip-.15emo\hskip-.05emo\hskip-.05eml}\xspace} -\def\tikzlogo{Ti\textit{k}Z} -\def\ALEPH{\ensuremath{\aleph}} +\providecommand\tikzlogo{Ti\textit{k}Z} +\providecommand\ALEPH{\ensuremath{\aleph}} \let\TikZ\tikzlogo -\def\eV{e.\kern-0.1em V\kern-0.18em.} +\providecommand\eV{e.\kern-0.1em V\kern-0.18em.} -\def\dante{DANTE~e.\kern-0.1em V\kern-0.18em.} +\providecommand\dante{DANTE~e.\kern-0.1em V\kern-0.18em.} \iffalse \def\d@nte{\@ifnextchar.% @@ -222,34 +222,34 @@ \fi} \providecommand\dtk{Die \TeX\-ni\-sche Ko\-mö\-die} -\providecommand\DTK{``\dtk''} +\providecommand\DTK{\glqq\dtk\grqq} \providecommand\PS{Post\-Script} \providecommand\TUG{\TeX{} Users Group} \providecommand\TUGboat{\textsl{TUGboat}} \let\DANTE\dantelogo \def\pgf/tikz{pgf/Ti\textit{k}Z} -\def\pgftikz{pgf/Ti\textit{k}Z} -\def\TeXLive{\TeX{}Live\xspace} +\providecommand\pgftikz{pgf/Ti\textit{k}Z} +\providecommand\TeXLive{\TeX{}Live\xspace} -\def\CTAN{\textsf{CTAN}\xspace} +\providecommand\CTAN{\textsf{CTAN}\xspace} -\def\PSTricks{\textsf{PSTricks}\xspace} +\providecommand\PSTricks{\textsf{PSTricks}\xspace} \let\pstricks\PSTricks \if@dtk@newengine \newfontfamily\dtk@LinWikipedia{Linux Libertine O}% - \def\WikipediA{{\dtk@LinWikipedia\char"E02F\textsc{ikipediA}}} % hexadezimal + \providecommand\WikipediA{{\dtk@LinWikipedia\char"E02F\textsc{ikipediA}}} % hexadezimal \else - \def\WikipediA{WikipediA}% + \providecommand\WikipediA{WikipediA}% \fi \let\Wikipedia\WikipediA \let\wikipedia\WikipediA % -\def\macOS{\textsf{macOS}\xspace} +\providecommand\macOS{\textsf{macOS}\xspace} -\def\PurdueThesis{P\kern-0.15ex urdue\kern-0.05ex T\kern-0.1ex hesis} +\providecommand\PurdueThesis{P\kern-0.15ex urdue\kern-0.05ex T\kern-0.1ex hesis} \let\purduethesis = \PurdueThesis -\def\PuTh{P\kern-0.15ex u\kern-0.05ex T\kern-0.1ex h} +\providecommand\PuTh{P\kern-0.15ex u\kern-0.05ex T\kern-0.1ex h} \let\puth = \PuTh diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf index bfccc07f4e..92b1181a85 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix-french.pdf and b/macros/latex/contrib/nicematrix/nicematrix-french.pdf differ diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex index 4e76c71235..66246c9ba2 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -1170,64 +1170,6 @@ Cette commande |\diagbox| peut aussi être utilisée dans un |\Block|. -\subsection{Filets en pointillés} - -\label{dotted} - -Dans les environnements de \pkg{nicematrix}, il est possible d'utiliser la -commande |\hdottedline| (fournie par \pkg{nicematrix}) qui est l'équivalent pour -les pointillés de la commande |\hline|. - -\medskip -\begin{BVerbatim}[baseline=c,boxwidth=9.5cm] -\begin{pNiceMatrix} -1 & 2 & 3 & 4 & 5 \\ -~emphase#\hdottedline@ -6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 -\end{pNiceMatrix} -\end{BVerbatim} -$\begin{pNiceMatrix} -1 & 2 & 3 & 4 & 5 \\ -\hdottedline -6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 -\end{pNiceMatrix}$ - - -\medskip -Dans les environnements avec un préambule explicite (comme |{NiceTabular}|, -|{NiceArray}|, etc.), il est possible de dessiner un trait vertical en -pointillés avec le spécificateur «|:|». - -\medskip -\begin{BVerbatim}[baseline=c,boxwidth=9.5cm] -\begin{pNiceArray}{cccc~emphase#:@c} -1 & 2 & 3 & 4 & 5 \\ -6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 -\end{pNiceArray} -\end{BVerbatim} -$\begin{pNiceArray}{cccc:c} -1 & 2 & 3 & 4 & 5 \\ -6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 -\end{pNiceArray}$ - -\medskip -Il est possible de changer dans \pkg{nicematrix} la lettre utilisée pour -indiquer dans le préambule un trait vertical en pointillés avec l'option -|letter-for-dotted-lines| disponible dans |\NiceMatrixOptions|. - -\medskip -\emph{Remarque} : Quand l'extension \pkg{array} (sur laquelle s'appuie -\pkg{nicematrix}) est chargée, les traits verticaux et horizontaux que l'on -insère rendent le tableau plus large ou plus long d'une quantité égale à la -largeur du trait\footnote{En fait, avec l'extension \pkg{array}, cela est vrai - pour |\hline| et «\verb+|+» mais pas pour |\cline| : cf. - p.~\pageref{remark-cline}}. Avec \pkg{nicematrix}, les lignes en pointillés -tracées par |\hdottedline| et «|:|» ont ce même effet. - \subsection{Commandes pour filets personnalisés} \label{custom-line} @@ -1271,36 +1213,10 @@ environnement ; d'intérêt que dans le cas où la clé |multiplicity| est utilisée). \end{itemize} -\medskip -\item \emph{Deuxième possibilité}\par\nobreak - -On peut utiliser la clé |dotted| qui impose un style de pointillés qui utilise -le système de pointillés de la commande |\hdottedline| (et de la lettre -\verb|:|) décrit à la partie précédente (cf. p.~\pageref{dotted}). La clé -|color| est en fait aussi utilisable dans ce cas-là. - -\medskip -\item \colorbox{yellow!50}{\textbf{Nouveau 6.6}}\enskip \emph{Troisième - possibilité} - -On peut utiliser la clé |tikz| (si Tikz est chargé, \pkg{nicematrix} ne -chargeant par défaut que \textsc{pgf}). Dans ce cas-là, le filet est tracé -directement avec Tikz en utilisant comme paramètres la valeur de la clé |tikz| -qui doit être une liste de couples \textsl{clé=valeur} applicables à un chemin -Tikz. - -Par défaut aucune réservation de place n'est faite par défaut pour le filet qui -sera tracé avec Tikz. On peut demander une réservation (horizontale pour un -filet vertical et verticale pour un filet horizontal) avec la clé |width| qui -est donc en quelque sorte la largeur du filet qui sera tracé (cette largeur -n'est pas déduite des caractéristiques fournies par la clé |tikz|). -\end{itemize} - - \medskip Ce système permet en particulier de définir des commandes pour tracer des filets -avec une couleur spécifique (et ces filets respecteront les blocs comme les -autres filets de \pkg{nicematrix}). +avec une couleur spécifique (et ces filets respecteront les blocs et les coinn +comme les autres filets de \pkg{nicematrix}). \medskip \begin{Verbatim} @@ -1331,31 +1247,40 @@ Produit C & 5 & 4 & 1 \\ \end{center} +\item \colorbox{yellow!50}{\textbf{Nouveau 6.6}}\enskip \emph{Deuxième + possibilité} + +On peut utiliser la clé |tikz| (si Tikz est chargé, \pkg{nicematrix} ne +chargeant par défaut que \textsc{pgf}). Dans ce cas-là, le filet est tracé +directement avec Tikz en utilisant comme paramètres la valeur de la clé |tikz| +qui doit être une liste de couples \textsl{clé=valeur} applicables à un chemin +Tikz. + +Par défaut aucune réservation de place n'est faite par défaut pour le filet qui +sera tracé avec Tikz. On peut demander une réservation (horizontale pour un +filet vertical et verticale pour un filet horizontal) avec la clé |width| qui +est donc en quelque sorte la largeur du filet qui sera tracé (cette largeur +n'est pas déduite des caractéristiques fournies par la clé |tikz|). + \bigskip -Voici un exemple avec la clé |tikz|. +Voici ce que l'on obtient avec la clé |dotted| de Tikz. \begin{Verbatim} -\documentclass{article} -\usepackage{nicematrix,tikz} -\usetikzlibrary{decorations.pathmorphing} - \NiceMatrixOptions { custom-line = { letter = I , - ~emphase#tikz = { decorate, decoration = { coil, aspect = 0 } }}@ , - ~emphase#width = 2 mm@ + ~emphase#tikz = dotted @ , + ~emphase#width = \pgflinewidth@ } } -\begin{document} \begin{NiceTabular}{cIcIc} un & deux & trois \\ quatre & cinq & six \\ sept & huit & neuf \end{NiceTabular} -\end{document} \end{Verbatim} \begin{center} @@ -1364,8 +1289,8 @@ sept & huit & neuf custom-line = { letter = I , - tikz = { decorate, decoration = { coil, aspect = 0 } } , - width = 2 mm + tikz = dotted , + width = \pgflinewidth } } \begin{NiceTabular}{cIcIc} @@ -1375,6 +1300,80 @@ sept & huit & neuf \end{NiceTabular} \end{center} +\medskip +\item \emph{Troisième possibilité} : la clé |dotted|\par\nobreak +\label{dotted} + +Comme on le voit dans l'exemple précédent, les pointillés tracés par la clé +|dotted| de Tikz ne sont pas ronds. C'est pourquoi l'extension \pkg{nicematrix} +propose dans la clé |custom-line| une clé |dotted| qui va tracer des pointillés +ronds. La valeur de la clé |width| est, dans ce cas-là, déjà réglée sur le +diamètre des points. Ces pointillés ronds sont aussi utilisés par +\pkg{nicematrix} pour des lignes en pointillées continues créées entre deux +composantes de la matrice par |\Cdots|, |\Vdots|, etc (voir p.~\pageref{Cdots}). + +\medskip +L'extension \pkg{nicematrix} prédéfinit en fait la commande |\hdottedline| et la +lettre «|:|» pour ces filets en pointillés.\footnote{Néanmoins, l'utilisateur peut écraser ces définitions de |\hdottedline| et de +«|:|» avec |custom-line| s'il le souhaite (par exemple pour les remplacer par des +lignes en tiretés).} + +\smallskip +\begin{BVerbatim} +% ~textsl#présent dans nicematrix.sty@ +\NiceMatrixOptions + { + custom-line = + { + letter = : , + command = hdottedline , + dotted + } + } +\end{BVerbatim} + +\bigskip +Dans les environnements de \pkg{nicematrix}, il est donc possible d'utiliser la +commande |\hdottedline| pour tracer des filets horizontaux en pointillés. + +\medskip +\begin{BVerbatim}[baseline=c,boxwidth=9.5cm] +\begin{pNiceMatrix} +1 & 2 & 3 & 4 & 5 \\ +~emphase#\hdottedline@ +6 & 7 & 8 & 9 & 10 \\ +11 & 12 & 13 & 14 & 15 +\end{pNiceMatrix} +\end{BVerbatim} +$\begin{pNiceMatrix} +1 & 2 & 3 & 4 & 5 \\ +\hdottedline +6 & 7 & 8 & 9 & 10 \\ +11 & 12 & 13 & 14 & 15 +\end{pNiceMatrix}$ + + +\medskip +Dans les environnements avec un préambule explicite (comme |{NiceTabular}|, +|{NiceArray}|, etc.), il est possible de dessiner un trait vertical en +pointillés avec le spécificateur «|:|». + +\medskip +\begin{BVerbatim}[baseline=c,boxwidth=9.5cm] +\begin{pNiceArray}{cccc~emphase#:@c} +1 & 2 & 3 & 4 & 5 \\ +6 & 7 & 8 & 9 & 10 \\ +11 & 12 & 13 & 14 & 15 +\end{pNiceArray} +\end{BVerbatim} +$\begin{pNiceArray}{cccc:c} +1 & 2 & 3 & 4 & 5 \\ +6 & 7 & 8 & 9 & 10 \\ +11 & 12 & 13 & 14 & 15 +\end{pNiceArray}$ +\end{itemize} + + \section{Les couleurs des rangées et des colonnes} @@ -2117,9 +2116,7 @@ $\begin{array}{c} \label{varwidth} -\colorbox{yellow!50}{\textbf{Nouveau 6.3}} -\smallskip Rappelons d'abord le fonctionnement d'un environnement |{varwidth}| de l'extension éponyme \pkg{varwidth}. Un tel environnement est similaire à l'environnement classique |{minipage}| mais la largeur indiquée (en argument) @@ -3211,8 +3208,6 @@ a_{31} & a_{32} & a_{33} \subsection{Les commandes \textbackslash OverBrace et \textbackslash UnderBrace dans le \textbackslash CodeAfter} -\colorbox{yellow!50}{\textbf{Nouveau 6.4}} - Les commandes |\OverBrace| and |\UnderBrace| permettent de placer des accolades horizontales sur une partie du tableau. Ces commandes prennent trois arguments : \begin{itemize} @@ -3392,6 +3387,12 @@ des notes avant les notes numérotées. \pkg{nicematrix}), la clé |notes/bottomrule| permet de faire tracer un |\bottomrule| de \pkg{booktabs} \emph{après} les notes. +\item \colorbox{yellow!50}{\textbf{Nouveau 6.8}}\enskip Lorsque plusieurs +commandes |\tabularnote| sont utilisées avec le même argument, une seule note +est insérée en fin de tableau (mais tous les labels sont marqués). Il est +possible de désactiver cette fonctionnalité avec la clé +|notes/detect-duplicates| + \item Il est possible de référencer une note de tableau (avec la commande |\label| placée après le |\tabularnote|). \end{itemize} @@ -3406,8 +3407,7 @@ remarques illustrées. Cette table a été composée avec le code suivant. \setlength{\belowcaptionskip}{1ex} \centering \caption{Utilisation de \texttt{\textbackslash - tabularnote}~emphase#\tabularnote{On peut! - ~emphase# mettre une note dans le titre.}!} + tabularnote}~emphase#\tabularnote{On peut mettre une note dans le titre.}!} \label{t:tabularnote} \begin{NiceTabular}{@{}llc@{}}% [~emphase#notes/bottomrule!, tabularnote = Un peu de texte avant les notes.] @@ -3417,9 +3417,9 @@ Nom & Prénom & Durée de vie \\ Barrère & Bertrand & 86\\ Nightingale~emphase#\tabularnote{Souvent considérée comme la première! ~emphase#infirmière.}\tabularnote{Surnommée «la Dame à la Lampe».}! -& Florence & 90 \\ +& Florence~emphase#\tabularnote{Cette note est commune à deux appels de notes.}! & 90 \\ Schœlcher & Victor & 89~emphase#\tabularnote{L'appel de note déborde à droite.}!\\ -Touchet & Marie & 89 \\ +Touchet & Marie~emphase#\tabularnote{Cette note est commune à deux appels de notes.}! & 89 \\ Wallis & John & 87 \\ \bottomrule \end{NiceTabular} @@ -3441,9 +3441,9 @@ Nom & Prénom & Durée de vie \\ Barrère & Bertrand & 86\\ Nightingale\tabularnote{Souvent considérée comme la première infirmière.}\tabularnote{Surnommée «la Dame à la Lampe».} -& Florence & 90 \\ +& Florence\tabularnote{Cette note est commune à deux appels de notes.} & 90 \\ Schœlcher & Victor & 89\tabularnote{L'appel de note déborde à droite.}\\ -Touchet & Marie & 89 \\ +Touchet & Marie\tabularnote{Cette note est commune à deux appels de notes.} & 89 \\ Wallis & John & 87 \\ \bottomrule \end{NiceTabular} @@ -3603,13 +3603,10 @@ Si on souhaite, par exemple, que les notes soient composées en gris et en On peut aussi mettre dans cette clé |\raggedright| ou |\RaggedRight| (cette dernière est une commande de \pkg{ragged2e}). -\item \colorbox{yellow!50}{\textbf{Nouveau 6.8}}\enskip À partir de la version -6.8, les doublons dans les notes de tableau sont détectés par défaut: lorsque -plusieurs commandes |\tabularnote| sont utilisées avec le même argument, une -seule note est insérée en fin de tableau (mais tous les labels sont marqués). Il -est possible de désactiver cette fonctionnalité avec la clé -|notes/detect-duplicates| (sa valeur initiale est |true|). +\item La clé |notes/detect-duplicates| active la détection des +commandes |\tabularnote| avec le même argument. +Valeur initiale : |true| \end{itemize} @@ -4085,10 +4082,9 @@ a & a & a \end{pNiceMatrix}\] -\colorbox{yellow!50}{\textbf{Nouveau 6.3}}\enskip Les nœuds de la dernière -colonne (hors éventuelle «colonne extérieure» spécifiée par |last-col|) peuvent -aussi être désignés par $i$-|last|. De même, les nœuds de la dernière ligne -peuvent être désignés par |last|-$j$. +Les nœuds de la dernière colonne (hors éventuelle «colonne extérieure» spécifiée +par |last-col|) peuvent aussi être désignés par $i$-|last|. De même, les nœuds +de la dernière ligne peuvent être désignés par |last|-$j$. \medskip \subsubsection{Les colonnes V de varwidth} diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index 74e7b7c98f..c95554cfac 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{6.8} -\def\myfiledate{2022/03/11} +\def\myfileversion{6.8a} +\def\myfiledate{2022/05/08} % % %<*batchfile> @@ -101,6 +101,8 @@ version 2005/12/01 or later. \makeatother + + \begin{document} \DocInput{nicematrix.dtx} \end{document} @@ -1181,59 +1183,7 @@ version 2005/12/01 or later. % It's possible to use the command |\diagbox| in a |\Block|. % % -% \subsection{Dotted rules} -% -% \label{dotted} -% -% In the environments of the package \pkg{nicematrix}, it's possible to use -% the command |\hdottedline| (provided by \pkg{nicematrix}) which is a -% counterpart of the classical command |\hline|. -% -% \medskip -% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm] -% \begin{pNiceMatrix} -% 1 & 2 & 3 & 4 & 5 \\ -% ~emphase#\hdottedline@ -% 6 & 7 & 8 & 9 & 10 \\ -% 11 & 12 & 13 & 14 & 15 -% \end{pNiceMatrix} -% \end{BVerbatim} -% $\begin{pNiceMatrix} -% 1 & 2 & 3 & 4 & 5 \\ -% \hdottedline -% 6 & 7 & 8 & 9 & 10 \\ -% 11 & 12 & 13 & 14 & 15 -% \end{pNiceMatrix}$ -% -% -% \bigskip -% In the environments with an explicit preamble (like |{NiceTabular}|, -% |{NiceArray}|, etc.), it's possible to draw a vertical dotted line with the -% specifier ``|:|''. -% -% \medskip -% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm] -% \left(\begin{NiceArray}{cccc~emphase#:@c} -% 1 & 2 & 3 & 4 & 5 \\ -% 6 & 7 & 8 & 9 & 10 \\ -% 11 & 12 & 13 & 14 & 15 -% \end{NiceArray}\right) -% \end{BVerbatim} -% $\left(\begin{NiceArray}{cccc:c} -% 1 & 2 & 3 & 4 & 5 \\ -% 6 & 7 & 8 & 9 & 10 \\ -% 11 & 12 & 13 & 14 & 15 -% \end{NiceArray}\right)$ -% % -% \bigskip -% \emph{Remark}: In the package \pkg{array} (on which the package -% \pkg{nicematrix} relies), horizontal and vertical rules make the array larger -% or wider by a quantity equal to the width of the rule\footnote{In fact, with -% \pkg{array}, this is true only for |\hline| and ``"|"'' but not for |\cline|: -% cf p.~\pageref{remark-cline}}. In \pkg{nicematrix}, the dotted lines drawn by -% |\hdottedline| and ``|:|'' do likewise. -% % % \subsection{Commands for customized rules} % \label{custom-line} @@ -1274,36 +1224,12 @@ version 2005/12/01 or later. % \item the key |sep-color| sets the color between two successive rules (should be % used only in conjonction with |multiplicity|). % \end{itemize} -% -% \bigskip -% \item \emph{Second possibility}\par\nobreak -% -% The key |dotted| forces a style with dotted rules such as those created by -% |\hdottedline| or the letter ``|:|'' in the preamble (cf. -% p.~\pageref{dotted}). The key |color| may be used also in that case. % -% \bigskip -% \item \colorbox{yellow!50}{\textbf{New 6.6}}\enskip \emph{Third -% possibility}\par\nobreak -% -% It's possible to use the key |tikz| (if Tikz is loaded). In that case, the -% rule is drawn directly with Tikz by using as parameters the value of the key -% |tikz| which must be a list of \textsl{key=value} pairs which may be applied -% to a Tikz path. -% -% By default, no space is reserved for the rule that will be drawn with Tikz. It -% possible to specify a reservation (horizontal for a vertical rule and vertical -% for an horizontal one) with the key |width|. That value of that key, is, in -% some ways, the width of the rule that will be drawn (\pkg{nicematrix} does not -% compute that width from the characteristics of the rule specified in |tikz|). -% \end{itemize} -% -% \bigskip +% \medskip % That system may be used, in particular, for the definition of commands and % letters to draw rules with a specific color (and those rules will respect the -% blocks as do all rules of \pkg{nicematrix}). -% -% +% blocks and corners as do all the rules of \pkg{nicematrix}). +% % \medskip % \begin{Verbatim} % \begin{NiceTabular}{lcIcIc}~emphase#[custom-line = {letter=I, color=blue}]@ @@ -1318,6 +1244,23 @@ version 2005/12/01 or later. % \end{NiceTabular} % \end{Verbatim} % +% +% \bigskip +% \item \colorbox{yellow!50}{\textbf{New 6.6}}\enskip \emph{Second +% possibility}\par\nobreak +% +% It's possible to use the key |tikz| (if Tikz is loaded). In that case, the +% rule is drawn directly with Tikz by using as parameters the value of the key +% |tikz| which must be a list of \textsl{key=value} pairs which may be applied +% to a Tikz path. +% +% By default, no space is reserved for the rule that will be drawn with Tikz. It +% is possible to specify a reservation (horizontal for a vertical rule and +% vertical for an horizontal one) with the key |width|. That value of that key, +% is, in some ways, the width of the rule that will be drawn (\pkg{nicematrix} +% does not compute that width from the characteristics of the rule specified in +% |tikz|). +% % % \begin{center} % \begin{NiceTabular}{lcIcIc}[custom-line = {letter=I, color=blue}] @@ -1333,40 +1276,33 @@ version 2005/12/01 or later. % \end{center} % % \bigskip -% Here is an example of the key |tikz|. -% -% \begin{Verbatim} -% \documentclass{article} -% \usepackage{nicematrix,tikz} -% \usetikzlibrary{decorations.pathmorphing} +% Here is an example with the key |dotted| of Tikz. % +% \begin{BVerbatim}[boxwidth=9cm,baseline=c] % \NiceMatrixOptions % { % custom-line = % { % letter = I , -% ~emphase#tikz = { decorate, decoration = { coil, aspect = 0 } }}@ , -% ~emphase#width = 2 mm@ +% ~emphase#tikz = dotted@ , +% ~emphase#width = \pgflinewidth@ % } % } % -% \begin{document} % \begin{NiceTabular}{cIcIc} % one & two & three \\ % four & five & six \\ % seven & eight & nine % \end{NiceTabular} -% \end{document} -% \end{Verbatim} -% -% \begin{center} +% \end{BVerbatim} +% \begin{scope} % \NiceMatrixOptions % { % custom-line = % { % letter = I , -% tikz = { decorate, decoration = { coil, aspect = 0 } } , -% width = 2 mm +% tikz = dotted , +% width = \pgflinewidth % } % } % \begin{NiceTabular}{cIcIc} @@ -1374,9 +1310,81 @@ version 2005/12/01 or later. % four & five & six \\ % seven & eight & nine % \end{NiceTabular} -% \end{center} +% \end{scope} +% +% \bigskip +% \item \emph{Third possibility} : the key |dotted| +% \label{dotted} +% +% As one can see, the dots of a dotted line of Tikz have the shape of a square, +% and not a circle. That's why the extension \pkg{nicematrix} provides in the +% key |custom-line| a key |dotted| which will draw rounded dots. The value of +% the key |width| is, in this case, preset to the diameter of the dots. Those +% dotted rules are also used by \pkg{nicematrix} to draw continuous dotted rules +% between cells of the matrix with |\Cdots|, |\Vdots|, etc. (cf. p.~\pageref{Cdots}). +% +% In fact, \pkg{nicematrix} defines by default the command |\hdottedline| and the +% letter ``|:|'' for those dotted rules.\footnote{However, it's possible to +% overwrite those definitions with a |custom-line| (in order, for example, to +% switch to dashed lines).} +% +%\smallskip +%\begin{BVerbatim} +% +% \NiceMatrixOptions % ~textsl#présent dans nicematrix.sty@ +% { +% custom-line = +% { +% letter = : , +% command = hdottedline , +% ~emphase#dotted@ +% } +% } +% \end{BVerbatim} +% +% Thus, it's possible to use the command |\hdottedline| to draw a horizontal +% dotted rule. +% +% \medskip +% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm] +% \begin{pNiceMatrix} +% 1 & 2 & 3 & 4 & 5 \\ +% ~emphase#\hdottedline@ +% 6 & 7 & 8 & 9 & 10 \\ +% 11 & 12 & 13 & 14 & 15 +% \end{pNiceMatrix} +% \end{BVerbatim} +% $\begin{pNiceMatrix} +% 1 & 2 & 3 & 4 & 5 \\ +% \hdottedline +% 6 & 7 & 8 & 9 & 10 \\ +% 11 & 12 & 13 & 14 & 15 +% \end{pNiceMatrix}$ % % +% \bigskip +% In the environments with an explicit preamble (like |{NiceTabular}|, +% |{NiceArray}|, etc.), it's possible to draw a vertical dotted line with the +% specifier ``|:|''. +% +% \medskip +% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm] +% \left(\begin{NiceArray}{cccc~emphase#:@c} +% 1 & 2 & 3 & 4 & 5 \\ +% 6 & 7 & 8 & 9 & 10 \\ +% 11 & 12 & 13 & 14 & 15 +% \end{NiceArray}\right) +% \end{BVerbatim} +% $\left(\begin{NiceArray}{cccc:c} +% 1 & 2 & 3 & 4 & 5 \\ +% 6 & 7 & 8 & 9 & 10 \\ +% 11 & 12 & 13 & 14 & 15 +% \end{NiceArray}\right)$ +% +% \end{itemize} +% +% +% %\section{The color of the rows and columns} % % \subsection{Use of colortbl} @@ -2092,9 +2100,6 @@ version 2005/12/01 or later. % % \label{varwidth} % -% \colorbox{yellow!50}{\textbf{New 6.3}} -% -% \smallskip % Let's recall first the behaviour of the environment |{varwidth}| of the % eponymous package \pkg{varwidth}. That environment is similar to the classical % environment |{minipage}| but the width provided in the argument is only the @@ -3168,8 +3173,6 @@ version 2005/12/01 or later. % \subsection{The commands \textbackslash OverBrace and \textbackslash % UnderBrace in the \textbackslash CodeAfter} % -% \colorbox{yellow!50}{\textbf{New 6.4}} -% % The commands |\OverBrace| and |\UnderBrace| provide a way to put % horizontal braces on a part of the array. These commands take in three % arguments: @@ -3347,6 +3350,12 @@ version 2005/12/01 or later. % the environment of \pkg{nicematrix}. Thus, it's possible to use it on the % title inserted by |\caption| in an environment |{table}| of LaTeX. % +% \colorbox{yellow!50}{\textbf{New 6.8}}\enskip If several commands +% |\tabularnote| are used in a tabular with the same argument, only one note is +% inserted at the end of the tabular (but all the labels are composed, of +% course). It's possible to control that feature with the key +% |notes/detect-duplicates|. +% % \item It's possible to create a reference to a tabular note created by |\tabularnote| % (with the usual command |\label| used after the |\tabularnote|). % \end{itemize} @@ -3370,11 +3379,11 @@ version 2005/12/01 or later. % Last name & First name & Length of life \\ % \midrule % Churchill & Wiston & 91\\ -% Nightingale~emphase#\tabularnote{Considered as the first nurse of! -% ~emphase#history.}\tabularnote{Nicknamed ``the Lady with the Lamp''.}! -% & Florence & 90 \\ +% Nightingale~emphase#\tabularnote{Considered as the first nurse of history}! +% ~emphase#\tabularnote{Nicknamed ``the Lady with the Lamp''.}! +% & Florence~emphase#\tabularnote{This note is shared by two references.}! & 90 \\ % Schoelcher & Victor & 89~emphase#\tabularnote{The label of the note is overlapping.}!\\ -% Touchet & Marie & 89 \\ +% Touchet & Marie~emphase#\tabularnote{This note is shared by two references.}! & 89 \\ % Wallis & John & 87 \\ % \bottomrule % \end{NiceTabular} @@ -3397,9 +3406,9 @@ version 2005/12/01 or later. % Churchill & Wiston & 91\\ % Nightingale\tabularnote{Considered as the first nurse of % history.}\tabularnote{Nicknamed ``the Lady with the Lamp''.} -% & Florence & 90 \\ +% & Florence\tabularnote{This note is shared by two references.} & 90 \\ % Schoelcher & Victor & 89\tabularnote{The label of the note is overlapping.}\\ -% Touchet & Marie & 89 \\ +% Touchet & Marie\tabularnote{This note is shared by two references.} & 89 \\ % Wallis & John & 87 \\ % \bottomrule % \end{NiceTabular} @@ -3549,12 +3558,10 @@ version 2005/12/01 or later. % It's also possible to add |\raggedright| or |\RaggedRight| in that key (|\RaggedRight| % is a command of \pkg{ragged2e}). % -% \item \colorbox{yellow!50}{\textbf{New 6.8}}\enskip Since the version 6.8, the -% duplicates in the notes of a tabular are detected by default: if several -% commands |\tabularnote| are used in a tabular with the same argument, only one -% note is inserted at the end of the tabular (but all the labels are composed, -% of course). It's possible to de-activate that feature with the key -% |notes/detect-duplicates| (whose initial value is |true|). +% \item The key |notes/detect-duplicates| activates the detection of the commands +% |\tabularnotes| with the same argument. +% +% Initial value : |true| % \end{itemize} % % @@ -11061,12 +11068,16 @@ version 2005/12/01 or later. % by LaTeX for incorrect nested environments). % \begin{macrocode} { - \peek_meaning_ignore_spaces:NTF \end \@@_analyze_end:Nn + \peek_remove_spaces:n + { + \peek_meaning:NTF \end + \@@_analyze_end:Nn % \end{macrocode} % Here is the call to |\array| (we have a dedicated macro |\@@_array:| because % of compatibility with the classes \cls{revtex4-1} and \cls{revtex4-2}). % \begin{macrocode} - { \exp_args:NV \@@_array: \g_@@_preamble_tl } + { \exp_args:NV \@@_array: \g_@@_preamble_tl } + } } { \@@_create_col_nodes: @@ -13926,6 +13937,7 @@ version 2005/12/01 or later. % \begin{macrocode} \NewDocumentCommand \@@_RowStyle:n { O { } m } { + \tl_clear:N \l_tmpa_tl \keys_set:nn { NiceMatrix / RowStyle } { #1 } % \end{macrocode} % If the key |rowcolor| has been used. @@ -15321,9 +15333,12 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_set:Npn \@@_Hline_i:n #1 { - \peek_meaning_ignore_spaces:NTF \Hline - { \@@_Hline_ii:nn { #1 + 1 } } - { \@@_Hline_iii:n { #1 } } + \peek_remove_spaces:n + { + \peek_meaning:NTF \Hline + { \@@_Hline_ii:nn { #1 + 1 } } + { \@@_Hline_iii:n { #1 } } + } } % \end{macrocode} % diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf index 3629b4506a..b09ef2e986 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix.pdf and b/macros/latex/contrib/nicematrix/nicematrix.pdf differ diff --git a/macros/latex/contrib/simplebnf/simplebnf-doc.pdf b/macros/latex/contrib/simplebnf/simplebnf-doc.pdf index 1285776fe6..fb80c407fb 100644 Binary files a/macros/latex/contrib/simplebnf/simplebnf-doc.pdf and b/macros/latex/contrib/simplebnf/simplebnf-doc.pdf differ diff --git a/macros/latex/contrib/simplebnf/simplebnf-doc.tex b/macros/latex/contrib/simplebnf/simplebnf-doc.tex index 62d6cba868..30ea889f18 100644 --- a/macros/latex/contrib/simplebnf/simplebnf-doc.tex +++ b/macros/latex/contrib/simplebnf/simplebnf-doc.tex @@ -8,7 +8,7 @@ \tcbset{listing engine=listings,colframe=black,colback=white,size=small} \NewDocumentEnvironment {exampleside} {} - { \tcblisting{listing side text,righthand width=.5\textwidth} } + { \tcblisting{listing side text,righthand width=.55\textwidth} } { \endtcblisting } \NewDocumentCommand \cmd { m } {\texttt{\textbackslash#1}} @@ -32,10 +32,10 @@ \title{% \textsf{simplebnf} --- A simple package to format Backus-Naur form% - \footnote{This file describes v0.2.0.}} + \footnote{This file describes v0.3.0.}} \author{Jay Lee\footnote{E-mail: % \href{mailto:jaeho.lee@snu.ac.kr}{\texttt{jaeho.lee@snu.ac.kr}}}} -\date{2020/09/01} +\date{2022/05/07} \begin{document} \maketitle @@ -64,6 +64,8 @@ where each of the \textit{rhs} represents alternative syntactic forms of the \te A sample code and the result is shown below: \begin{exampleside} \begin{bnfgrammar} + a \in \textit{Vars} + ;; expr ::= expr + term : sum | term : term @@ -73,4 +75,58 @@ A sample code and the result is shown below: | a : variable \end{bnfgrammar} \end{exampleside} -\end{document} \ No newline at end of file + +Annotations can also be provided on left-hand sides, to label the nonterminal instead of a specific production. +\begin{exampleside} + \begin{bnfgrammar} + a : Variables \in \textit{Vars} + ;; + expr : Expressions ::= + expr + term + | term + ;; + term ::= + term * a + | a + \end{bnfgrammar} +\end{exampleside} + +You can also provide an optional specification to the grammar environment, to redefine alignment or spacing. +\begin{tcblisting}{text above listing} + \begin{bnfgrammar}[lr@{\hspace{4pt}}c@{\hspace{2pt}}ll] + a : Variables \in \textit{Vars} + ;; + expr ::= + expr + term : sum + | term : term + ;; + term ::= + term * a : product + | a : variable + \end{bnfgrammar} +\end{tcblisting} + +If you want to typeset multiple productions on a single line, you can use double vertical bars by default. +\begin{exampleside} + \begin{bnfgrammar} + a \in \textit{Vars} + ;; + expr ::= expr + term || term + ;; + term ::= term * a || a + \end{bnfgrammar} +\end{exampleside} + +The second and third optional arguments specify regular expressions for the line-breaking and non-breaking RHS seperators: +\begin{tcblisting}{text above listing} + \begin{bnfgrammar}[llcll][\|\|][\|] + a \in \textit{Vars} + ;; + expr ::= expr + term | term + ;; + term ::= term * a + || a + \end{bnfgrammar} +\end{tcblisting} + +\end{document} diff --git a/macros/latex/contrib/simplebnf/simplebnf.sty b/macros/latex/contrib/simplebnf/simplebnf.sty index a8ae523036..fd7b707ff7 100644 --- a/macros/latex/contrib/simplebnf/simplebnf.sty +++ b/macros/latex/contrib/simplebnf/simplebnf.sty @@ -13,11 +13,13 @@ \RequirePackage{mathtools} \ProvidesExplPackage {simplebnf} - {2020/09/01} - {0.2.0} + {2022/05/07} + {0.3.0} {A simple package to format Backus–Naur form} -\cs_generate_variant:Nn \seq_set_split:Nnn {NVn} +\cs_generate_variant:Nn \regex_split:nnNTF {nVNTF} +\cs_generate_variant:Nn \regex_split:NnN {NVN} + \tl_new:N \g__simplebnf_defeq_tl \tl_gset:Nn \g__simplebnf_defeq_tl { \ensuremath{\Coloneqq} } @@ -32,6 +34,9 @@ \seq_new:N \l__keypairs_seq \bool_new:N \l__first_rhs +\regex_new:N \g_simplebnf_rhs_newline_r +\regex_new:N \g_simplebnf_rhs_nb_r + %% Typeset a single rhs of a production. %% \l__first_rhs = true => `::=' already typeset %% \l__first_rhs = false => move to a newline and typeset `|' @@ -43,15 +48,18 @@ \bool_set_false:N \l__first_rhs } { - \tl_put_right:Nn \l__table_tl { \\ & \g__simplebnf_defor_tl & } + \tl_put_right:Nn \l__table_tl { \\ && \g__simplebnf_defor_tl & } } - \regex_split:nnNTF { : } { #1 } \l_tmpa_seq + \tl_set:Nn \l_tmpa_tl { #1 } + \regex_replace_once:nnN { ^\s+ } {} \l_tmpa_tl + \regex_replace_once:nnN { \s+$ } {} \l_tmpa_tl + \regex_split:nVNTF { : } \l_tmpa_tl \l_tmpa_seq { \seq_pop_left:NNT \l_tmpa_seq \l_tmpa_tl { - \tl_set:Nx \l_tmpa_tl { \bnfexpr { \l_tmpa_tl } } - \tl_put_right:NV \l__table_tl \l_tmpa_tl + \regex_replace_all:NnN \g_simplebnf_rhs_nb_r { \c{g__simplebnf_defor_tl} } \l_tmpa_tl + \tl_put_right:Nx \l__table_tl { \bnfexpr { \l_tmpa_tl } } } \tl_put_right:Nn \l__table_tl { & } @@ -63,34 +71,67 @@ } } { - \tl_put_right:Nn \l__table_tl { \bnfexpr { #1 } &} + \regex_replace_all:NnN \g_simplebnf_rhs_nb_r { \c{g__simplebnf_defor_tl} } \l_tmpa_tl + + \tl_put_right:Nx \l__table_tl { \bnfexpr { \l_tmpa_tl } } + \tl_put_right:Nn \l__table_tl { & } + } +} + +%% Typeset a single lhs of a production. +%% #1 - lhs : either term or (term : annotation) +\cs_new:Nn \simplebnf_typeset_lhs:n +{ + \tl_set:Nx \l_tmpa_tl { #1 } + \regex_replace_once:nnN { ^\s+ } {} \l_tmpa_tl + \regex_replace_once:nnN { \s+$ } {} \l_tmpa_tl + + \regex_split:nVNTF { : } \l_tmpa_tl \l_tmpa_seq + { + \seq_pop_right:NN \l_tmpa_seq \l_tmpa_tl + \tl_put_right:Nx \l__table_tl + { + \bnfannot{\l_tmpa_tl} + } + \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl + \tl_put_right:Nx \l__table_tl + { + & \bnfexpr { \l_tmpa_tl } + } + } + { + \tl_put_right:Nx \l__table_tl + { + & \bnfexpr { \l_tmpa_tl } + } } } \NewDocumentCommand \bnfexpr { m } { \texttt { #1 } } \NewDocumentCommand \bnfannot { m } { \textit{ #1 } } -\NewDocumentEnvironment { bnfgrammar } { +b } +%% Typeset a BNF grammar. +%% #1 - tabular specification (llcll) +%% #2 - regexp for newline separator for rhses +%% #2 - regexp for non-breaking separator for rhses +%% #3 - grammar +\NewDocumentEnvironment { bnfgrammar } { O{llcll} O{[^\|]\|[^\|]} O{\|\|} +b } { + \regex_gset:Nn \g_simplebnf_rhs_newline_r { #2 } + \regex_gset:Nn \g_simplebnf_rhs_nb_r { #3 } + %% \l__input_seq is a list of term definitions. - \regex_split:nnN { ;; } { #1 } \l__input_seq + \regex_split:nnN { ;; } { #4 } \l__input_seq \begin{center} \tl_set:Nn \l__table_tl { - \begin{tabular}{lcll} + \begin{tabular}{#1} } + \bool_set_true:N \l_tmp_first_term % Is this the first term in this grammar? \seq_map_inline:Nn \l__input_seq { - %% \l__term_seq - (term, rhses)... - %% \l__term_tl - term - %% \l__keypairs_tl - rhses - \regex_split:nnN { ::= } { ##1 } \l__term_seq - \seq_pop_left:NN \l__term_seq \l__term_tl - \seq_pop_left:NN \l__term_seq \l__keypairs_tl - - \regex_replace_once:nnN { ^\s+ } {} \l__term_tl - + %% If not-first, add newline \bool_if:NTF \l_tmp_first_term { \bool_set_false:N \l_tmp_first_term @@ -98,15 +139,48 @@ { \tl_put_right:Nn \l__table_tl { \\ } } - \tl_put_right:Nx \l__table_tl + + \regex_split:nnNTF { ::= } { ##1 } \l__term_seq + % Parse a ::= definition { - \bnfexpr { \l__term_tl } & \g__simplebnf_defeq_tl & + %% \l__term_seq - (lhs, rhses)... + %% \l__term_tl - lhs + %% \l__keypairs_tl - rhses + \seq_pop_left:NN \l__term_seq \l__term_tl + \seq_pop_left:NN \l__term_seq \l__keypairs_tl + + \simplebnf_typeset_lhs:n{\l__term_tl} + \tl_put_right:Nx \l__table_tl + { + & \g__simplebnf_defeq_tl & + } + %% \l__keypairs_seq - (rhs:annot | rhs)... + \regex_split:NVN \g_simplebnf_rhs_newline_r \l__keypairs_tl \l__keypairs_seq + + \bool_set_true:N \l__first_rhs + \seq_map_function:NN \l__keypairs_seq \simplebnf_typeset_rhs:n } - %% \l__keypairs_seq - (rhs:annot | rhs)... - \seq_set_split:NnV \l__keypairs_seq { | } \l__keypairs_tl + { + % Else, parse a \in declaration + \regex_split:nnNTF { \c{in} } { ##1 } \l__term_seq + { + %% \l__term_seq - (lhs, rhs) + \seq_pop_left:NN \l__term_seq \l_tmpa_tl - \bool_set_true:N \l__first_rhs - \seq_map_function:NN \l__keypairs_seq \simplebnf_typeset_rhs:n + \simplebnf_typeset_lhs:n{\l_tmpa_tl} + \tl_put_right:Nn \l__table_tl + { + & $\in$ & $ + } + \seq_pop_left:NN \l__term_seq \l_tmpa_tl + \tl_put_right:NV \l__table_tl \l_tmpa_tl + \tl_put_right:Nn \l__table_tl + { + $ & + } + } + { \msg_error:nn {simplebnf} { Could not parser ##1 } } + } } \tl_put_right:Nn \l__table_tl { \end{tabular} } diff --git a/macros/xetex/latex/xduts/README.md b/macros/xetex/latex/xduts/README.md index 6d1c47efee..b8b0b431bd 100644 --- a/macros/xetex/latex/xduts/README.md +++ b/macros/xetex/latex/xduts/README.md @@ -1,6 +1,6 @@ # XDUTS -[![](https://img.shields.io/ctan/v/xduts)](https://www.ctan.org/pkg/xduts) [![](https://img.shields.io/github/license/note286/xduts)](https://github.com/note286/xduts/blob/main/LICENSE) [![](https://img.shields.io/github/stars/note286/xduts)](https://github.com/note286/xduts) [![](https://img.shields.io/github/issues/note286/xduts)](https://github.com/note286/xduts/issues?q=is%3Aopen+is%3Aissue) [![](https://img.shields.io/github/issues-closed/note286/xduts)](https://github.com/note286/xduts/issues?q=is%3Aissue+is%3Aclosed) [![](https://img.shields.io/github/commit-activity/m/note286/xduts)](https://github.com/note286/xduts/commits/main) [![](https://img.shields.io/github/v/tag/note286/xduts)](https://github.com/note286/xduts/tags) +[![](https://img.shields.io/ctan/v/xduts)](https://www.ctan.org/pkg/xduts) [![](https://img.shields.io/github/v/tag/note286/xduts)](https://github.com/note286/xduts/tags) [![](https://img.shields.io/github/license/note286/xduts)](https://github.com/note286/xduts/blob/main/LICENSE) [![](https://img.shields.io/github/stars/note286/xduts)](https://github.com/note286/xduts) [![](https://img.shields.io/github/discussions/note286/xduts)](https://github.com/note286/xduts/discussions) [![](https://img.shields.io/github/issues/note286/xduts)](https://github.com/note286/xduts/issues?q=is%3Aopen+is%3Aissue) [![](https://img.shields.io/github/issues-closed/note286/xduts)](https://github.com/note286/xduts/issues?q=is%3Aissue+is%3Aclosed) [![](https://img.shields.io/github/commit-activity/m/note286/xduts)](https://github.com/note286/xduts/commits/main) XDUTS (Xidian University TeX Suite) is a LaTeX3 document class and package suite for undergraduate/postgraduate students in Xidian University, which can be compiled with XeLaTeX on Windows, macOS, GNU/Linux, Overleaf, and TeXPage. It is designed to typesetting proposal/thesis and other documents. @@ -65,7 +65,7 @@ xelatex xduts.dtx ## Note -`xidian-text.pdf` and `xidian-logo.pdf` should be placed in the same directory as `xduugthesis.cls`. +`xdulogo.pdf` should be placed in the same directory as `xduugthesis.cls`. ## License diff --git a/macros/xetex/latex/xduts/xdulogo.pdf b/macros/xetex/latex/xduts/xdulogo.pdf new file mode 100644 index 0000000000..6302258794 Binary files /dev/null and b/macros/xetex/latex/xduts/xdulogo.pdf differ diff --git a/macros/xetex/latex/xduts/xduts.dtx b/macros/xetex/latex/xduts/xduts.dtx index e17a05a32e..8ec2d39d83 100644 --- a/macros/xetex/latex/xduts/xduts.dtx +++ b/macros/xetex/latex/xduts/xduts.dtx @@ -1,19 +1,24 @@ % \iffalse %<*driver> \ProvidesFile{xduts.dtx} -[2022/05/03 v1.8.1.0 Xidian University TeX Suite] +[2022/05/08 v1.13.2.0 Xidian University TeX Suite] % %\NeedsTeXFormat{LaTeX2e} %\RequirePackage{expl3} %\ProvidesExplPackage{xdufont} %\ProvidesExplClass{xdupgthesis} %\ProvidesExplClass{xduugthesis} -% {2022/05/03}{1.8.1.0} +% {2022/05/08}{1.13.2.0} % {Xidian University Font package} % {Xidian University Postgraduate Thesis document class} % {Xidian University Undergraduate Thesis document class} %<*driver> +\PassOptionsToPackage{AutoFakeBold=3}{xeCJK} \documentclass{ctxdoc} +\changes{v1.9.0.0}{2022/05/03}{支持中文选项默认值加粗} +\changes{v1.9.0.0}{2022/05/03}{增大function环境盒子宽度} +\addtolength{\marginparwidth}{5mm} +\geometry{hmargin={0mm,10mm}} \changes{v0.6.0.0}{2022/04/10}{新增xdufont宏包} \changes{v0.5.2.1}{2022/04/09}{修改项目名称} \changes{v0.4.2.1}{2022/04/05}{调整文档目录缩进} @@ -37,10 +42,15 @@ \usepackage{xurl} \usepackage{xspace} \xspaceaddexceptions{。?!,、;:“”‘’—….--~·《》<>_} -\usepackage{tabularx} \newcolumntype{Y}{>{\centering\arraybackslash}X} \usepackage{multirow} -\usepackage{makecell} +\usepackage{pifont} +\newcommand{\cmark}{\ding{51}} +\usepackage{tabularray} +\SetTblrStyle{caption-tag}{font=\bfseries} +\DefTblrTemplate{caption-sep}{default}{\quad} +\DefTblrTemplate{conthead-text}{default}{(续表)} +\DefTblrTemplate{contfoot-text}{default}{接下页} % 交叉引用 \newcommand{\secrefx}[1]{第\xspace\ref{#1}\xspace 节} \newcommand{\tabrefx}[1]{\tablename\xspace\ref{#1}\xspace} @@ -145,7 +155,7 @@ \end{document} % % \fi -% \CheckSum{1195} +% \CheckSum{1283} % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -320,7 +330,9 @@ % 包括\pkgx{subfig}宏包和\pkgx{subcaption}宏包。 % \subsection{表格} % 主要适配表格内容字号, -% 包括所有使用\envx{table}浮动体的表格和\pkgx{longtable}宏包提供的\envx{longtable}环境。 +% 包括所有使用\envx{table}浮动体的表格、 +% \pkgx{tabularray}宏包提供的\envx{tblr}、\envx{longtblr}环境 +% 和\pkgx{longtable}宏包提供的\envx{longtable}环境。 % \section{功能说明} % \label{功能说明} % 请根据\secrefx{使用说明}中相应文档类/宏包的说明来选择性地阅读本节内容。 @@ -414,9 +426,9 @@ % \end{syntax} % 设置中文字体伪斜体倾斜程度。默认为\valuex{0.2}。 % \end{function} -% \begin{function}[added=2022-03-06,updated=2022-04-13]{style/latin-font} +% \begin{function}[added=2022-03-06,updated=2022-05-06]{style/latin-font} % \begin{syntax} -% \optx{style/latin-font}=\metax{tacn|thcs|(gyre)|none} +% \optx{style/latin-font}=\metax{tac|tacn|thcs|(gyre)|none} % \end{syntax} % 设置英文字体,具体配置见\tabrefx{tab:latin-font}。 % \end{function} @@ -432,14 +444,16 @@ % \toprule % \strong{选项名称} & \strong{罗马字体族} & \strong{无衬线字体族} & \strong{打字机字体族} \\ % \midrule -% |tacn|\tnote{1} & Times New Roman & Arial & Courier New \\ -% |thcs|\tnote{2} & Times New Roman & Helvetica & Courier Std \\ +% |tac|\tnote{1} & Times New Roman & Arial & Consolas \\ +% |tacn|\tnote{2} & Times New Roman & Arial & Courier New \\ +% |thcs|\tnote{3} & Times New Roman & Helvetica & Courier Std \\ % |gyre| & TeX Gyre Termes & TeX Gyre Heros & TeX Gyre Cursor \\ % \bottomrule % \end{tabularx} % \begin{tablenotes} -% \item [1] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{arial.ttf}、\filex{arialbd.ttf}、\filex{ariali.ttf}、\filex{arialbi.ttf}、\filex{cour.ttf}、\filex{courbd.ttf}、\filex{couri.ttf}和\filex{courbi.ttf}。 -% \item [2] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{Helvetica.ttf}、\filex{Helvetica~Bold.ttf}、\filex{Helvetica~Oblique.ttf}、\filex{Helvetica~Bold~Oblique.ttf}、\filex{CourierStd.otf}、\filex{CourierStd-Bold.otf}、\filex{CourierStd-Oblique.otf}和\filex{CourierStd-BoldOblique.otf}。 +% \item [1] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{arial.ttf}、\filex{arialbd.ttf}、\filex{ariali.ttf}、\filex{arialbi.ttf}、\filex{consola.ttf}、\filex{consolab.ttf}、\filex{consolai.ttf}和\filex{consolaz.ttf}。 +% \item [2] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{arial.ttf}、\filex{arialbd.ttf}、\filex{ariali.ttf}、\filex{arialbi.ttf}、\filex{cour.ttf}、\filex{courbd.ttf}、\filex{couri.ttf}和\filex{courbi.ttf}。 +% \item [3] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{Helvetica.ttf}、\filex{Helvetica~Bold.ttf}、\filex{Helvetica~Oblique.ttf}、\filex{Helvetica~Bold~Oblique.ttf}、\filex{CourierStd.otf}、\filex{CourierStd-Bold.otf}、\filex{CourierStd-Oblique.otf}和\filex{CourierStd-BoldOblique.otf}。 % \end{tablenotes} % \end{threeparttable} % \end{table} @@ -569,6 +583,16 @@ % \item[true] 对称。 % \item[false] 不对称。 % \end{optdesc} +% \begin{function}[added=2022-05-08]{style/page-vertical-align} +% \begin{syntax} +% \optx{style/page-vertical-align}=\metax{分散对齐|(顶部对齐)} +% \end{syntax} +% 设置页面垂直方向的对齐方式。 +% \end{function} +% \begin{optdesc} +% \item[分散对齐] 页面高度均匀地填满,使每一页的底部直接对齐。 +% \item[顶部对齐] 页面中的内容保持它的自然高度,每一页的页面底部用空白填满。 +% \end{optdesc} % \subsection{交叉引用配置} % \label{交叉引用配置} % \begin{function}[added=2022-04-16]{style/ref-add-space} @@ -684,19 +708,99 @@ % \end{function} % \subsection{信息录入} % \label{信息录入} -% \begin{function}[added=2022-05-02]{info/graduate-type} +% \changes{v1.9.0.0}{2022/05/03}{增加信息录入选项分类表} +% \changes{v1.10.3.1}{2022/05/04}{移除专业博士校外导师信息录入} +% 用户根据\tabrefx{tblr:info}选择相应的选项进行信息录入。 +% \begin{tblr} +% [ +% long, +% caption = {信息录入选项分类}, +% label = {tblr:info} +% ] +% { +% width = \linewidth, +% colspec = lX[c]X[c]X[c]X[c]X[c]X[c], +% cell{1}{1} = {r = 2}{}, +% cell{1}{2} = {c = 2}{}, +% cell{1}{4} = {c = 2}{}, +% cell{1}{6} = {c = 2}{}, +% hline{1,Z} = {.08em}, +% hline{2} = {2-3}{.08em, leftpos = -1, rightpos = -1, endpos}, +% hline{2} = {4-5}{.08em, leftpos = -1, rightpos = -1, endpos}, +% hline{2} = {6-7}{.08em, leftpos = -1, rightpos = -1, endpos}, +% hline{3} = {.08em}, +% cell{odd[3-Z]}{1-Z} = {gray9}, +% cell{3-Z}{1} = {cmd = \texttt}, +% rowhead = 2 +% } +% & 本科 & & 硕士 & & 博士 & \\ +% & 校内 & 校外 & 学术 & 专业 & 学术 & 专业 \\ +% graduate-type & & & \cmark & \cmark & \cmark & \cmark \\ +% degree-type & & & \cmark & \cmark & \cmark & \cmark \\ +% degree & & & \cmark & \cmark & \cmark & \cmark \\ +% degree* & & & & \cmark & & \\ +% title & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ +% title* & & & \cmark & \cmark & \cmark & \cmark \\ +% department & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ +% major & \cmark & \cmark & \cmark & & \cmark & \\ +% major* & & & \cmark & & \cmark & \\ +% sub-major & & & \cmark & & \cmark & \\ +% domain & & & & \cmark & & \cmark \\ +% author & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ +% author* & & & \cmark & \cmark & \cmark & \cmark \\ +% supervisor & \cmark & & \cmark & \cmark & \cmark & \cmark \\ +% supervisor* & & & \cmark & \cmark & \cmark & \cmark \\ +% supervisor-department & \cmark & & & & & \\ +% supervisor-enterprise & & \cmark & & \cmark & & \\ +% supervisor-enterprise* & & & & \cmark & & \\ +% supervisor-school & & \cmark & & & & \\ +% supervisor-title & & & \cmark & \cmark & \cmark & \cmark \\ +% supervisor-title* & & & \cmark & \cmark & \cmark & \cmark \\ +% supervisor-enterprise-title & & & & \cmark & & \\ +% supervisor-enterprise-title* & & & & \cmark & & \\ +% class-id & \cmark & \cmark & & & & \\ +% student-id & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ +% clc & & & \cmark & \cmark & \cmark & \cmark \\ +% secret-level & & & \cmark & \cmark & \cmark & \cmark \\ +% submit-date & & & \cmark & \cmark & \cmark & \cmark \\ +% abstract & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ +% abstract* & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ +% keywords & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ +% keywords* & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ +% acknowledgements & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\ +% \end{tblr} +% \changes{v1.9.0.0}{2022/05/03}{增加研究生信息录入选项文档} +% \begin{function}[added=2022-05-02,updated=2022-05-03]{info/graduate-type} % \begin{syntax} -% \optx{info/graduate-type}=\metax{(master)|doctor} +% \optx{info/graduate-type}=\metax{(硕士)|博士} % \end{syntax} % 设置研究生类型。 % \end{function} % \begin{optdesc} -% \item[master] 硕士研究生。 -% \item[doctor] 博士研究生。 +% \item[硕士] 硕士研究生。 +% \item[博士] 博士研究生。 +% \end{optdesc} +% \begin{function}[added=2022-05-03]{info/degree-type} +% \begin{syntax} +% \optx{info/degree-type}=\metax{(学术)|专业} +% \end{syntax} +% 设置研究生学位类型。 +% \end{function} +% \begin{optdesc} +% \item[学术] 学术学位。 +% \item[专业] 专业学位。 % \end{optdesc} -% \begin{function}[added=2022-04-01]{info/title} +% \begin{function}[added=2022-05-03]{info/degree,info/degree*} % \begin{syntax} -% \optx{info/title}=\argx{论文标题} +% \optx{info/degree}=\argx{研究生学位类别中文名称} +% \optx{info/degree*}=\argx{研究生学位类别英文名称} +% \end{syntax} +% 设置研究生学位类别。 +% \end{function} +% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/title,info/title*} +% \begin{syntax} +% \optx{info/title}=\argx{论文中文标题} +% \optx{info/title*}=\argx{论文英文标题} % \end{syntax} % 设置论文标题。如果需要手动制定换行位点,请使用换行控制符(|\\|),最多两行。 % \end{function} @@ -706,41 +810,71 @@ % \end{syntax} % 设置院系名称。 % \end{function} -% \begin{function}[added=2022-04-01]{info/major} +% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/major,info/major*} +% \begin{syntax} +% \optx{info/major}=\argx{专业名称/一级学科名称} +% \optx{info/major*}=\argx{一级学科英文名称} +% \end{syntax} +% 设置专业名称/一级学科名称。 +% \end{function} +% \begin{function}[added=2022-05-03]{info/sub-major} % \begin{syntax} -% \optx{info/major}=\argx{专业名称} +% \optx{info/sub-major}=\argx{二级学科名称} % \end{syntax} -% 设置专业名称。 +% 设置二级学科名称。 % \end{function} -% \begin{function}[added=2022-04-01]{info/author} +% \begin{function}[added=2022-05-03]{info/domain} +% \begin{syntax} +% \optx{info/domain}=\argx{领域} +% \end{syntax} +% 设置领域名称。 +% \end{function} +% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/author,info/author*} % \begin{syntax} % \optx{info/author}=\argx{作者姓名} +% \optx{info/author*}=\argx{作者姓名拼音} % \end{syntax} % 设置作者姓名。 % \end{function} -% \begin{function}[added=2022-04-01]{info/supervisor} +% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/supervisor,info/supervisor*} % \begin{syntax} % \optx{info/supervisor}=\argx{导师姓名} +% \optx{info/supervisor*}=\argx{导师姓名拼音} % \end{syntax} -% 设置导师姓名。非校外毕业设计填写。 +% 设置导师姓名。 % \end{function} % \begin{function}[added=2022-04-01]{info/supervisor-department} % \begin{syntax} % \optx{info/supervisor-department}=\argx{院内导师姓名} % \end{syntax} -% 设置院内导师姓名。非校外毕业设计填写,如无院内导师,则无需填写。 +% 设置院内导师姓名。 % \end{function} -% \begin{function}[added=2022-04-01]{info/supervisor-enterprise} +% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/supervisor-enterprise,info/supervisor-enterprise*} % \begin{syntax} % \optx{info/supervisor-enterprise}=\argx{校外导师姓名} +% \optx{info/supervisor-enterprise*}=\argx{校外导师姓名拼音} % \end{syntax} -% 设置校外导师姓名。校外毕业设计填写。 +% 设置校外导师姓名。 % \end{function} % \begin{function}[added=2022-04-01]{info/supervisor-school} % \begin{syntax} % \optx{info/supervisor-school}=\argx{校内导师姓名} % \end{syntax} -% 设置校内导师姓名。校外毕业设计填写。 +% 设置校内导师姓名。 +% \end{function} +% \begin{function}[added=2022-05-03]{info/supervisor-title,info/supervisor-title*} +% \begin{syntax} +% \optx{info/supervisor-title}=\argx{导师职称} +% \optx{info/supervisor-title*}=\argx{导师职称英文名称} +% \end{syntax} +% 设置导师职称。 +% \end{function} +% \begin{function}[added=2022-05-03]{info/supervisor-enterprise-title,info/supervisor-enterprise-title*} +% \begin{syntax} +% \optx{info/supervisor-enterprise-title}=\argx{校外导师职称} +% \optx{info/supervisor-enterprise-title*}=\argx{校外导师职称英文名称} +% \end{syntax} +% 设置校外导师职称。 % \end{function} % \begin{function}[added=2022-04-01]{info/class-id} % \begin{syntax} @@ -754,6 +888,24 @@ % \end{syntax} % 设置作者学号。 % \end{function} +% \begin{function}[added=2022-05-03]{info/clc} +% \begin{syntax} +% \optx{info/clc}=\argx{中图分类号} +% \end{syntax} +% 设置中图分类号。 +% \end{function} +% \begin{function}[added=2022-05-03]{info/secret-level} +% \begin{syntax} +% \optx{info/secret-level}=\metax{秘密|(公开)} +% \end{syntax} +% 设置密级。 +% \end{function} +% \begin{function}[added=2022-05-03]{info/submit-date} +% \begin{syntax} +% \optx{info/submit-date}=\argx{提交日期} +% \end{syntax} +% 设置提交日期。 +% \end{function} % \begin{function}[added=2022-04-02]{info/abstract,info/abstract*} % \begin{syntax} % \optx{info/abstract}=\argx{中文摘要文件路径} @@ -814,16 +966,20 @@ %<*class> % \end{macrocode} % \begin{macro}{\PassOptionsToClass,\LoadClass} -% 加载\clsx{ctexbook}文档类。 % \changes{v0.3.2.0}{2022/04/04}{修正行间距为1.5倍} % \changes{v1.8.1.0}{2022/05/03}{修正页面尺寸} +% \changes{v1.9.2.0}{2022/05/04}{修正行间距为1.625倍} +% 加载\clsx{ctexbook}文档类。 +% \\ +% \LaTeX{}中基本行距是字号大小的1.2倍,Microsoft Word中基本行距是字号大小的1.3倍, +% Microsoft Word中1.5倍行距,相当于LaTeX中$1.5\times\frac{1.3}{1.2}=1.625$倍行距。 % \begin{macrocode} \PassOptionsToClass { a4paper, zihao=-4, sub4section, - linespread = 1.5, +% linespread = 1.625, fontset = none } { ctexbook } @@ -925,7 +1081,7 @@ % \end{macrocode} % 英文字体配置。 % \begin{macrocode} - latin-font .choices:nn = { tacn, thcs, gyre, none } + latin-font .choices:nn = { tac, tacn, thcs, gyre, none } { \tl_set_eq:NN \l_@@_latin_font_tl \l_keys_choice_tl }, % \end{macrocode} % 数学字体配置。 @@ -1475,6 +1631,21 @@ } % \end{macrocode} % \end{macro} +% \begin{macro}{\@@_load_latin_font_tac:} +% \changes{v1.12.0.0}{2022/05/06}{新增Arial和Consolas英文字体配置} +% 英文字体配置\valuex{tac}。 +% \begin{macrocode} +\cs_new:Npn \@@_load_latin_font_tac: + { + \@@_set_latin_main_font:nnnnn + { Times~New~Roman } { times.ttf } { timesbd.ttf } { timesi.ttf } { timesbi.ttf } + \@@_set_latin_sans_font:nnnnn + { Arial } { arial.ttf } { arialbd.ttf } { ariali.ttf } { arialbi.ttf } + \@@_set_latin_mono_font:nnnnn + { Consolas } { consola.ttf } { consolab.ttf } { consolai.ttf } { consolaz.ttf } + } +% \end{macrocode} +% \end{macro} % \begin{macro}{\@@_load_latin_font_tacn:} % 英文字体配置\valuex{tacn}。 % \begin{macrocode} @@ -1860,14 +2031,91 @@ %<*xdupgthesis> % \end{macrocode} % \subsubsection{研究生} +% \changes{v1.9.0.0}{2022/05/03}{增加研究生信息录入选项} % \begin{variable} % { -% \l_@@_gr_type_tl +% \l_@@_gr_type_tl, +% \l_@@_degree_type_tl, +% \l_@@_degree_str, +% \l_@@_degree_en_str, +% \l_@@_author_en_str, +% \l_@@_supv_en_str, +% \l_@@_supv_ent_en_str, +% \l_@@_supv_t_str, +% \l_@@_supv_t_en_str, +% \l_@@_supv_ent_t_str, +% \l_@@_supv_ent_t_en_str, +% \l_@@_title_en_str, +% \l_@@_major_en_str, +% \l_@@_sub_major_str, +% \l_@@_domain_str, +% \l_@@_clc_str, +% \l_@@_secret_lv_str, +% \l_@@_submit_date_str % } % 研究生类型。 % \begin{macrocode} \tl_new:N \l_@@_gr_type_tl % \end{macrocode} +% 学位类型。 +% \begin{macrocode} +\tl_new:N \l_@@_degree_type_tl +% \end{macrocode} +% 学位类别。 +% \begin{macrocode} +\str_new:N \l_@@_degree_str +\str_new:N \l_@@_degree_en_str +% \end{macrocode} +% 作者姓名拼音。 +% \begin{macrocode} +\str_new:N \l_@@_author_en_str +% \end{macrocode} +% 导师姓名拼音。 +% \begin{macrocode} +\str_new:N \l_@@_supv_en_str +% \end{macrocode} +% 校外导师姓名拼音。 +% \begin{macrocode} +\str_new:N \l_@@_supv_ent_en_str +% \end{macrocode} +% 导师职称。 +% \begin{macrocode} +\str_new:N \l_@@_supv_t_str +\str_new:N \l_@@_supv_t_en_str +% \end{macrocode} +% 校外导师职称。 +% \begin{macrocode} +\str_new:N \l_@@_supv_ent_t_str +\str_new:N \l_@@_supv_ent_t_en_str +% \end{macrocode} +% 论文标题英文。 +% \begin{macrocode} +\str_new:N \l_@@_title_en_str +% \end{macrocode} +% 一级学科英文名称。 +% \begin{macrocode} +\str_new:N \l_@@_major_en_str +% \end{macrocode} +% 二级学科。 +% \begin{macrocode} +\str_new:N \l_@@_sub_major_str +% \end{macrocode} +% 领域。 +% \begin{macrocode} +\str_new:N \l_@@_domain_str +% \end{macrocode} +% 中图分类号。 +% \begin{macrocode} +\str_new:N \l_@@_clc_str +% \end{macrocode} +% 密级。 +% \begin{macrocode} +\str_new:N \l_@@_secret_lv_str +% \end{macrocode} +% 提交日期。 +% \begin{macrocode} +\str_new:N \l_@@_submit_date_str +% \end{macrocode} % \end{variable} % \begin{macro}{\keys_define:nn} % 定义信息键值。 @@ -1877,8 +2125,69 @@ % \end{macrocode} % 研究生类型。 % \begin{macrocode} - graduate-type .choices:nn = { master, doctor } - { \tl_set_eq:NN \l_@@_gr_type_tl \l_keys_choice_tl } + graduate-type .choices:nn = { 硕士, 博士 } + { \tl_set_eq:NN \l_@@_gr_type_tl \l_keys_choice_tl }, +% \end{macrocode} +% 学位类型。 +% \begin{macrocode} + degree-type .choices:nn = { 学术, 专业 } + { \tl_set_eq:NN \l_@@_degree_type_tl \l_keys_choice_tl }, +% \end{macrocode} +% 学位类别。 +% \begin{macrocode} + degree .tl_set:N = \l_@@_degree_str, + degree* .tl_set:N = \l_@@_degree_en_str, +% \end{macrocode} +% 作者姓名拼音。 +% \begin{macrocode} + author* .tl_set:N = \l_@@_author_en_str, +% \end{macrocode} +% 导师姓名拼音。 +% \begin{macrocode} + supervisor* .tl_set:N = \l_@@_supv_en_str, +% \end{macrocode} +% 校外导师姓名拼音。 +% \begin{macrocode} + supervisor-enterprise* .tl_set:N = \l_@@_supv_ent_en_str, +% \end{macrocode} +% 导师职称。 +% \begin{macrocode} + supervisor-title .tl_set:N = \l_@@_supv_t_str, + supervisor-title* .tl_set:N = \l_@@_supv_t_en_str, +% \end{macrocode} +% 校外导师职称。 +% \begin{macrocode} + supervisor-enterprise-title .tl_set:N = \l_@@_supv_ent_t_str, + supervisor-enterprise-title* .tl_set:N = \l_@@_supv_ent_t_en_str, +% \end{macrocode} +% 论文标题英文。 +% \begin{macrocode} + title* .tl_set:N = \l_@@_title_en_str, +% \end{macrocode} +% 一级学科英文名称。 +% \begin{macrocode} + major* .tl_set:N = \l_@@_major_en_str, +% \end{macrocode} +% 二级学科。 +% \begin{macrocode} + sub-major .tl_set:N = \l_@@_sub_major_str, +% \end{macrocode} +% 领域。 +% \begin{macrocode} + domain .tl_set:N = \l_@@_domain_str, +% \end{macrocode} +% 中图分类号。 +% \begin{macrocode} + clc .tl_set:N = \l_@@_clc_str, +% \end{macrocode} +% 密级。 +% \begin{macrocode} + secret-level .choices:nn = { 秘密, 公开 } + { \tl_set_eq:NN \l_@@_secret_lv_str \l_keys_choice_tl }, +% \end{macrocode} +% 提交日期。 +% \begin{macrocode} + submit-date .tl_set:N = \l_@@_submit_date_str } % \end{macrocode} % \end{macro} @@ -1889,7 +2198,24 @@ % \begin{macrocode} \keys_set:nn { xdu } { - info / graduate-type = { master }, + info / graduate-type = { 硕士 }, + info / degree-type = { 学术 }, + info / degree = { }, + info / degree* = { }, + info / author* = { }, + info / supervisor* = { }, + info / supervisor-enterprise* = { }, + info / supervisor-title = { }, + info / supervisor-title* = { }, + info / supervisor-enterprise-title = { }, + info / supervisor-enterprise-title* = { }, + info / title* = { }, + info / major* = { }, + info / sub-major = { }, + info / domain = { }, + info / clc = { }, + info / secret-level = { 公开 }, + info / submit-date = { } } % \end{macrocode} % \end{macro} @@ -1914,7 +2240,8 @@ % \l_@@_subsubsec_tl, % \l_@@_para_tl, % \l_@@_subpara_tl, -% \l_@@_sym_mgn_bool +% \l_@@_sym_mgn_bool, +% \l_@@_page_v_align_tl % } % 英文是否使用中文字体。 % \begin{macrocode} @@ -1966,6 +2293,10 @@ % \begin{macrocode} \bool_new:N \l_@@_sym_mgn_bool % \end{macrocode} +% 设置页面垂直方向的对齐方式。 +% \begin{macrocode} +\tl_new:N \l_@@_page_v_align_tl +% \end{macrocode} % \end{variable} % \begin{macro}{\keys_define:nn} % 定义样式键值。 @@ -2026,7 +2357,11 @@ % \end{macrocode} % 设置页边距是否对称。 % \begin{macrocode} - symmetric-margin .bool_set:N = \l_@@_sym_mgn_bool + symmetric-margin .bool_set:N = \l_@@_sym_mgn_bool, +% \end{macrocode} +% 设置页面垂直方向的对齐方式。 +% \begin{macrocode} + page-vertical-align .tl_set:N = \l_@@_page_v_align_tl } % \end{macrocode} % \end{macro} @@ -2045,7 +2380,8 @@ style / algorithm-small-font = true, style / before-skip = { 24pt, 18pt, 12pt, 12pt, 12pt, 12pt }, style / after-skip = { 18pt, 12pt, 6pt, 6pt, 6pt, 6pt }, - style / symmetric-margin = false + style / symmetric-margin = false, + style / page-vertical-align = {顶部对齐} } % \end{macrocode} % \end{macro} @@ -2093,12 +2429,12 @@ { \@@_lang_switch:nn { - \tl_if_eq:NnTF \l_@@_gr_type_tl { master } + \tl_if_eq:NnTF \l_@@_gr_type_tl { 硕士 } { \str_set:Nn \l_@@_header_str { 西安电子科技大学硕士学位论文 } } { \str_set:Nn \l_@@_header_str { 西安电子科技大学博士学位论文 } } } { - \tl_if_eq:NnTF \l_@@_gr_type_tl { master } + \tl_if_eq:NnTF \l_@@_gr_type_tl { 硕士 } { \str_set:Nn \l_@@_header_str { Master~Thesis~of~XIDIAN~UNIVERSITY } @@ -2514,6 +2850,18 @@ % % \end{macrocode} % \end{macro} +% \subsubsection{对齐方式} +% \begin{macro}{\raggedbottom,\flushbottom} +% \changes{v1.13.0.0}{2022/05/08}{设置页面垂直方向的对齐方式} +% \begin{macrocode} +\ctex_at_end_preamble:n + { + \tl_if_eq:NnTF \l_@@_page_v_align_tl { 顶部对齐 } + { \raggedbottom } + { \flushbottom } + } +% \end{macrocode} +% \end{macro} % \begin{macrocode} % %<*xduugthesis> @@ -2689,49 +3037,60 @@ % \end{macrocode} % \end{macro} % \subsection{目录} +% \begin{macro}{\RequirePackage} +% \changes{v0.4.1.0}{2022/04/05}{设置目录样式} +% 设置目录样式。 +% \begin{macrocode} +\RequirePackage [ titles ] { tocloft } +% \end{macrocode} +% \end{macro} +% \begin{variable}{\cftchapleader} +% 修改目录中一级标题引导点。 +% \begin{macrocode} +\cs_set:Npn \cftchapleader { \bfseries \cftdotfill { \cftdotsep } } +% \end{macrocode} +% \end{variable} % \begin{variable} % { -% \cftchapleader, % \cftbeforechapskip, -% \cftbeforesecskip, -% \cftbeforesubsecskip, -% \cftbeforesubsubsecskip, -% \cftbeforeparaskip, -% \cftbeforesubparaskip, +% \cftbeforesecskip +% } +% \changes{v1.10.1.0}{2022/05/04}{修正目录条目间距} +% 设置一级标题与其余各级标题条目前垂直间距一致。 +% \begin{macrocode} +\dim_set_eq:NN \cftbeforechapskip \cftbeforesecskip +% \end{macrocode} +% \end{variable} +% \begin{variable} +% { % \cftchapfont, -% \cftchappagefont, -% \cftsecfont, -% \cftsubsecfont, -% \cftsubsubsecfont, -% \cftparafont, -% \cftsubparafont, -% \cftsecpagefont, -% \cftsubsecpagefont, -% \cftsubsubsecpagefont, -% \cftparapagefont, -% \cftsubparapagefont +% \cftchappagefont % } -% 设置目录样式。 -% \changes{v0.4.1.0}{2022/04/05}{设置目录样式} +% 设置一级标题及相应页码字体字号。 % \begin{macrocode} -\RequirePackage [ titles ] { tocloft } -\renewcommand { \cftchapleader } { \bfseries \cftdotfill { \cftdotsep } } \clist_map_inline:nn { - \cftbeforechapskip, - \cftbeforesecskip, - \cftbeforesubsecskip, - \cftbeforesubsubsecskip, - \cftbeforeparaskip, - \cftbeforesubparaskip + \cftchapfont, + \cftchappagefont } - { \dim_set:Nn { #1 } { 5pt } } - \clist_map_inline:nn - { - \cftchapfont, - \cftchappagefont - } - { \renewcommand { #1 } { \@@_rm_family: \zihao { -4 } \bfseries } } + { \renewcommand { #1 } { \@@_rm_family: \zihao { -4 } \bfseries } } +% \end{macrocode} +% \end{variable} +% \begin{variable} +% { +% \cftsecfont,, +% \cftsubsecfont,, +% \cftsubsubsecfont,, +% \cftparafont,, +% \cftsubparafont,, +% \cftsecpagefont,, +% \cftsubsecpagefont,, +% \cftsubsubsecpagefont,, +% \cftparapagefont,, +% \cftsubparapagefont +% } +% 设置二三四五六级标题及相应页码字体字号。 +% \begin{macrocode} \clist_map_inline:nn { \cftsecfont, @@ -2748,6 +3107,10 @@ { \renewcommand { #1 } { \@@_rm_family: \zihao { -4 } } } % \end{macrocode} % \end{variable} +% \begin{macrocode} +% +%<*thesis> +% \end{macrocode} % \subsection{公式} % \begin{macro}{\theequation} % 重定义公式编号样式。 @@ -2859,7 +3222,7 @@ % \begin{macro}{\DeclareCaptionLabelSeparator,\DeclareCaptionFont,\captionsetup} % \changes{v0.1.2.0}{2022/04/03}{设置图片标签与后面标题之间的间距} % \changes{v0.1.3.0}{2022/04/03}{设置图片标签与标题字体字号} -% 设置图表标签与后面标题之间的间距。 +% 设置图表标签与后面标题之间的间距及caption字体字号。 % \begin{macrocode} \RequirePackage { caption } \DeclareCaptionLabelSeparator { customskip } { \hskip \l_@@_cap_label_sep_tl } @@ -2901,6 +3264,22 @@ } % \end{macrocode} % \end{macro} +% \begin{macro}{\SetTblrStyle,\DefTblrTemplate} +% \changes{v1.11.0.0}{2022/05/06}{适配\pkgx{tabularray}宏包caption样式} +% 设置\pkgx{tabularray}宏包中表格标签与后面标题之间的间距及caption字体字号。 +% \begin{macrocode} +\ctex_at_end_preamble:n + { + \@ifpackageloaded { tabularray } + { + \SetTblrStyle { head } { font = \@@_rm_family: \zihao { 5 } } + \DefTblrTemplate { caption-sep } { default } + { \hskip \l_@@_cap_label_sep_tl } + } + { } + } +% \end{macrocode} +% \end{macro} % \subsection{图片} % \begin{macro}{\PassOptionsToPackage,\captionsetup} % \changes{v0.4.2.0}{2022/04/05}{设置子图标签与标题字体字号} @@ -2929,7 +3308,7 @@ % \end{macro} % \begin{macro}{longtable} % \changes{v1.3.0.0}{2022/04/20}{设置\envx{longtable}环境字号是否为五号} -% 设置\envx{longtable}环境字号是否为五号。 +% 设置\pkgx{longtable}宏包中\envx{longtable}环境字号是否为五号。 % \begin{macrocode} \ctex_at_end_preamble:n { @@ -2946,12 +3325,35 @@ } % \end{macrocode} % \end{macro} +% \begin{macro}{tblr,longtblr} +% \changes{v1.11.0.0}{2022/05/06}{适配\pkgx{tabularray}宏包中\envx{tblr}和\envx{longtblr}环境字号} +% 设置\pkgx{tabularray}宏包中\envx{tblr}和\envx{longtblr}环境字号是否为五号。 +% \begin{macrocode} +\ctex_at_end_preamble:n + { + \@ifpackageloaded { tabularray } + { + \bool_if:NT \l_@@_tab_small_bool + { + \ctex_gadd_ltxhook:nn + { env/tblr/begin } + { \small } + \ctex_gadd_ltxhook:nn + { env/longtblr/begin } + { \small } + } + } + { } + } +% \end{macrocode} +% \end{macro} % \subsection{超链接和PDF元数据} % \begin{macro}{\hyperref} -% 配置超链接和PDF元数据。 % \changes{v0.5.0.0}{2022/04/05}{添加PDF主题元数据} +% \changes{v1.10.0.0}{2022/05/04}{添加PDF应用程序元数据} +% 配置超链接和PDF元数据。 % \begin{macrocode} -\RequirePackage{hyperref} +\RequirePackage{ hyperref } \hypersetup { bookmarksnumbered, @@ -2962,7 +3364,10 @@ \hypersetup { pdftitle = \l_@@_pure_title_str, -% pdfsubject = {西安电子科技大学本科毕业设计论文}, +% pdfsubject = { 西安电子科技大学本科毕业设计论文 }, +% pdfcreator = { XeLaTeX~with~xduugthesis~class~in~XDUTS }, +% pdfsubject = \l_@@_header_str, +% pdfcreator = { XeLaTeX~with~xdupgthesis~class~in~XDUTS }, pdfauthor = \l_@@_author_str } } @@ -3005,7 +3410,7 @@ { \ctex_gadd_ltxhook:nn { env/document/begin } { #1 } } % \end{macrocode} % \end{macro} -% \begin{macro}{\addbibresource} +% \begin{macro}{\RequirePackage,\bibliographystyle,\addbibresource} % 参考文献。 % \begin{macrocode} \@@_begin_document:n @@ -3023,6 +3428,10 @@ } % \end{macrocode} % \end{macro} +% \begin{macrocode} +% +%<*xduugthesis> +% \end{macrocode} % \subsection{附录} % \begin{macro}{appendixes} % 附录环境。 @@ -3060,14 +3469,14 @@ % \begin{macrocode} \cs_new:Npn \@@_cover_i:nn #1#2 { - \vbox_to_ht:nn {12pt} + \vbox_to_ht:nn { 12pt } { \mode_leave_vertical: \hfill \hbox:n { \@@_rm_family: \zihao { -4 } \bfseries - \hbox_to_wd:nn { 3em } { #1 } + \hbox_to_wd:nn { 3em } { #1 } \skip_horizontal:n { 1em } \@@_uline:n { \hbox_to_wd:nn { 15ex } { \hfil #2 \hfil } } \skip_horizontal:n { 1.5cm } @@ -3078,21 +3487,26 @@ % \end{macro} % \begin{macro}{\@@_cover_ii:nnn} % \changes{v0.6.1.0}{2022/04/11}{修复logo不存在导致的无法编译} +% \changes{v1.13.1.0}{2022/05/08}{使用融合logo文件} % 绘制西电logo。 % \begin{arguments} % \item 盒子高度。 % \item logo高度。 -% \item logo文件名称。 +% \item logo类型。 % \end{arguments} % \begin{macrocode} \cs_new:Npn \@@_cover_ii:nnn #1#2#3 { - \vbox_to_ht:nn {#1} + \vbox_to_ht:nn { #1 } { \mode_leave_vertical: \hfil - \file_if_exist:nT { #3 } - { \includegraphics [ height = #2, keepaspectratio ] { #3 } } + \file_if_exist:nT { xdulogo.pdf } + { + \str_if_eq:nnTF { #3 } { text } + { \includegraphics [ page = 1, height = #2 ] { xdulogo.pdf } } + { \includegraphics [ page = 2, height = #2 ] { xdulogo.pdf } } + } \hfil } } @@ -3110,7 +3524,7 @@ % \begin{macrocode} \cs_new:Npn \@@_cover_iii:nnnnn #1#2#3#4#5 { - \vbox_to_ht:nn {40pt} + \vbox_to_ht:nn { 42.5pt } { \vfill \mode_leave_vertical: @@ -3193,6 +3607,7 @@ % \end{macrocode} % \end{macro} % \begin{macro}{\frontmatter} +% \changes{v1.9.1.0}{2022/05/04}{修正封面元素位置及尺寸} % 排版正文前部分。 % \begin{macrocode} \renewcommand { \frontmatter } @@ -3210,16 +3625,22 @@ % \end{macrocode} % 排版西电文字logo。 % \begin{macrocode} - \@@_cover_ii:nnn { 65pt } { 35pt } { xidian-text.pdf } + \@@_cover_ii:nnn { 65pt } { 35pt } { text } % \end{macrocode} +% \changes{v1.13.2.0}{2022/05/08}{修正封面标题偏移} % 排版封面标题。 % \begin{macrocode} - \vbox_to_ht:nn { 75pt } - { \@@_sf_family: \zihao { 0 } \centering { 本科毕业设计论文 } } + \vbox_to_ht:nn { 90pt } + { + \mode_leave_vertical: + \hfil + \hbox_to_wd:nn { 375pt } { \sffamily \zihao { 0 } 本科毕业设计论文 } + \hfil + } % \end{macrocode} % 排版西电logo。 % \begin{macrocode} - \@@_cover_ii:nnn { 130pt } { 120pt } { xidian-logo.pdf } + \@@_cover_ii:nnn { 140pt } { 120pt } { icon } % \end{macrocode} % 拆分论文标题并排版。 % \begin{macrocode} @@ -3266,11 +3687,12 @@ \cleardoublepage % \end{macrocode} % \changes{v0.8.0.0}{2022/04/12}{支持对称页边距} +% \changes{v1.10.2.0}{2022/05/04}{修正正文前页码样式} % 更换页面尺寸、页面样式和页码样式。 % \begin{macrocode} \@@_load_main_geometry: \pagestyle { plain } - \pagenumbering { Roman } + \pagenumbering { roman } % \end{macrocode} % \changes{v1.2.1.0}{2022/04/19}{修正英文论文下中文摘要标题样式} % 中文摘要,宋体小四号。 @@ -3289,18 +3711,25 @@ \file_if_exist_input:n { \l_@@_abstract_zh_tl } } % \end{macrocode} +% \changes{v1.10.3.0}{2022/05/04}{使用弹性长度分隔关键词} +% 关键词弹性分隔间距。 +% \begin{macrocode} + \cs_new:Npn \@@_keywords_space: { \hspace{ 2em plus 1em minus 1em } } +% \end{macrocode} % 中文关键词,黑体小四号。 % \begin{macrocode} { \sffamily \zihao { -4 } \par - \@@_typeout_keywords:nNn { 关键词: } { \l_@@_keywords_zh_clist } { \qquad } + \@@_typeout_keywords:nNn + { 关键词: } { \l_@@_keywords_zh_clist } { \@@_keywords_space: } } \cleardoublepage % \end{macrocode} % 英文摘要,Times New Roman字体,小四号。 % \changes{v0.4.3.0}{2022/04/05}{修正英文摘要标题字体} % \begin{macrocode} - \@@_n_chapter_head_ii:nn {ABSTRACT} { \rmfamily \zihao { 3 } \bfseries \centering } + \@@_n_chapter_head_ii:nn + { ABSTRACT } { \rmfamily \zihao { 3 } \bfseries \centering } { \dim_set:Nn \parindent { 2 \ccwd } \rmfamily \zihao { -4 } @@ -3311,7 +3740,8 @@ % \begin{macrocode} { \rmfamily \zihao { -4 } \bfseries \par - \@@_typeout_keywords:nNn { Keywords: } { \l_@@_keywords_en_clist } { \qquad } + \@@_typeout_keywords:nNn + { Keywords: } { \l_@@_keywords_en_clist } { \@@_keywords_space: } } \cleardoublepage % \end{macrocode} diff --git a/macros/xetex/latex/xduts/xduts.ins b/macros/xetex/latex/xduts/xduts.ins index c87034a527..1151b48d28 100644 --- a/macros/xetex/latex/xduts/xduts.ins +++ b/macros/xetex/latex/xduts/xduts.ins @@ -19,7 +19,7 @@ The Current Maintainer of this work is @note286 in GitHub and CTAN. This work consists of the files README.md, xduts.dtx, and xduts.ins and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls. -The copyright of xidian-text.pdf and xidian-logo.pdf is Xidian University. +The copyright of xdulogo.pdf is Xidian University. \endpreamble \postamble diff --git a/macros/xetex/latex/xduts/xduts.pdf b/macros/xetex/latex/xduts/xduts.pdf index a3a7be0362..8cd7f1c048 100644 Binary files a/macros/xetex/latex/xduts/xduts.pdf and b/macros/xetex/latex/xduts/xduts.pdf differ diff --git a/macros/xetex/latex/xduts/xidian-logo.pdf b/macros/xetex/latex/xduts/xidian-logo.pdf deleted file mode 100644 index 1f676b4faf..0000000000 Binary files a/macros/xetex/latex/xduts/xidian-logo.pdf and /dev/null differ diff --git a/macros/xetex/latex/xduts/xidian-text.pdf b/macros/xetex/latex/xduts/xidian-text.pdf deleted file mode 100644 index aca2d6291a..0000000000 Binary files a/macros/xetex/latex/xduts/xidian-text.pdf and /dev/null differ -- cgit v1.2.3