20
0
Commit Graph

130 Commits

Author SHA1 Message Date
275844de5e Merge branch 'master' into knitr 2026-08-13 18:21:43 -07:00
4ae0bddb40 README: point the verification section at veraPDF
The section previously led with a pikepdf one-liner and described
veraPDF as unavailable because it is not in Debian. It is available,
just not from apt, and it is the only check that actually tests the
PDF/UA-2 claim these templates make rather than merely confirming a
structure tree exists.

Verified against the templates: all four tagged builds pass ua2, and
the pre-fix builds of the paper and memo fail it. So this check would
have caught the untagged-but-declared-UA-2 state at any point; it was
simply never run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 18:21:38 -07:00
7a3e5f4f83 paper_template (knitr): tag the kable table, show fig.alt for chunks
The merge from master brought in a static demo table and a LaTeX-only
figure example, neither of which suits this branch. This adapts them to
knitr.

\tagpdfsetup{table/header-rows={1}} now sits above the existing kable
table rather than above a hand-written duplicate, which is the case a
reader of this branch actually has: kable emits the column names as a
single header row, so those cells become TH and a screen reader can
announce which column a value belongs to. Verified in the built PDF,
which now carries two TH cells alongside its twelve TD.

The figure example gains the knitr form. A chunk passes its
description through the fig.alt option, which knitr writes into the
\includegraphics call it generates; the file-inclusion form is kept
alongside it for figures that do not come from a chunk. Both are
commented out, so knitr does not try to evaluate a plot of data the
template does not ship.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 18:18:37 -07:00
2b05964b0a Merge branch 'master' into knitr
# Conflicts:
#	README
2026-08-13 18:18:25 -07:00
b94d69f6a3 README: document what makes the tagging work, and what defeats it
Records that tagging=on is the key doing the work and pdfstandard=ua-2
only writes the claim, since setting the second without the first is
the failure this series fixes and is easy to reintroduce.

Adds the TeX Live 2025 requirement to Dependencies, including that
Debian trixie ships 2024 and that Overleaf projects choose their TeX
Live version in the settings menu and do not always default high
enough.

Adds sections on writing an accessible document (headings, alt text,
table header rows), on customizing the styles, and on verifying that a
PDF really carries structure. The customizing section names titlesec
and titling specifically: they are the obvious tools for the job the
two style files do, and they break tagging silently.

Notes that the poster is not accessible and makes no claim.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 18:16:01 -07:00
3fe02af221 poster_template: drop the PDF/UA-2 claim beamer cannot honour
The poster declared \DocumentMetadata with pdfstandard=ua-2 and patched
the frametitle template to emit H1 tags. On TeX Live 2024 that produced
an untagged PDF carrying an accessibility claim it did not meet. On TeX
Live 2025, which is what Overleaf runs, it does not build at all:

  ! Class beamer Error: The beamer class is not compatible with
    \DocumentMetadata

The LaTeX Tagging Project lists beamer and beamerposter as no-support,
meaning incompatible and not expected to change, and beamerposter pulls
in textpos and subfig which are incompatible in their own right. There
is no fix available, so the template now makes no claim and says why.
Removing the block also gets the poster building again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 18:16:01 -07:00
331b6525af paper_template: enable tagging, add alt text and header row examples
Switches to \DocumentMetadata{tagging=on} for the reasons described in
the previous commit; the structure tree went from /Document plus eleven
/Link nodes to three headings, twenty paragraphs, a tagged list and the
abstract as a block quote.

Adds a worked example of the two things tagging cannot do for an
author. A data table carries \tagpdfsetup{table/header-rows={1}}, which
makes its first row TH rather than TD so a screen reader can announce
which column a value belongs to. A commented-out figure shows the alt=
argument to \includegraphics, which is what gets announced in place of
an image; it is left commented so the template does not have to ship a
binary, and mentions [artifact] for decorative images.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 18:15:48 -07:00
0a43387d2e memo, letter: enable tagging with \DocumentMetadata{tagging=on}
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>
2026-08-13 18:15:48 -07:00
1a469bac1b cdsc-paper.sty, cdsc-memo.sty: build headings without titlesec
The tagging code hooks \@startsection to emit the H1/H2/H3 tags that a
screen reader navigates by. titlesec replaces \section wholesale rather
than going through that hook, so every heading vanished from the
structure tree --- with no error to say so, which is why this went
unnoticed. titling separately left an unclosed trivlist behind its
\flushleft declarations, producing "the number of automatic begin and
end text-unit para hooks differ" and a mis-nested tree.

