[latex3-commits] [git/LaTeX3-latex3-latex2e] marks: add a news entry to ltnews35 (22845c70)

Frank Mittelbach frank.mittelbach at latex-project.org
Thu Apr 7 12:41:59 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : marks
Link       : https://github.com/latex3/latex2e/commit/22845c70d7eb277b661325598a6a4bf08d56c969

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

commit 22845c70d7eb277b661325598a6a4bf08d56c969
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Apr 7 12:41:59 2022 +0200

    add a news entry to ltnews35


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

22845c70d7eb277b661325598a6a4bf08d56c969
 base/doc/ltnews35.tex | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
 base/ltmarks.dtx      |  5 ++--
 2 files changed, 67 insertions(+), 3 deletions(-)

diff --git a/base/doc/ltnews35.tex b/base/doc/ltnews35.tex
index 3a2f91d7..4cb5b2fa 100644
--- a/base/doc/ltnews35.tex
+++ b/base/doc/ltnews35.tex
@@ -218,6 +218,71 @@ require a \cs{DocumentMetadata} declaration, but you will then be able
 to drop the \texttt{testphase} key setting.
 
 
+\section{A new mark mechanism for \LaTeX{}}
+
+The mark mechanism is \TeX{}'s way to pass information to the
+page-building process which happens asychronously in order to
+communicate relevant data for running headers and footers to the
+latter, e.g., what is the first section on the page or the last
+subsection, etc. However, marks may also be
+used for other purposes. The new kernel module provides a generalized
+mechanism for marks of independent classes.
+
+The \TeX{} engines offer a low-level mark mechanism to
+communicate information about the content of the current page to
+the asynchronous operating output routine. It works by placing
+\cs{mark} commands into the source document.
+
+This mechanism works well for simple formats (such as plain \TeX)
+whose output routines are only called to generate pages. It
+fails, however, in \LaTeX{} (and other more complex formats),
+because here the output routine is sometimes called without
+producing a page, e.g., when encountering a float and placing it
+into one of the float regions.
+%
+When that happens \TeX{}'s  \cs{topmark} no
+longer reflects situation at the top of the next page when that
+page is finally boxed.
+
+Furthermore \TeX{} only offered a single mark while \LaTeX{} wanted to
+keep track of more than one piece of information.  For that reason
+\LaTeX{} implemented its own mark mechanism where the marks always
+contained two parts with their own interfaces: \cs{markboth} and
+\cs{markright} to set marks and \cs{leftmark} and \cs{rightmark} to
+retrieve them.
+
+Unfortunately, this extended mechanism (while supporting scenarios such
+as chapter/section marks) was far from general. The mark
+situation at the top of a page (i.e., \cs{topmark}) remained
+unusable and the two marks offered were not really independent of
+each other because \cs{markboth} (as the name indicates) was
+always setting both.
+
+
+The new mechanism now available in \LaTeX{} starting with the 2022
+release overcomes both issues:
+\begin{itemize}
+\item
+  It provides arbitrary many, fully independent named marks, that
+  can be allocated and from that point onwards used.
+\item
+  It offers access for each such marks to to retrieve its, top,
+  first and bottom value.
+\item
+  Furthermore, the mechanism is augmented to give access to marks
+  in different ``regions'' which may not be just full pages.
+\end{itemize}
+The legacy interfaces, e.g., \cs{markboth}, are kept. Thus classes and
+packages making use of them continue to work flawlessly. To make use
+of the extended possibility a new set of commands for declaration of
+mark classes, setting their values and querying their state (in the
+output routine) is now available in addition.
+%
+You find the documentation for the new interfaces together with
+examples and further notes on the mechanism in the file
+\texttt{ltmarks-doc.pdf}. Just call \texttt{texdoc}
+\texttt{ltmarks-doc} to display it on your computer.
+
 
 
 
diff --git a/base/ltmarks.dtx b/base/ltmarks.dtx
index 40943e8c..64c46901 100644
--- a/base/ltmarks.dtx
+++ b/base/ltmarks.dtx
@@ -15,7 +15,7 @@
 %
 %    \begin{macrocode}
 \def\ltmarksversion{v1.0a}
-\def\ltmarksdate{2022/04/04}
+\def\ltmarksdate{2022/04/07}
 %    \end{macrocode}
 %<*driver>
 \documentclass{l3doc}
@@ -117,8 +117,7 @@
 %    each other because \cs{markboth} (as the name indicates) was
 %    always setting both.
 %
-%    The new mechanism (currently implemented in this package but
-%    scheduled for later integration into the format) overcomes both
+%    The new mechanism overcomes both
 %    issues:
 %    \begin{itemize}
 %    \item





More information about the latex3-commits mailing list.