diff --git a/required/latex-lab/changes.txt b/required/latex-lab/changes.txt index e8018c5bf..f7b07719c 100644 --- a/required/latex-lab/changes.txt +++ b/required/latex-lab/changes.txt @@ -1,3 +1,7 @@ +2024-01-18 Ulrike Fischer + * latex-lab-title.dtx: make \@title and \@author robust to avoid errors + if they are not set. + 2024-01-18 Ulrike Fischer * latex-lab-block.dtx: add support to set an attribute-class for para-main. diff --git a/required/latex-lab/latex-lab-title.dtx b/required/latex-lab/latex-lab-title.dtx index a8087a9cd..75c269454 100644 --- a/required/latex-lab/latex-lab-title.dtx +++ b/required/latex-lab/latex-lab-title.dtx @@ -16,8 +16,8 @@ % % for those people who are interested or want to report an issue. % -\def\ltlabtitledate{2023-12-22} -\def\ltlabtitleversion{0.85a} +\def\ltlabtitledate{2024-01-21} +\def\ltlabtitleversion{0.85b} %<*driver> \documentclass{l3doc} @@ -134,7 +134,7 @@ \ProvidesExplPackage {latex-lab-testphase-title} {\ltlabtitledate} {\ltlabtitleversion} {Changes related to the tagging of the title} % \end{macrocode} - +% % \subsection{\cs{maketitle} in article class} % % \begin{macrocode} @@ -316,7 +316,12 @@ % % A helper command to convert the title into a pdfstring similar to % \cs{pdfstringdef}. -% +% As we use \cs{text_purify} we must ensure that the default definitions +% of \cs{@title} and \cs{@author} are robust: +% \begin{macrocode} +\protected\def\@title{\@latex@error{No \noexpand\title given}\@ehc} +\protected\def\@author{\@latex@warning@no@line{No \noexpand\author given}} +% \end{macrocode} % TODO: This should be improved and moved into the pdf module so that % it is generally available. % \begin{macrocode} diff --git a/required/latex-lab/testfiles-title/title-empty.lvt b/required/latex-lab/testfiles-title/title-empty.lvt new file mode 100644 index 000000000..ac99a5c26 --- /dev/null +++ b/required/latex-lab/testfiles-title/title-empty.lvt @@ -0,0 +1,11 @@ +\ExplSyntaxOn +\debug_on:n { check-declarations , deprecation } +\sys_gset_rand_seed:n{1000} +\ExplSyntaxOff +\DocumentMetadata{testphase={phase-III,title},pdfversion=2.0} +\input{regression-test} +\documentclass{article} +\begin{document} +\START +\maketitle +\end{document} diff --git a/required/latex-lab/testfiles-title/title-empty.tlg b/required/latex-lab/testfiles-title/title-empty.tlg new file mode 100644 index 000000000..48bb3594b --- /dev/null +++ b/required/latex-lab/testfiles-title/title-empty.tlg @@ -0,0 +1,18 @@ +This is a generated file for the l3build validation system. +Don't change this file in any respect. +! LaTeX Error: No\title given. +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... +l. ...\maketitle +Try typing to proceed. +If that doesn't work, type X to quit. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line .... +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line .... +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line .... +LaTeX Warning: No\author given. +[1 +] (title-empty.aux)