Both files now style headings through \@startsection and the title
block through \@maketitle, using the class's own hooks. The style
argument of \@startsection is applied to the whole heading, so the
memo's uppercase headings append \MakeUppercase to it; the tagging code
wraps the section number in \NoCaseChange so the number is left alone.

Vertical spacing was matched against the previous output page by page:
the memo now renders identically bar one heading a pixel off, and the
paper's title block lands within two pixels.

datetime is dropped from cdsc-paper.sty. Only \today was ever used from
it and that is built in.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 18:15:33 -07:00
172cd5c4e5 templates: swap EB Garamond for Libertinus Serif
EB Garamond's bold weight ships with only 127 cmapped glyphs --- no
Latin Extended-A, no Vietnamese, no Greek, no Cyrillic, no fi/fl
ligatures --- so any bold text containing accented characters
(Polish, Czech, Vietnamese, etc., as well as bold author names in
citations) renders as tofu boxes or font-fallback substitutions.

Switch the default body font in paper_template, memo_template, and
letter_template to Libertinus Serif. It ships in texlive-fonts-extra,
has comprehensive Latin / Vietnamese / Greek / Cyrillic coverage in
every weight, and includes all the standard f-ligatures explicitly.

Each template also picks up a commented-out
\\setmainfont{Garamond Premier Pro} block plus a short note: Adobe
Garamond Premier Pro is Mako's preferred body font but is commercial
and not redistributable, so the public templates default to
Libertinus and CDSC members can swap in once they have the font
installed (e.g., in ~/.fonts/).

README updated to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 16:07:36 -07:00
c95896bd50 templates: swap EB Garamond for Libertinus Serif
EB Garamond's bold weight ships with only 127 cmapped glyphs --- no
Latin Extended-A, no Vietnamese, no Greek, no Cyrillic, no fi/fl
ligatures --- so any bold text containing accented characters
(Polish, Czech, Vietnamese, etc., as well as bold author names in
citations) renders as tofu boxes or font-fallback substitutions.

Switch the default body font in paper_template, memo_template, and
letter_template to Libertinus Serif. It ships in texlive-fonts-extra,
has comprehensive Latin / Vietnamese / Greek / Cyrillic coverage in
every weight, and includes all the standard f-ligatures explicitly.

Each template also picks up a commented-out
\\setmainfont{Garamond Premier Pro} block plus a short note: Adobe
Garamond Premier Pro is Mako's preferred body font but is commercial
and not redistributable, so the public templates default to
Libertinus and CDSC members can swap in once they have the font
installed (e.g., in ~/.fonts/).

README updated to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 15:59:55 -07:00
1c2bcf3929 Merge branch 'master' into knitr
Bring the knitr branch fully in sync with master: pulls in the memo
template, the article-class letter template, the README and script
updates (assignment -> memo), the embed-fonts pass on the poster
figure PDFs, and the wiki_page.wiki deletion.

Two small conflicts resolved by hand:

- paper_template/text.Rtex: git detected the rename text.tex ->
  text.Rtex and conflicted only around the knitr <<init>>= chunk,
  which is absent on master. Keep the chunk.
- paper_template/Makefile: whitespace-only conflict on the
  '%.pdf: %.tex' rule (master's version had a trailing space).
  Keep the trimmed version.

Built paper_template (with knitr) and letter_template; both are
UA-2 compliant under the merged state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 14:58:31 -07:00
a3e469ca3f paper_template (knitr): port to master's article + lualatex stack
Bring the knitr paper template up to date with the typography work
on master. The preamble now mirrors master's paper_template/text.tex:

- \DocumentMetadata{pdfstandard=ua-2} + tagpdf instead of the old
  memoir / pdfmanagement-only setup
- article class with cdsc-paper.sty (the article-class replacement
  for cdsc-memoir.sty added on master)
- fontspec with EB Garamond and TeX Gyre Heros, plus
  \defaultfontfeatures{Ligatures=TeX} so --, ---, ``, '' work
- Makefile builds with latexmk -lualatex instead of -pdf

The knitr-specific bits are preserved unchanged:

- <<init>>= chunk for knit_hooks and resources/preamble.R
- <<test_table>>= chunk demonstrating kable inside a table float
- %.tex: %.Rtex pattern rule for knit() in the Makefile

verapdf --flavour ua2: 0 failures, 1723 passed rules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 09:47:22 -07:00
6ee5dbd35d templates: enable TeX input ligatures with fontspec
fontspec does not enable the classic TeX input ligatures by default,
so under lualatex our existing -- / --- / `` / '' input was being
typeset as literal hyphens and straight quotes rather than en-dashes,
em-dashes, and curly quotes.

Add \defaultfontfeatures{Ligatures=TeX} right after \usepackage{fontspec}
in each template that loads fontspec (paper, memo, and letter). The
poster template uses beamer's default fonts (Latin Modern under
lualatex), where TeX ligatures already work via the font tables, so
no change there.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 18:22:42 -07:00
22832af588 removed wiki page 2026-04-26 12:43:05 -07:00
dab1be34c5 README: reflect memo template, drop memoir incompatibility note
- Replace assignment_template references with memo_template.
- Update the type list in the new_tex_document section.
- Update the aliases section (new_tex_assignment -> new_tex_memo).
- Drop the migration entry for the assignment script.
- Rewrite the Accessibility section: now all four templates are
  PDF/UA-2 compliant (paper and memo were ported off memoir to the
  article class with custom .sty files), so the memoir-blocked
  caveat no longer applies.
