Transforms LaTeX documents to produce accessible tagged PDFs (PDF/UA-1, PDF/A-2b) with LuaLaTeX. Creates a non-destructive copy or adds a Makefile target for accessible builds.
Ships in scholar-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Transform a LaTeX document to produce tagged, screen-reader-friendly PDFs compliant with PDF/UA-1 and PDF/A-2b. Applies preamble changes and switches the build to LuaLaTeX. The user chooses whether to edit the original file in place or create a -accessible copy with a separate Makefile target.
Reference: https://yyahn.com/wiki/Accessible-PDF-from-LaTeX/
\DocumentMetadata tagging framework is recent)brew install poppler on macOSlatexmk can be run directly insteadWindows users: make is not standard on Windows — run latexmk -lualatex <basename> directly instead of using the Makefile. Install poppler via choco install poppler or scoop install poppler.
Check early: run lualatex --version and pdfinfo -v. If either is missing, tell the user what to install and stop.
Use the user-provided path. If none given, glob for **/*.tex files containing \begin{document}. If multiple matches, ask the user to pick. No assumptions about directory structure — this could be a CV, syllabus, report, or paper.
Read everything before \begin{document}. Identify:
\documentclass line and options\usepackage lines\DocumentMetadata already existshyperref / \hypersetup already existsinputenc, fontenc, fontspec, mathpazo, mathptmx, newtxtext, newtxmath, helvet, courier, libertine, libertinus, lmodern, inconsolata, etc.marvosym, pifont, wasysym, etc.\title{...} and \author{...} content (needed for hypersetup metadata)babel or polyglossiaIf the document already has \DocumentMetadata and uses fontspec, it may already be configured for accessibility. Note this in the questions below.
Present all decisions as a single numbered list so the user can answer in one message:
.tex file, or create <basename>-accessible.tex alongside it? (Multi-file projects: only the main file changes either way.)latexmk directly? (If a Makefile already exists, note this.)make is available.)Use the answers to tailor Phases 2–4 below.
Apply these 5 ordered changes to the target file (either the original or the -accessible copy):
a) Add \DocumentMetadata block
Insert before the \documentclass line:
\DocumentMetadata{
lang = en,
pdfstandard = a-2b,
pdfstandard = ua-1,
pdfversion = 2.0,
testphase = {phase-II},
}
If the document uses babel or polyglossia with a non-English language, use the appropriate language code instead of en.
b) Replace Type1 font packages with OpenType equivalents
Add \usepackage{fontspec} after \documentclass (if not already present). Then apply these replacements:
| Remove | Replace with |
|---|---|
\usepackage[utf8]{inputenc} (any options) | Remove entirely — LuaLaTeX handles UTF-8 natively |
\usepackage[T1]{fontenc} (any options) | Remove entirely — fontspec handles encoding |
\usepackage{mathpazo} or \usepackage[sc]{mathpazo} | \setmainfont{TeX Gyre Pagella} |
\usepackage{mathptmx} | \setmainfont{TeX Gyre Termes} |
\usepackage{newtxtext} | \setmainfont{TeX Gyre Termes} |
\usepackage{helvet} (any options) | \setsansfont{TeX Gyre Heros} |
\usepackage{courier} | \setmonofont{TeX Gyre Cursor} |
\usepackage{lmodern} | Remove entirely — Latin Modern is the LuaLaTeX default |
\usepackage{inconsolata} | \setmonofont{Inconsolatazi4-Regular.otf}[BoldFont=Inconsolatazi4-Bold.otf] |
\usepackage{libertine} or \usepackage{libertinus} | \setmainfont{Libertinus Serif} |
Math font packages (newtxmath, eulervm, mathpazo with math features): flag these for the user to review rather than silently replacing. Math font compatibility with LuaLaTeX can be tricky. Add a % TODO: review math font compatibility comment.
For any font package not in the table above, add a % TODO: find OpenType equivalent for <package> comment and warn the user.
c) Add/update hyperref accessibility metadata
If hyperref is not loaded, add \usepackage{hyperref}.
Add or merge into the existing \hypersetup:
\hypersetup{
pdftitle={<from \title{}>},
pdfauthor={<from \author{}>},
pdflang={en},
pdfdisplaydoctitle=true,
}
Preserve any existing \hypersetup keys (like colorlinks, linkcolor, etc.) — only add the accessibility-specific keys that are missing. pdfdisplaydoctitle=true is required for PDF/UA.
d) Replace symbol font packages
| Remove | Add | Command mappings |
|---|---|---|
\usepackage{marvosym} | \usepackage{fontawesome5} | \Letter -> \faEnvelope, \Mundus -> \faGlobe, \Telefon -> \faPhone |
Search the document body (not just the preamble) for uses of replaced commands and apply the mappings. For commands with no known mapping, leave the original with a % TODO: replace with accessible equivalent comment.
pifont and wasysym: keep them but flag for review if heavily used — some of their symbols may lack Unicode mappings.
List all changes made, organized by category (metadata, fonts, hyperref, symbols). Highlight any % TODO: items that need manual attention.
Skip this phase if the user declined a Makefile.
Copy mode — append or create a target:
# Accessible PDF (PDF/UA-1, PDF/A-2b) — built with LuaLaTeX
<basename>-accessible.pdf: <basename>-accessible.tex
latexmk -lualatex <basename>-accessible
In-place mode — if a Makefile exists with a pdflatex target, update it to use latexmk -lualatex. Otherwise, append or create:
# Build with LuaLaTeX for accessible tagged PDF
<basename>.pdf: <basename>.tex
latexmk -lualatex <basename>
Skip this phase if the user declined building now.
Run the appropriate command:
make <basename>-accessible.pdf (copy) or make <basename>.pdf (in-place)latexmk -lualatex <basename>-accessible (copy) or latexmk -lualatex <basename> (in-place)If the build fails, diagnose:
tlmgr install <font-package>phase-IRun pdfinfo <output>.pdf and check:
yes. If no, the \DocumentMetadata setup needs debugging.\hypersetup wasn't applied correctly.This is a basic sanity check only — it confirms the PDF has tags and metadata but says nothing about whether the tags are correct or the reading order makes sense.
Report:
pdfinfo results (tagged, title, author)% TODO: items remaining% TODO: rather than guessingtestphase = {phase-II} as default — phase-III is more complete but conflicts with more packagesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
latex-accessibility, pdf-ua, pdf-a, tagged-pdf, luatex, latex
13 skills in this plugin
/anonymize-repoExport an anonymized, history-free snapshot of a research repository for double-blind review — drop internal files, scrub names from text and Office/PDF metadata, scan for anything identifying, and check that the snapshot still builds. Use when a paper under anonymous review needs a code-and-data link, or the user asks to anonymize a repo, prepare an anonymous or private review repo, or link code for reviewers./arxiv-metadataFetch structured metadata for an arXiv paper. Use when you have an arXiv ID or URL and need title, authors, date, categories, and DOI./arxiv-prepPrepare a LaTeX paper's source package and metadata for arXiv. Use when the user is ready to upload a paper or wants an arXiv-compatible staging copy, archive, and compilation check./scholar-kit:accessible-pdffrom scholar-kit
npx claudepluginhub yy/scholar-kit --plugin scholar-kitOther plugins' skills for the same job