Skip to content

Conversation

@Data-Wise
Copy link
Owner

Summary

  • Adds functionality to convert existing lecture .qmd files to RevealJS slides
  • Preserves R code chunks, callouts, columns, and content structure
  • Supports multi-part weeks from teach-config.yml
  • Includes dry-run mode for content analysis preview

Key Features

Command Description
teach slides --week N Auto-detect lecture files from config
teach slides --from-lecture FILE Convert specific file
teach slides --week N --dry-run Preview content analysis

Content Preservation

  • R code chunks (critical for statistics examples)
  • Callout boxes converted to slide-friendly format
  • TL;DR boxes → callout-tip
  • Checkpoint questions → callout-warning
  • Column layouts preserved

Technical Details

  • Parses YAML frontmatter using yq for clean extraction
  • Handles multi-part weeks defined in teach-config.yml
  • Generates RevealJS YAML header with proper formatting
  • Regex patterns properly quoted for zsh compatibility

Test plan

  • Tested with Week 1 multi-part lecture (2 files)
  • Dry-run shows correct content analysis
  • Generated slides have proper YAML header
  • R code chunks preserved in output
  • zsh syntax validation passes

🤖 Generated with Claude Code

Test User and others added 2 commits January 20, 2026 13:57
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 pushed a commit that referenced this pull request Jan 21, 2026
- Added Track A: Intelligent Content Analysis (teach analyze Phase 0)
  - Brainstorm + spec + planning complete (~3 hours)
  - Branch: feature/teach-analyze (created)
  - Ready for 4-5 hour implementation

- Added Track B: Comprehensive Help System (ready for implementation)
  - Can proceed in parallel with Track A

- Updated worktree status (6 active worktrees)
  - teach-analyze: NEW - Ready for Phase 0
  - comprehensive-help: Ready for implementation
  - quarto-workflow: Complete - Ready for PR
  - feature-lecture-to-slides: Complete - PR #280

- Updated version roadmap
  - v5.15.0: Dual track implementation
  - v4.7.0: Quarto Phase 2 + PR #280 ready

- Added session history (2026-01-20)
  - 8 key accomplishments
  - 5 deliverables created (~5,000 lines)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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