diff options
author | Norbert Preining <norbert@preining.info> | 2022-06-09 03:01:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-06-09 03:01:00 +0000 |
commit | 16559ce13a74c7a182875559b379cac00b07efda (patch) | |
tree | 6ee63e6aadfabf9a7334e6667fa32646fd812667 /macros/latex/base/ltbibl.dtx | |
parent | b3aac3ae7b628835121d1f485fd49998308170e7 (diff) |
CTAN sync 202206090300
Diffstat (limited to 'macros/latex/base/ltbibl.dtx')
-rw-r--r-- | macros/latex/base/ltbibl.dtx | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/macros/latex/base/ltbibl.dtx b/macros/latex/base/ltbibl.dtx index cda0fa160a..4c219657b8 100644 --- a/macros/latex/base/ltbibl.dtx +++ b/macros/latex/base/ltbibl.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2021 +% Copyright (C) 1993-2022 % The LaTeX Project and any individual authors listed elsewhere % in this file. % @@ -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} @@ -106,7 +106,7 @@ % |\nocite{*}| is special: it tells \BibTeX{} to put the whole of a % collection of references into the bibliography. % -% \StopEventually{} +% \MaybeStop{} % % % \changes{v1.0a}{1994/03/31}{Initial version of ltidxbib.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} % |