diff options
Diffstat (limited to 'Master/texmf-dist/source/latex-dev/base/ltbibl.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/ltbibl.dtx | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/ltbibl.dtx b/Master/texmf-dist/source/latex-dev/base/ltbibl.dtx index 9824ca539fd..4c219657b87 100644 --- a/Master/texmf-dist/source/latex-dev/base/ltbibl.dtx +++ b/Master/texmf-dist/source/latex-dev/base/ltbibl.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltbibl.dtx} - [2020/12/10 v1.1s LaTeX Kernel (Bibliography)] + [2022/03/10 v1.1t LaTeX Kernel (Bibliography)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltbibl.dtx} @@ -199,8 +199,41 @@ % \begin{macro}{\cite} % \changes{v1.1j}{1995/10/16}{(DPC) Make robust} % \begin{macrocode} +%</2ekernel> +%<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2022/06/01}% +%<latexrelease> {\cite}{check for blank}% \DeclareRobustCommand\cite{% - \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} + \@ifnextchar [{\@tempswatrue\@citex@checkblank}{\@tempswafalse\@citex@checkblank[]}} +% \end{macrocode} +% Due to the way \cs{@for} as used in \cs{@citex} behaves an empty +% argument to \cs{cite} did not produce any warning for a missing +% citation. So we now inject a command before calling \cs{@citex} that +% does the checking for us. It is not done in \cs{@citex} directly, +% because that command is altered by a number of packages/classes +% and this way it is more likely that the check survives. +% \changes{v1.1t}{2022/03/10}{Ensure that an empty argument generates +% a warning (gh/790)} +% \begin{macrocode} +\def\@citex@checkblank[#1]#2{% + \IfBlankTF {#2}% + {\@citex[#1]{\space}}% + {\@citex[#1]{#2}}% +} +%</2ekernel|latexrelease> +% \end{macrocode} +% +% \begin{macrocode} +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\cite}{check for blank}% +%<latexrelease> +%<latexrelease>\DeclareRobustCommand\cite{% +%<latexrelease> \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} +%<latexrelease>\let\@citex@checkblank\@undefined +%<latexrelease> +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> % \end{macrocode} % \end{macro} % |