From c316de3312f69271631f682d7f4ddb172c0c6a88 Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Sun, 12 Apr 2026 21:14:38 -0700 Subject: [PATCH] paper + assignment: add PDF metadata via pdfmanagement-testphase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit memoir is not yet compatible with the LaTeX tagged-PDF code, so full \DocumentMetadata (which pulls in all the latex-lab tagging machinery) crashes at compile time. Use \RequirePackage{pdfmanagement-testphase} plus \DeclareDocumentMetadata to get the PDF-management layer — document language, PDF 2.0 — without triggering tagging. Also adds pdflang and pdfdisplaydoctitle to the existing hypersetup. The \DocumentMetadata block and tagpdf load are left in the file as commented-out lines so this is a one-edit swap once memoir gains tagging support upstream: https://github.com/latex3/tagging-project/issues/910 Co-Authored-By: Claude Sonnet 4.6 --- assignment_template/text.tex | 19 ++++++++++++++++++- paper_template/text.tex | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/assignment_template/text.tex b/assignment_template/text.tex index 1951ed7..4db2885 100644 --- a/assignment_template/text.tex +++ b/assignment_template/text.tex @@ -1,9 +1,24 @@ +% memoir is currently incompatible with the LaTeX tagged-PDF code, so we +% load just the PDF management layer (for metadata). When memoir support +% lands upstream, swap this block for the commented-out \DocumentMetadata + +% tagpdf lines below. See https://github.com/latex3/tagging-project/issues/910 +\RequirePackage{pdfmanagement-testphase} +\DeclareDocumentMetadata{lang=en-US,pdfversion=2.0} + +% \DocumentMetadata{ +% pdfversion=2.0, +% pdfstandard=ua-2, +% lang=en-US, +% } + \documentclass[12pt]{memoir} % article-1 and article-2 styles were originally based on kieran healy's % templates \usepackage{mako-mem} \chapterstyle{article-2} +% \usepackage{tagpdf} +% \tagpdfsetup{activate-all} % with article-3 \chapterstyle, change to: \pagestyle{memo} \pagestyle{mako-mem} @@ -28,7 +43,9 @@ \usepackage[breaklinks]{hyperref} \hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue, - urlcolor=Blue, unicode=true} + urlcolor=Blue, unicode=true, + pdflang={en-US}, + pdfdisplaydoctitle=true} % add bibliographic stuff % memoir function to take out of the space out of the whitespace lists diff --git a/paper_template/text.tex b/paper_template/text.tex index 7a330d4..c4f1d02 100644 --- a/paper_template/text.tex +++ b/paper_template/text.tex @@ -1,6 +1,21 @@ +% memoir is currently incompatible with the LaTeX tagged-PDF code, so we +% load just the PDF management layer (for metadata). When memoir support +% lands upstream, swap this block for the commented-out \DocumentMetadata + +% tagpdf lines below. See https://github.com/latex3/tagging-project/issues/910 +\RequirePackage{pdfmanagement-testphase} +\DeclareDocumentMetadata{lang=en-US,pdfversion=2.0} + +% \DocumentMetadata{ +% pdfversion=2.0, +% pdfstandard=ua-2, +% lang=en-US, +% } + \documentclass[12pt]{memoir} \usepackage{cdsc-memoir} +% \usepackage{tagpdf} +% \tagpdfsetup{activate-all} % there are two chapter styles: cdsc-article and cdsc-memo % memo assumes that you remove the "\\" and the email address from the % \author field below as well as that you will comment out the @@ -28,7 +43,9 @@ \usepackage[breaklinks]{hyperref} \hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=Blue, - urlcolor=Blue, unicode=true} + urlcolor=Blue, unicode=true, + pdflang={en-US}, + pdfdisplaydoctitle=true} % list of footnote symbols for \thanks{} \makeatletter