[latex3-commits] [git/LaTeX3-latex3-latex2e] gh489: fix for #489 (2147f1c2)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Feb 3 23:25:08 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh489
Link       : https://github.com/latex3/latex2e/commit/2147f1c2e7ad7349e2e61d074c62f7f577043c93

>---------------------------------------------------------------

commit 2147f1c2e7ad7349e2e61d074c62f7f577043c93
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Feb 3 23:25:08 2021 +0100

    fix for #489


>---------------------------------------------------------------

2147f1c2e7ad7349e2e61d074c62f7f577043c93
 base/changes.txt                                   |  6 ++++
 base/doc/ltnews33.tex                              | 11 ++++++++
 base/ltfloat.dtx                                   | 32 ++++++++++++++++++++--
 .../tlb-latexrelease-rollback-003-often.luatex.tlg |  4 +++
 .../tlb-latexrelease-rollback-003-often.tlg        |  4 +++
 .../tlb-latexrelease-rollback-003-often.xetex.tlg  |  4 +++
 base/testfiles/tlb-rollback-004-often.luatex.tlg   |  2 ++
 base/testfiles/tlb-rollback-004-often.tlg          |  2 ++
 base/testfiles/tlb-rollback-004-often.xetex.tlg    |  2 ++
 9 files changed, 65 insertions(+), 2 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 48f9ebe6..888b914c 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,12 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2021-02-03  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltfloat.dtx (subsection{Floating Environments}):
+	Explicitly end the \marginpar argument with \par to support
+	tagging (gh/489)
+
 2021-01-31  David Carlisle  <David.Carlisle at latex-project.org>
 
 	* ltfilehook.dtx: set \protect to \string to avoid bad
diff --git a/base/doc/ltnews33.tex b/base/doc/ltnews33.tex
index 972909ef..a65da430 100644
--- a/base/doc/ltnews33.tex
+++ b/base/doc/ltnews33.tex
@@ -216,6 +216,17 @@ entered directly instead of resorting to \verb=\d{m}= and so forth.
 \githubissue{484}
 
 
+\subsection{Execute \cs{par} at the end of \cs{marginpar} arguments}
+
+In preparation for tagged PDF it is important to properly tag all
+paragraphs and this requires running code at the beinning and end of
+each. At the end of a paragraph this is done inside the \cs{par}
+command, but the way \cs{marginpar} was coded, \LaTeX{} ended the
+marginal note without ever explicitly calling \cs{par}. This has now
+been changed.
+%
+\githubissue{489}
+
 
 \subsection{\ldots}
 
diff --git a/base/ltfloat.dtx b/base/ltfloat.dtx
index 626ee9f9..b15966b7 100644
--- a/base/ltfloat.dtx
+++ b/base/ltfloat.dtx
@@ -31,7 +31,7 @@
 %
 %<*driver>
 % \fi
-\ProvidesFile{ltfloat.dtx}[2020/12/05 v1.2d LaTeX Kernel (Floats)]
+\ProvidesFile{ltfloat.dtx}[2021/02/03 v1.2e LaTeX Kernel (Floats)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltfloat.dtx}
@@ -1004,7 +1004,12 @@
 % \changes{v1.1m}{1995/05/25}{(CAR) Resettings moved to hook}
 % \changes{v1.1n}{1996/07/26}{remove unnecessary \cs{global} before
 %                 \cs{@minipage...}}
+% \changes{v1.2e}{2021/02/03}{Explicitly end with \cs{par} (gh/489)}
 %    \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2021/05/01}%
+%<latexrelease>                 {\@savemarbox}{Explicit par for marginpar}%
 \long\def \@savemarbox #1#2{%
   \global\setbox #1%
     \color at vbox
@@ -1012,12 +1017,35 @@
         \hsize\marginparwidth
         \@parboxrestore
         \@marginparreset
-        #2%
+        #2\par
         \@minipagefalse
         \outer at nobreak
         }%
     \color at endbox
 }
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {\@savemarbox}{Explicit par for marginpar}%
+%<latexrelease>
+%<latexrelease>\long\def \@savemarbox #1#2{%
+%<latexrelease>  \global\setbox #1%
+%<latexrelease>    \color at vbox
+%<latexrelease>      \vtop{%
+%<latexrelease>        \hsize\marginparwidth
+%<latexrelease>        \@parboxrestore
+%<latexrelease>        \@marginparreset
+%<latexrelease>        #2%
+%<latexrelease>        \@minipagefalse
+%<latexrelease>        \outer at nobreak
+%<latexrelease>        }%
+%<latexrelease>    \color at endbox
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
 %    \end{macrocode}
 % \end{macro}
 %
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
index 710a4efe..1e59d13a 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -343,6 +343,8 @@ Skipping: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
 Skipping: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
+Skipping: [....-..-..] Explicit par for marginpar on input line ....
+Applying: [....-..-..] Explicit par for marginpar on input line ....
 Skipping: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] superscript baseline on input line ....
 Skipping: [....-..-..] \textsubscript  on input line ....
@@ -856,6 +858,8 @@ Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
+Skipping: [....-..-..] Explicit par for marginpar on input line ....
+Applying: [....-..-..] Explicit par for marginpar on input line ....
 Skipping: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] \textsubscript  on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
index 66d5cb70..66a8ce29 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -337,6 +337,8 @@ Skipping: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
 Skipping: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
+Skipping: [....-..-..] Explicit par for marginpar on input line ....
+Applying: [....-..-..] Explicit par for marginpar on input line ....
 Skipping: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] superscript baseline on input line ....
 Skipping: [....-..-..] \textsubscript  on input line ....
@@ -840,6 +842,8 @@ Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
+Skipping: [....-..-..] Explicit par for marginpar on input line ....
+Applying: [....-..-..] Explicit par for marginpar on input line ....
 Skipping: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] \textsubscript  on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
index e4218d22..0ce68190 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -337,6 +337,8 @@ Skipping: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
 Skipping: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
+Skipping: [....-..-..] Explicit par for marginpar on input line ....
+Applying: [....-..-..] Explicit par for marginpar on input line ....
 Skipping: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] superscript baseline on input line ....
 Skipping: [....-..-..] \textsubscript  on input line ....
@@ -849,6 +851,8 @@ Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
+Skipping: [....-..-..] Explicit par for marginpar on input line ....
+Applying: [....-..-..] Explicit par for marginpar on input line ....
 Skipping: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] \textsubscript  on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.luatex.tlg b/base/testfiles/tlb-rollback-004-often.luatex.tlg
index c203dad4..7fe33d18 100644
--- a/base/testfiles/tlb-rollback-004-often.luatex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.luatex.tlg
@@ -710,6 +710,8 @@ Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
+Skipping: [....-..-..] Explicit par for marginpar on input line ....
+Applying: [....-..-..] Explicit par for marginpar on input line ....
 Skipping: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] \textsubscript  on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.tlg b/base/testfiles/tlb-rollback-004-often.tlg
index 3c86f5fc..2f4f0cfb 100644
--- a/base/testfiles/tlb-rollback-004-often.tlg
+++ b/base/testfiles/tlb-rollback-004-often.tlg
@@ -698,6 +698,8 @@ Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
+Skipping: [....-..-..] Explicit par for marginpar on input line ....
+Applying: [....-..-..] Explicit par for marginpar on input line ....
 Skipping: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] \textsubscript  on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.xetex.tlg b/base/testfiles/tlb-rollback-004-often.xetex.tlg
index ba45bce7..b190c800 100644
--- a/base/testfiles/tlb-rollback-004-often.xetex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.xetex.tlg
@@ -699,6 +699,8 @@ Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
 Applying: [....-..-..] float order in 2-column on input line ....
 Already applied: [....-..-..] float order in 2-column on input line ....
+Skipping: [....-..-..] Explicit par for marginpar on input line ....
+Applying: [....-..-..] Explicit par for marginpar on input line ....
 Skipping: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] superscript baseline on input line ....
 Applying: [....-..-..] \textsubscript  on input line ....





More information about the latex3-commits mailing list.