- Add poster to the master-branch templates list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:34:19 -07:00
0aee418e2a new_tex_document, cdsc_tex_aliases.sh: assignment -> memo
Update the script and the alias file to match the rename of
assignment_template to memo_template. The 'assignment' type is
replaced by 'memo' in new_tex_document; the new_tex_assignment
alias becomes new_tex_memo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:34:11 -07:00
1e79d8d0f6 memo_template: add new article-class memo template
Replaces the assignment_template with a memo-format template based
on the article class. The look-and-feel is ported from the old
cdsc-memo chapterstyle in cdsc-memoir.sty: a single-line "TITLE
[hfill] AUTHOR" header and sans-serif uppercase section headings.

Like the migrated paper_template, this builds with lualatex and
produces a tagged, PDF/UA-2 compliant PDF. verapdf --flavour ua2:
0 failures, 1723 passed rules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:33:37 -07:00
c0406f157f paper_template: migrate to article class with full UA-2 tagging
Drops the memoir class in favor of the standard article class so the
LaTeX tagging-project can produce fully tagged PDFs. The metadata-only
\\DeclareDocumentMetadata workaround is replaced by the full
\\DocumentMetadata{pdfstandard=ua-2} path with tagpdf activated.

text.tex is now built against cdsc-paper.sty (added in the previous
commit); cdsc-memoir.sty is removed. Other changes:

- pdftitle/pdfauthor are set explicitly in \\hypersetup. UA-2 strict
  mode requires dc:title in the XMP packet, and pdfusetitle does not
  propagate \\title{}/\\author{} into XMP under this setup.
- The memoir-only \\firmlists call is dropped (cdsc-paper.sty handles
  list spacing via enumitem).
- The memoir-only \\prebibhook reference is removed from defbibheading.

verapdf --flavour ua2: 0 failures, 1723 passed rules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 11:21:42 -07:00
6643132141 paper_template: add cdsc-paper.sty (article-class style)
This is an article-class equivalent of the cdsc-article chapterstyle
from cdsc-memoir.sty, written so the paper template can drop memoir
(which is incompatible with the LaTeX tagging-project) while keeping
the same look and feel.

Uses titlesec for section heads, titling for the title block,
fancyhdr for the page styles, enumitem for tighter list spacing,
and caption for the caption font. The runin abstract and \\published
note hooks behave the same as before.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 11:15:53 -07:00
cc993ca40d README: document lualatex requirement and accessibility status
Adds texlive-luatex to the Debian dependency list, documents the
switch to LuaLaTeX + EB Garamond/TeX Gyre Heros, and adds a new
Accessibility section describing which templates produce tagged
PDF/UA-2 output and why the memoir-based templates don't (yet).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:14:46 -07:00
c316de3312 paper + assignment: add PDF metadata via pdfmanagement-testphase
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 <noreply@anthropic.com>
2026-04-12 21:14:38 -07:00
c4a709c22c poster_template: add tagged PDF (PDF/UA-2) accessibility
Enables \DocumentMetadata (pdfversion=2.0, pdfstandard=ua-2) and
tagpdf with activate-all. Adds an H1 structure tag around every
frame title via \addtobeamertemplate, wraps the overlay-only tikz
helpers (\marktopleft, \markbottomright, \credit) in artifact tags
so they don't pollute the reading order, and adds alt text to each
\includegraphics. Verified compliant with verapdf's PDF/UA-2 profile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:13:50 -07:00
2b29f051a6 letter_template: add tagged PDF (PDF/UA-2) accessibility
Enables \DocumentMetadata (pdfversion=2.0, pdfstandard=ua-2) and loads
tagpdf with activate-all, plus hyperref metadata (pdftitle, pdfauthor,
pdflang, pdfdisplaydoctitle) since the letter class does not expose
\title/\author for the PDF management layer to pick up. Verified
compliant with verapdf's PDF/UA-2 profile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:12:22 -07:00
a0674e7f87 Switch templates to LuaLaTeX with fontspec
Moves paper, assignment, and letter templates from pdflatex to
lualatex, and replaces the Type-1 font setup (mathdesign/garamond,
ucs/utf8x, T1 fontenc) with fontspec using EB Garamond for the main
font and TeX Gyre Heros for sans. This produces PDFs whose text
extracts cleanly and is a prerequisite for tagged/accessible PDF
output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:11:51 -07:00
27e9bc3254 Drop Type-1 font defaults from cdsc-memoir.sty and mako-mem.sty
These set \rmdefault=ugm (URW Garamond) and \sfdefault=phv (Helvetica),
which only take effect under pdflatex. Under the lualatex workflow
adopted elsewhere, text fonts are selected via fontspec in the
template's main .tex file, and these defaults were dead code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:11:28 -07:00
bd8fa11def poster_template: embed fonts in example figure PDFs
The bundled example figures referenced base-14 Helvetica without
embedding it, which blocks PDF/UA-2 compliance for any poster that
includes them. Regenerated via ~/bin/embed-fonts (ghostscript with
-dEmbedAllFonts=true).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:11:21 -07:00
f43488ef70 poster_template: comment out biblatex-dependent stanza
\DeclareLanguageMapping and \defbibheading come from biblatex, which the
template does not load. The template has failed to compile without local
edits for some time as a result.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:11:14 -07:00
34b6fe4401 Remove duplicate assignment_template/HW1.tex
HW1.tex was identical to text.tex except for a stale author name
(TeGrotenhuis vs. TeBlunthuis). new_tex_document only uses text.tex
and renames it on checkout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:07:57 -07:00
887dfdfa8b Merge branch 'master' into knitr 2026-03-29 10:31:59 -07:00
3b444f70fc Consolidate document creation scripts and fix bugs
Replace the individual new_knitr_document, new_tex_assignment, and
new_tex_letter scripts with a single new_tex_document script that takes
a document type as its first argument. Fix bugs present in all scripts:
unquoted variables, TMPDIR name collision, missing existence checks, and
mktemp running unconditionally. Add cdsc_tex_aliases.sh for backwards
compatibility with old script names. Add rename_tex_to_dirname script
(moved from ~/bin). Update README and wiki page to reflect new setup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 10:31:08 -07:00
9b5ca55478 Merge branch 'master' into knitr 2026-03-23 12:49:32 +09:00
86fbf0f0a6 remove deprecated option to xcolor (usenames) 2026-03-23 12:48:34 +09:00
da76fb674e remove deprecated option to xcolor (usenames) 2026-03-23 12:47:39 +09:00
5af07a555f Merge branch 'master' into knitr
moving both versions from color to xcolor
2026-03-21 16:04:59 +09:00
5d115f3b36 move from color to xcolor 2026-03-21 16:03:32 +09:00
d8e90cd7d3 Merge branch 'master' into knitr 2026-03-21 16:01:47 +09:00
c92fd3b8be Merge branch 'knitr' of ssh://gitea.communitydata.science:2200/collective/cdsc_tex into knitr 2026-03-21 16:01:09 +09:00
ec596703e2 fix color hook for newer knitr versions
Newer knitr injects \usepackage[]{xcolor} instead of \usepackage[]{color},
so the old hook never matched and dvipsnames colors (e.g. Blue) were undefined.
2026-03-21 15:55:24 +09:00
1eb1a43806 updated README file 2025-11-01 12:06:30 -07:00
a2b3c971ce Merge branch 'master' of code.communitydata.cc:cdsc_tex 2022-10-10 14:24:33 -07:00
fc3ab6b8d6 added a version of a single slide template (based on kaylea's taboo topics) 2022-10-10 14:24:02 -07:00
c3e2622e1d set vertical whitespace around subsection headers to be the same as section headers in memos. 2020-06-16 17:13:22 -07:00
34433f5b82 deleted revealjs presentation file
- the branch itself is incomplete
- shouldn't be in our tex repository anyway
2019-08-08 11:01:34 -07:00
32d383d928 Merge branch 'master' of code.communitydata.cc:cdsc_tex 2019-08-08 10:53:43 -07:00
eb509bcfb8 changed sharelatex mode to overleaf mode 2019-08-08 10:53:40 -07:00
9bcc8f35bf updated copyright in script 2018-12-14 18:33:47 -08:00
Jeremy Foote
ee4ba6c2b4 Changing to Rtex 2018-08-30 15:45:19 -05:00
Jeremy Foote
76674241c8 Starting to switch knitr to Rtex 2018-08-30 15:43:49 -05:00
Jeremy Foote
3a16b40a5c Adding revealjs option 2018-08-30 15:43:19 -05:00