Closed dbitouze closed 3 years ago
You must add the label too: \GetDocumentProperties{top-level/topic}
You must add the label too:
\GetDocumentProperties{top-level/topic}
Nevertheless, instead of silently not printing anything, an error message would be welcome.
Nevertheless, instead of silently not printing anything, an error message would be welcome.
No, an error is neither wanted nor possible. The command should be expandable, and it must be possible to query e.g. a hyperref value without getting an error if hyperref hasn't set it or hasn't been loaded at all. It is like with the hooks: you don't get an error if you add something to a hook that doesn't exist (yet). If you want an error you will have to add a check yourself.
The following MCE shows the document property
{top-level/topic} => {Demo}
but\GetDocumentProperties{topic}
doesn't expand its corresponding "Demo" value in the resulting PDF.