Skip to content

Make handout figure PDFs reproducible#98

Merged
PatrikBak merged 1 commit into
mainfrom
patrik/asy-deterministic-pdfs
May 14, 2026
Merged

Make handout figure PDFs reproducible#98
PatrikBak merged 1 commit into
mainfrom
patrik/asy-deterministic-pdfs

Conversation

@PatrikBak
Copy link
Copy Markdown
Owner

Summary

  • asy's bundled Ghostscript stamps /CreationDate, /ModDate, /ID, and the embedded XMP metadata with wall-clock values, producing a spurious diff on every re-render of an unchanged .asy.
  • The Windows Ghostscript builds available here (asy's bundled 10.x and MiKTeX's 9.25) ignore SOURCE_DATE_EPOCH and the -dOmit* flags, so the export script now post-patches those fields in place using values derived from the .asy mtime and a SHA-256 of its contents. Same source -> same PDF, byte-for-byte.
  • Bundled one-off re-render of all 27 figure PDFs with the new deterministic metadata so future re-renders stay byte-stable.

Generated with Claude Code

asy's bundled Ghostscript stamps /CreationDate, /ModDate, /ID, and
the embedded XMP metadata with wall-clock values, producing a
spurious diff on every re-render. The Windows GS builds available
here ignore SOURCE_DATE_EPOCH and the -dOmit* flags, so the export
script now patches those fields in place using values derived from
the .asy mtime and a SHA-256 of its contents - same source, same PDF.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
math-comps Ready Ready Preview, Comment May 14, 2026 0:49am

@PatrikBak PatrikBak enabled auto-merge May 14, 2026 00:48
@PatrikBak PatrikBak merged commit fb5ce87 into main May 14, 2026
4 checks passed
@PatrikBak PatrikBak deleted the patrik/asy-deterministic-pdfs branch May 14, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant