Skip to content

Conversation

@Data-Wise
Copy link
Owner

Summary

  • Add teach slides --from-lecture <file> to convert lecture .qmd files to RevealJS slides
  • Add teach slides --week N to auto-detect and convert lecture files from teach-config.yml
  • Preserve R code chunks, callouts, and mathematical notation
  • Fix LaTeX backslash preservation (printf instead of echo)

Key Features

  • Auto-detection: --week N looks up lecture files from config
  • Multi-part support: Handles weeks with multiple lecture parts
  • Dry-run mode: Preview content analysis before generating
  • LaTeX preservation: Uses printf to prevent backslash interpretation

Testing

  • Functional tests pass (dry-run, generation, LaTeX preservation)
  • All existing tests pass (37 cc-dispatcher, 20 pick, 33 teach-dates)
  • Manual verification of generated slide output

Usage

# Convert specific file
teach slides --from-lecture lectures/week-05.qmd

# Auto-detect from config by week
teach slides --week 5

# Preview without generating
teach slides --from-lecture lectures/week-05.qmd --dry-run

Previous PR

This re-submits the work from closed PR #280 after rebasing on current dev.


🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Test User and others added 2 commits January 21, 2026 16:03
Adds new functionality to convert existing lecture .qmd files to
RevealJS slides, preserving R code chunks, callouts, and structure.

Features:
- `teach slides --week N` auto-detects lecture files from teach-config.yml
- `teach slides --from-lecture FILE` converts specific files
- `--dry-run` shows content analysis before generating
- Multi-part weeks (defined in config) generate separate slide files
- Preserves R code chunks for statistics examples
- Converts H1 to section slides, H2 to regular slides
- Handles callouts, columns, and TL;DR boxes

Usage:
  teach slides --week 1 --dry-run    # Preview
  teach slides --week 1              # Generate
  teach slides --from-lecture lectures/week-02_crd.qmd

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace echo with printf '%s\n' to prevent escape sequence interpretation.
echo interprets backslash sequences like \t, \b, \v, \a, \u as control
characters, which corrupts LaTeX commands:
  - \tau → tab + "au"
  - \beta → backspace + "eta"
  - \varepsilon → vertical tab + "arepsilon"
  - \underbrace → unicode escape + "nderbrace"
  - \alpha → bell + "lpha"

printf '%s\n' treats the string literally, preserving all backslashes.

Fixes corruption observed when converting lecture notes with mathematical
formulas to RevealJS slides.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Data-Wise Data-Wise merged commit e585d28 into dev Jan 21, 2026
1 check 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.

2 participants