0a43387d2e753f8b026323cf163b26938d35caaa
These templates declared pdfstandard=ua-2 and loaded tagpdf with
\tagpdfsetup{activate-all}. That combination sets /Marked true and
writes the PDF/UA-2 claim into the metadata, but activate-all is
tagpdf's low-level switch and does not turn on the kernel code that
tags document structure. The result was a file announcing itself as
accessible while carrying nothing for assistive software to read: the
memo's structure tree held one /Document and two /Link nodes, and the
letter's held /Document alone.
tagging=on loads that kernel code. The memo now tags three headings, a
subsection, its paragraphs and its bibliography list; the letter tags
all ten body paragraphs. The manual tagpdf lines are no longer needed
since the kernel loads it.
This requires TeX Live 2025 or later; on TeX Live 2024 the key is
unknown and the build stops.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
================================
=== CDSC LaTeX Templates =======
================================
Copyright (c) 2009-2026 Benjamin Mako Hill <mako@atdot.cc> / <makohill@uw.edu>
This repository contains LaTeX configuration files and templates used to
format papers, memos, letters, and posters. All files are released under
the GNU GPL version 3 or later.
The latest version can be found in git at:
https://gitea.communitydata.science/collective/cdsc_tex
You can check out the latest version with:
git clone https://gitea.communitydata.science/collective/cdsc_tex.git
Bug reports, comments, questions, and patches can be directed to:
Benjamin Mako Hill <makohill@uw.edu> [work]
Benjamin Mako Hill <mako@atdot.cc> [personal]
To submit a patch, clone the repository, make your changes, and use
git format-patch to generate patch files to send by email:
git format-patch origin/master
git send-email *.patch
================================
=== Dependencies ===============
================================
On Debian or Ubuntu, install the following packages:
* latexmk
* texlive-luatex
* texlive-latex-recommended
* texlive-fonts-extra
* texlive-fonts-recommended
* texlive-bibtex-extra
apt install latexmk texlive-luatex texlive-latex-recommended \
texlive-fonts-extra texlive-fonts-recommended \
texlive-bibtex-extra
On other systems, installing a full TeX Live distribution should provide
everything needed.
All four templates build with LuaLaTeX (via latexmk -lualatex). The text
fonts are Libertinus Serif and TeX Gyre Heros, both provided by
texlive-fonts-extra.
================================
=== Accessibility ==============
================================
All four templates produce PDF/UA-2 compliant tagged PDFs via the
LaTeX tagging project (\DocumentMetadata + tagpdf). You can verify
compliance with verapdf: https://verapdf.org/
The paper and memo templates were originally built on the memoir
class, which is incompatible with the LaTeX tagged-PDF code. They now
use the standard article class with custom styling (cdsc-paper.sty
and cdsc-memo.sty) to keep their previous look while supporting full
tagging.
================================
=== Branches ===================
================================
This repository has two main branches:
master Standard LaTeX templates (paper, memo, letter, poster)
knitr Knitr/R template for reproducible research documents
================================
=== Scripts ====================
================================
new_tex_document
----------------
Creates a new document directory from a template. Takes a document type
and destination directory as arguments:
new_tex_document <type> <directory>
Available types:
paper LaTeX paper template (master branch)
memo LaTeX memo template (master branch)
knitr Knitr/R paper template (knitr branch)
letter LaTeX letter template (master branch)
Example:
new_tex_document paper my-new-paper
This creates my-new-paper/ populated with the template files, with the
main source file renamed to my-new-paper.tex (or .Rtex for knitr).
rename_tex_to_dirname
---------------------
Renames the single .tex file in the current directory to match the
directory name. Useful for cleaning up a template that was set up
manually:
cd my-paper && rename_tex_to_dirname
================================
=== Shell Aliases ==============
================================
The file cdsc_tex_aliases.sh provides aliases for the old individual
script names, for convenience or backwards compatibility. Add the
following to your .bashrc or .zshrc:
[[ -f ~/tex/cdsc_tex/cdsc_tex_aliases.sh ]] && \
source ~/tex/cdsc_tex/cdsc_tex_aliases.sh
This defines the following aliases (only if new_tex_document is in PATH):
new_tex_memo → new_tex_document memo
new_knitr_document → new_tex_document knitr
new_tex_letter → new_tex_document letter
================================
=== Migration ==================
================================
The individual scripts new_knitr_document and new_tex_letter have
been consolidated into new_tex_document. The old scripts remain in
the repository but are superseded.
To migrate, replace calls to the old scripts with new_tex_document:
Old: new_knitr_document mydir
New: new_tex_document knitr mydir
Old: new_tex_letter mydir
New: new_tex_document letter mydir
Alternatively, source cdsc_tex_aliases.sh (see above) to keep using the
old names without changing your workflow.
Description
Languages
TeX
77%
Python
14.4%
Awk
3.4%
Shell
3.1%
Makefile
2.1%