Skip to content

Commit

Permalink
add test if DocumentMetadata has been used
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrike Fischer committed May 14, 2022
1 parent 169b3f3 commit e0f47de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/doc/ltnews35.tex
Expand Up @@ -184,7 +184,7 @@ \section{Document metadata interface}
and also in the documentation of the \pkg{pdfmanagement-testphase} package.

Package and class authors can test if a user has used \cs{DocumentMetadata}
and so loaded the pdfmanagement package with \cs{IfPDFManagementActiveTF}.
with \cs{IfDocumentMetadataTF}.


\section{The \pkg{latex-lab} bundle}
Expand Down Expand Up @@ -477,14 +477,14 @@ \subsection{Preparation for supporting PDF in backends}

At the current point in time, basic support for PDF in
backends is not part of \LaTeX{} core; it is provided by external
package like \pkg{hyperref}.
package like \pkg{hyperref}.
At some time in the future that work will be placed
into the kernel but for now it is separate and has to be
explicitly loaded in the document. To enable class and package authors
to support PDF specific task like the creation of link targets without
having to test first if \pkg{hyperref} has been loaded, dummy versions of
the commands \cs{MakeLinkTarget}, \cs{LinkTargetOn}, \cs{LinkTargetOff} and
\cs{NextLinkTarget} are provided.
\cs{NextLinkTarget} are provided.

\section{Code improvements}

Expand Down
2 changes: 2 additions & 0 deletions base/ltmeta.dtx
Expand Up @@ -127,6 +127,7 @@
% \end{macrocode}
%
% \begin{macrocode}
\let \IfDocumentMetadataTF \@secondoftwo
\protected\def\DocumentMetadata{%
\InputIfFileExists{documentmetadata-support.ltx}%
{}%
Expand All @@ -149,6 +150,7 @@
% \begin{macrocode}
\let\DocumentMetadata\@gobble
}%
\let \IfDocumentMetadataTF \@firstoftwo
\DocumentMetadata
}
% \end{macrocode}
Expand Down

0 comments on commit e0f47de

Please sign in to comment.