From 57edc96daf3f418c64f3f1287edf0ffec51381ca Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 11 Feb 2025 13:39:21 +0100 Subject: support LaTeX \DocumentMetadata to enable Tagged PDF/A --- _extensions/ruc-play/stylish-report/doc-class.tex | 53 ++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/_extensions/ruc-play/stylish-report/doc-class.tex b/_extensions/ruc-play/stylish-report/doc-class.tex index 34eaffa..8eff486 100644 --- a/_extensions/ruc-play/stylish-report/doc-class.tex +++ b/_extensions/ruc-play/stylish-report/doc-class.tex @@ -1,3 +1,54 @@ +\DocumentMetadata{ +% modern PDF rendering: +$if(lang)$ + lang={$lang$}, +$endif$ +$if(pdfversion)$ + pdfversion=$pdfversion$, +$endif$ +$for(pdfstandard)$ + pdfstandard=$pdfstandard$, +$endfor$ +$if(pdftestphase)$ +testphase= + { +$for(pdftestphase)$ + $pdftestphase$, +$endfor$ + }, +$endif$ +$if(pdfdebug)$ +debug= + { +$for(pdfdebug)$ + $pdfdebug$, +$endfor$ + }, +$endif$ +$if(pdfdebugfirstaidoff)$ +debug= + { +firstaidoff= + { +$for(pdfdebugfirstaidoff)$ + $pdfdebugfirstaidoff$, +$endfor$ + }, + }, +$endif$ +} +$if(copyright)$ +% flag as rights protected +\ExplSyntaxOn +\pdfmeta_xmp_add:n{True} +\ExplSyntaxOff +$endif$ +$if(pdftestphasestrict)$ +% fatalize tagging warnings +\ExplSyntaxOn + \msg_redirect_module:nnn { tag } { warning } { error } +\ExplSyntaxOff +$endif$ \documentclass[ $if(fontsize)$ $fontsize$, @@ -20,4 +71,4 @@ $endif$ $for(classoption)$ $classoption$$sep$, $endfor$ -]{$documentclass$} \ No newline at end of file +]{$documentclass$} -- cgit v1.2.3