Skip to content

Add HTML version of lab manual with GitHub Pages deployment#178

Merged
jeremymanning merged 3 commits intomasterfrom
feature/html-version
Dec 5, 2025
Merged

Add HTML version of lab manual with GitHub Pages deployment#178
jeremymanning merged 3 commits intomasterfrom
feature/html-version

Conversation

@jeremymanning
Copy link
Member

Summary

  • Implements HTML version of the lab manual using make4ht (TeX4ht build system) to convert LaTeX to HTML
  • Adds automatic GitHub Pages deployment triggered on pushes to master
  • Applies Tufte-CSS styling for proper margin notes, sidenotes, and responsive design
  • Includes JavaScript-based table of contents generation (workaround for TeX4ht limitations with starred sections)

Closes #104

Changes

  • tufte.cfg: TeX4ht configuration file mapping Tufte-LaTeX commands to Tufte-CSS HTML equivalents
  • lab-manual.css: Custom CSS for Dartmouth green links, logo sizing, and responsive behavior
  • toc.js: JavaScript for dynamic table of contents generation from h2 headings
  • .github/workflows/build-html.yml: GitHub Actions workflow for automated HTML build and Pages deployment
  • README.md: Updated with link to HTML version

Features

  • Margin notes appear in right margin on desktop
  • Mobile-responsive: margin notes collapse with toggle (⊕) on small screens
  • Table of contents with working anchor links
  • Properly sized lab logo
  • ET Book fonts and Tufte typography

Test plan

  • Verify GitHub Actions workflow runs successfully on merge
  • Verify HTML is accessible at GitHub Pages URL
  • Test responsive behavior on mobile devices
  • Verify table of contents links work
  • Verify margin notes display correctly

🤖 Generated with Claude Code

jeremymanning and others added 2 commits December 5, 2025 15:04
- Add GitHub Actions workflow to convert LaTeX to HTML using make4ht
- Add tufte.cfg configuration for tufte-css styled output
- Deploy HTML to GitHub Pages on push to master
- Add CLAUDE.md with repository guidance
- Update README with link to HTML version
- Update .gitignore with TeX4ht build artifacts

The HTML version is automatically kept in sync with the LaTeX source.
Contributors only need to edit lab_manual.tex.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add toc.js for JavaScript-based TOC generation (TeX4ht's TableOfContents
  doesn't work with tufte-book's starred sections)
- Fix margin toggle symbol encoding by using Unicode directly instead of
  escaped HTML entity
- Update workflow to copy toc.js and trigger on CSS/JS file changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The make4ht-action Docker image has an internal Lua error
('attempt to call a nil value'). Switch to installing TeX Live
packages directly on the Ubuntu runner.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jeremymanning jeremymanning merged commit 2e677ea into master Dec 5, 2025
5 checks passed
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.

create a parallel html version of the lab manual that's kept in sync with the latex version

1 participant