Skip to content

Instantly share code, notes, and snippets.

@klpn
Created February 13, 2020 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klpn/04a0a5ee2cefd198655d4b2398638882 to your computer and use it in GitHub Desktop.
Save klpn/04a0a5ee2cefd198655d4b2398638882 to your computer and use it in GitHub Desktop.
Change to Pandoc 2.8 beamer template to create PDF/A-2a
*** default.beamer 2020-02-13 11:50:17.541486784 +0100
--- tagged-pres.beamer 2020-02-13 11:32:29.142235033 +0100
***************
*** 10,15 ****
--- 10,20 ----
$endif$
$endif$
%
+ \begin{filecontents*}{\jobname.xmpdata}
+ \Title{$title$}
+ \Author{$author$}
+ \Language{$lang$}
+ \end{filecontents*}
\documentclass[
$if(fontsize)$
$fontsize$,
***************
*** 33,38 ****
--- 38,45 ----
$classoption$$sep$,
$endfor$
]{$documentclass$}
+ \usepackage{luatex85}
+ \usepackage[a-2a]{pdfx}
$if(beamer)$
$if(background-image)$
\usebackgroundtemplate{%
***************
*** 399,405 ****
--- 406,429 ----
$endif$
$endif$
+ \usepackage{etoolbox}
+ \BeforeBeginEnvironment{frame}{\tagstructbegin{tag=Sect}%
+ \tagstructbegin{tag=H}\tagmcbegin{tag=H}}
+ \AtBeginEnvironment{frame}{\tagmcend\tagstructend}
+ \AfterEndEnvironment{frame}{\tagstructend}
+
+
+
+ \usepackage{tagpdf}
+ \tagpdfsetup{
+ activate-all,
+ uncompress,
+ tabsorder=structure,
+ interwordspace=true
+ }
+
\begin{document}
+ \tagstructbegin{tag=Document}
$if(has-frontmatter)$
\frontmatter
$endif$
***************
*** 493,496 ****
--- 517,521 ----
$include-after$
$endfor$
+ \tagstructend
\end{document}
@klpn
Copy link
Author

klpn commented Feb 13, 2020

The luatex85 package is necessary when compiling using Luatex > 0.85, or pdfx will complain about missing \pdfminorversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment