From a9726d029d99c128a7abb22e73074ba0a1ce838e Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Tue, 1 Sep 2020 03:03:37 +0000
Subject: CTAN sync 202009010303

---
 macros/latex-dev/base/ltsect.dtx | 29 ++++++++++++++++++++++-------
 1 file changed, 22 insertions(+), 7 deletions(-)

(limited to 'macros/latex-dev/base/ltsect.dtx')

diff --git a/macros/latex-dev/base/ltsect.dtx b/macros/latex-dev/base/ltsect.dtx
index 9ccd042fb4..359b445f45 100644
--- a/macros/latex-dev/base/ltsect.dtx
+++ b/macros/latex-dev/base/ltsect.dtx
@@ -31,7 +31,7 @@
 %%% From File: ltsect.dtx
 %<*driver>
 % \fi
-\ProvidesFile{ltsect.dtx}[2019/08/27 v1.1d LaTeX Kernel (Sectioning)]
+\ProvidesFile{ltsect.dtx}[2020/07/27 v1.1e LaTeX Kernel (Sectioning)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltsect.dtx}
@@ -137,20 +137,22 @@
 %
 %  \begin{macro}{\author}
 % \changes{LaTeX2e}{1993/12/11}{Added default}
+% \changes{v1.1e}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
 %
 %  |\author| for use in |\maketitle|. If not given |\maketitle| will
 %  produce a warning message.
 %
 %    \begin{macrocode}
-\DeclareRobustCommand\author[1]{\gdef\@author{#1}}
+\DeclareRobustCommand*\author[1]{\gdef\@author{#1}}
 %    \end{macrocode}
 %  \end{macro}
 %
 %  \begin{macro}{\date}
 %    |\date| for use in |\maketitle|. If not given |\maketitle| will
 %    produce |\today| as the default.
+% \changes{v1.1e}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
 %    \begin{macrocode}
-\DeclareRobustCommand\date[1]{\gdef\@date{#1}}
+\DeclareRobustCommand*\date[1]{\gdef\@date{#1}}
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -776,20 +778,33 @@
 %                \cs{addcontentsline}.  ASAJ.}
 % \changes{v1.1c}{2018/09/26}{Sometimes mask the endline char when
 %    writing to files (github/73)}
+% \changes{v1.1e}{2020/10/01}{add a fourth argument for better
+%    hyperref compability}
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease>                 {\addcontentsline}{fourth argument}%
+\def\addcontentsline#1#2#3{%
+%    \end{macrocode}
+%    We add an empty brace pair at the end of \cs{contentsline}
+%    so that the number of argument is identical in documents
+%    with and without hyperref.
+%    \begin{macrocode}
+  \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}{}%
+                     \protected@file@percent}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{2018/12/01}%
 %<latexrelease>                 {\addcontentsline}{Mask line endings}%
-\def\addcontentsline#1#2#3{%
-  \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}%
+%<latexrelease> \def\addcontentsline#1#2#3{%
+%<latexrelease>  \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}%
 %    \end{macrocode}
 %    We add \cs{protected@file@percent} at the end which is turned inside
 %   \cs{@writefile} into a percent character to mask the newline after
 %   the closing argument brace.
 %    \begin{macrocode}
-                     \protected@file@percent}}
-%</2ekernel|latexrelease>
+%<latexrelease>            \protected@file@percent}}
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{0000/00/00}%
 %<latexrelease>                 {\addcontentsline}{Mask line endings}%
-- 
cgit v1.2.3

