From 33fe673e1a4a678f76e23a91da0f449998af9c47 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Fri, 20 May 2022 03:01:51 +0000
Subject: CTAN sync 202205200301

---
 macros/latex-dev/base/ltmeta.dtx | 45 ++++++++++++++++++++++++++++++++--------
 1 file changed, 36 insertions(+), 9 deletions(-)

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

diff --git a/macros/latex-dev/base/ltmeta.dtx b/macros/latex-dev/base/ltmeta.dtx
index e1c296ae1d..31c5d8dbee 100644
--- a/macros/latex-dev/base/ltmeta.dtx
+++ b/macros/latex-dev/base/ltmeta.dtx
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-%% File: ltmeta.dtx (C) Copyright 2021
+%% File: ltmeta.dtx (C) Copyright 2021, 2022
 %       Frank Mittelbach, LaTeX Team
 %
 % It may be distributed and/or modified under the conditions of the
@@ -14,14 +14,12 @@
 %%% From File: ltmeta.dtx
 %
 %    \begin{macrocode}
-\def\ltmetaversion{v1.0a}
-\def\ltmetadate{2021/12/07}
+\def\ltmetaversion{v1.0b}
+\def\ltmetadate{2022/05/18}
 %    \end{macrocode}
 %<*driver>
 \documentclass{l3doc}
 
-%\usepackage{ltmeta}
-
 % Fixing footnotes in  functions and variables: this should be in l3doc!
 
 \newcommand\fixfootnote[2]{\footnotemark
@@ -122,11 +120,12 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-%<latexrelease>\NewModuleRelease{2021/06/01}{ltmeta}
+%<latexrelease>\NewModuleRelease{2022/06/01}{ltmeta}
 %<latexrelease>                 {Document Metadata handling}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+\let \IfDocumentMetadataTF \@secondoftwo
 \protected\def\DocumentMetadata{%
   \InputIfFileExists{documentmetadata-support.ltx}%
      {}%
@@ -149,16 +148,44 @@
 %    \begin{macrocode}
       \let\DocumentMetadata\@gobble
      }%
+  \let \IfDocumentMetadataTF \@firstoftwo
   \DocumentMetadata
 }
 %    \end{macrocode}
 %
+%   To allow package and class author to support for document links
+%   we provide also the new interface commands of the hyperref package
+%   for the creation of targets.
+% \changes{v1.0b}{2022/05/17}{Default definition for targets added}
+%  \begin{macro}{\MakeLinkTarget}
+%  \begin{macro}{\LinkTargetOn}
+%  \begin{macro}{\LinkTargetOff}
+%  \begin{macro}{\NextLinkTarget}
+%    \begin{macrocode}
+\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
+  \ifvmode
+    \special{}%
+  \else
+    \@savsf\spacefactor
+    \smash{}%
+    \spacefactor\@savsf
+  \fi}
+\NewDocumentCommand\LinkTargetOn{}{}
+\NewDocumentCommand\LinkTargetOff{}{}
+\NewDocumentCommand\NextLinkTarget{m}{}
+%    \end{macrocode}
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
 %
 %
-%
-%
+%    We do not undo \cs{MakeLinkTarget} and friends if we roll back, in
+%    case they are used in packages that themselves do not offer
+%    rollback. This way a roll forward adds them, but the dummies remain
+%    if you roll back and you don't get missing csname errors if they
+%    are used.
 %    \begin{macrocode}
-%
 %<latexrelease>\IncludeInRelease{0000/00/00}{ltmeta}%
 %<latexrelease>                 {Undo Document Metadata handling}
 %<latexrelease>
-- 
cgit v1.2.3

