[patch] [RFC] \DocumentMetadata
Jürgen Spitzmüller
spitz at lyx.org
Fri Feb 11 11:42:53 UTC 2022
Dear all
The next LaTeX release (06/2022) will introduce a document metadata
interface [1] which is supposed to be used for all general document
metadata eventually (particularly for those employed in PDF output).
This interface is part of the ongoing long-term effort to integrate PDF
features into the kernel (which will most probably make hyperref and
many other pdf-related packages obsolete eventually, and particularly
allow for generating accessible [tagged] and standard-compliant PDFs,
at long last). See [2].
This is all still highly experimental and rudimentary and will probably
only be getting interesting to most users over the next release cycles.
However, given the current long major release cycles we have, and given
the implementation of this \DocumentMetadata interface I propose to add
basic support to 2.4 as:
1. \DocumentMetadata must be inserted at the very beginning of a
document, and particularly _before_ \documentclass. So it is impossible
to use this feature with LyX as it stands. See [1] for a rationale.
2. Given that file format reversion can only delete those metadata,
having it as a Buffer param quite early will mitigate the unavoidable
data loss at version cycling.
The attached patch does the implementation, everything (lyx2lyx,
tex2lyx) included. The GUI is basic, a simple input widget for the key-
vals that are expected by \DocumentMetadata, and I have hidden it in
PDF Settings, as those are the only parameters these metadata currently
seem to concern. After everything has settled and the interface became
more widespread (i.e., taken up by packages), we can think about a more
sophisticated GUI (but this is certainly post-2.4 work).
At LaTeX export, \DocumentMetadata is only output if LaTeX 06/2022 or
newer is available (so it will output nothing at all currently unless
you change the code).
Since this is a very late feature proposal and file format change, I'd
like to hear your opinions before pushing any buttons.
Best,
Jürgen
[1] http://mirrors.ctan.org/macros/latex-dev/base/ltnews.pdf (Issue 35)
[2]
https://www.latex-project.org/publications/2020-tagged-pdf-feasibility.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: metadata.diff
Type: text/x-patch
Size: 11728 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220211/cbc68b64/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220211/cbc68b64/attachment-0001.asc>
More information about the lyx-devel
mailing list