graph LR A["Markdown\n Content"] --> B["Remark.js\n Engine"] B --> C["HTML5\n Slideshow"] C --> D["Full-Screen\n Presentation"] style A fill:#4caf50 style B fill:#ff9800 style C fill:#2196f3 style D fill:#9c27b0
flowchart LR A["Write\n Markdown"] --> B["Wrap in\n HTML"] B --> C["Open in\n Browser"] C --> D[Present!] subgraph "Your Content" A end subgraph "Setup (one-time)" B end subgraph "Delivery" C --> D end style A fill:#4caf50 style B fill:#ff9800 style C fill:#2196f3 style D fill:#9c27b0
graph TD A[Source] --> B{Decision} B -->|Yes| C[Process] B -->|No| D[Alternative] C --> E[Output] D --> E style A fill:#ff9800 style B fill:#f44336 style C fill:#4caf50 style D fill:#2196f3 style E fill:#9c27b0
graph LR A[Hello] --> B[World]
` preserves whitespace inside the `` 3. A custom script (`mermaid-init.js`) reads each `.mermaid` element 4. It calls `mermaid.render()` to produce the SVG --- ### ๐ Two-Column Layouts Use `.pull-left` / `.pull-right` for side-by-side content: .font-sm.mb-xs[ ```markdown .pull-left[ **Left Column** โ - Point A - Point B ] .pull-right[ **Right Column** ๐ต - Point C - Point D ] ``` ] #### Rendered Result: .pull-left[ **Left Column** โ - Point A - Point B **Use cases:** - Code + output comparison - Pros vs cons - Image + description ] .pull-right[ **Right Column** ๐ต - Point C - Point D **Use cases:** - Before/after - Question/answer - Data + visualization ] --- ### ๐๏ธ Configuration & Navigation Remark.js is highly configurable: ```javascript var slideshow = remark.create({ ratio: '16:10', // 16:9 or 16:10 highlightStyle: 'tomorrow-night-blue', highlightLines: true, countIncrementalSlides: false, navigation: { scroll: false, // Disable scroll navigation touch: true, // Enable swipe on touch devices click: false, // Disable click navigation }, }); ``` --- #### Keyboard Shortcuts โจ๏ธ | Key | Action | |-----|--------| | โ, PgDn, Space | Next slide | | โ, PgUp | Previous slide | | f | Toggle fullscreen | | c | Clone slideshow | | p | Toggle presenter notes | | t | Reset timer | | 1-9 | Jump to slide N | --- ### ๐ ๏ธ Creating Your First Presentation **Step 1:** Write your slides in Markdown .font-sm.mb-xs[ ```markdown ## My First Slide Hello, world! --- ## My Second Slide - Point one - Point two ``` ] **Step 2:** Wrap in minimal HTML .font-sm.mb-xs[ ```text <body> <textarea id="source"> <!-- Your markdown here --> </textarea> <script src="https://remarkjs.com/downloads/remark-latest.min.js"></script> <script>var slideshow = remark.create();</script> </body> ``` ] **Step 3:** Open in browser ๐ That's it! ๐ No build tools, no dependencies. --- ### ๐ Publishing to GitHub Pages **Static site deployment โ the easiest hosting:** ```text your-repo/ โโโ index.html โ Your remark HTML โโโ my-slides.md โ (optional) external source โโโ js/ โ โโโ remark.min.js โโโ css/ โ โโโ nord-dark.css โโโ images/ โโโ diagram.svg ``` .mermaid[ graph LR A[Write Slides] --> B[Commit to Git] B --> C[Push to GitHub] C --> D[GitHub Pages] D --> E["Worldwide\n Access!"] style A fill:#4caf50 style B fill:#ff9800 style C fill:#2196f3 style D fill:#9c27b0 style E fill:#f44336 ] **Best of all:** No build step, no server-side processing. Pure static files! ๐ฏ --- ### ๐ Remark.js vs reveal.js .pull-left[ **Remark.js** ๐ - โ **Simpler** โ less config, more convention - โ **Smaller** โ ~30KB minified - โ **Better for basic slides** โ fast setup - โ **Cleaner output** โ less HTML pollution - ๐ก **Mermaid requires workaround** ] .pull-right[ **reveal.js** ๐ญ - โ **More features** โ transitions, fragments, speaker view - โ **Larger ecosystem** โ more plugins - โ **Built-in mermaid support** - โ **Heavier** โ ~150KB+ with dependencies - โ **More boilerplate** โ HTML structure is complex ] --- ### ๐ Summary .pull-left[ **What We Learned** ๐ 1. **Remark.js** turns Markdown into HTML slides ๐ซ 2. **Slide separators**: `---` creates new slides 3. **CSS classes**: `nord-dark`, `nord-light`, `middle`, `center` 4. **KaTeX**: Beautiful math with `$...$` and `$$...$$` 5. **Mermaid**: Diagrams from text with `.mermaid[]` 6. **Config**: Navigation, themes, ratios 7. **Publishing**: Static files on GitHub Pages ] .pull-right[ **Multi-Language Support** ๐ ```python # Python print("Hello, Remark!") ``` ```javascript // JavaScript console.log("Hello, Remark!"); ``` ```rust // Rust fn main() { println!("Hello, Remark!"); } ``` **What to Do Next** ๐ - ๐ Read: [remarkjs.com](https://remarkjs.com) - ๐จ Browse: [luk036.github.io](https://luk036.github.io) - โ๏ธ Create: Your own presentation! ] --- ### ๐ References & Resources .pull-left[ **Official** ๐ - [Remark.js Wiki](https://github.com/gnab/remark/wiki) - [KaTeX Documentation](https://katex.org/docs/) - [Mermaid.js Docs](https://mermaid.js.org/) **Site Examples** ๐ฏ - `net_optim/quickstart.html` - `phys_des/timing-closure-remark.html` - `phys_des/dme_algorithm-remark.html` ] .pull-right[ **CSS Themes** ๐จ - [Nord Theme](https://www.nordtheme.com/) - Nord dark/light variant - Custom `style.css` **Tools** ๐ ๏ธ - Prettier for formatting - SVGO for SVG optimization - Python conversion scripts .mermaid[ graph TD R[Remark.js] --> K[KaTeX] R --> M[Mermaid] R --> C[CSS Themes] K --> E[Equations] M --> D[Diagrams] style R fill:#ff9800 style K fill:#4caf50 style M fill:#2196f3 ] ] --- count: false class: nord-dark, middle, center ### Thank you! ๐ **Start creating your Remark.js presentations today!** > Markdown is the new PowerPoint. โจ ๐ [github.com/gnab/remark](https://github.com/gnab/remark)
graph LR A[Write Slides] --> B[Commit to Git] B --> C[Push to GitHub] C --> D[GitHub Pages] D --> E["Worldwide\n Access!"] style A fill:#4caf50 style B fill:#ff9800 style C fill:#2196f3 style D fill:#9c27b0 style E fill:#f44336
]` 6. **Config**: Navigation, themes, ratios 7. **Publishing**: Static files on GitHub Pages ] .pull-right[ **Multi-Language Support** ๐ ```python # Python print("Hello, Remark!") ``` ```javascript // JavaScript console.log("Hello, Remark!"); ``` ```rust // Rust fn main() { println!("Hello, Remark!"); } ``` **What to Do Next** ๐ - ๐ Read: [remarkjs.com](https://remarkjs.com) - ๐จ Browse: [luk036.github.io](https://luk036.github.io) - โ๏ธ Create: Your own presentation! ] --- ### ๐ References & Resources .pull-left[ **Official** ๐ - [Remark.js Wiki](https://github.com/gnab/remark/wiki) - [KaTeX Documentation](https://katex.org/docs/) - [Mermaid.js Docs](https://mermaid.js.org/) **Site Examples** ๐ฏ - `net_optim/quickstart.html` - `phys_des/timing-closure-remark.html` - `phys_des/dme_algorithm-remark.html` ] .pull-right[ **CSS Themes** ๐จ - [Nord Theme](https://www.nordtheme.com/) - Nord dark/light variant - Custom `style.css` **Tools** ๐ ๏ธ - Prettier for formatting - SVGO for SVG optimization - Python conversion scripts .mermaid[ graph TD R[Remark.js] --> K[KaTeX] R --> M[Mermaid] R --> C[CSS Themes] K --> E[Equations] M --> D[Diagrams] style R fill:#ff9800 style K fill:#4caf50 style M fill:#2196f3 ] ] --- count: false class: nord-dark, middle, center ### Thank you! ๐ **Start creating your Remark.js presentations today!** > Markdown is the new PowerPoint. โจ ๐ [github.com/gnab/remark](https://github.com/gnab/remark)
graph TD R[Remark.js] --> K[KaTeX] R --> M[Mermaid] R --> C[CSS Themes] K --> E[Equations] M --> D[Diagrams] style R fill:#ff9800 style K fill:#4caf50 style M fill:#2196f3