Search code examples
htmlmarkdownslideshowpandoc

pandoc incremental option on code block in html slideshow


I have a simple markdown slideshow I convert to html with pandoc

$ cat slides.md
% My lovely presentation

# My lovely first slide
- first bullet
- second bullet
- third bullet
```c
for (int i=0;i<10;i++) { ... }
``
$ pandoc -i -t slidy -s slides.md -o slides.html

I want the code block to appear after the third bullet, but it's there from the start. Is it doable?


Solution

  • You can add it as part of a fourth bullet point:

    % My lovely presentation
    
    # My lovely first slide
    
    - first bullet
    - second bullet
    - third bullet
    - ```c
      for (int i=0;i<10;i++) { ... }
      ```
    

    see https://pandoc.org/MANUAL.html#incremental-lists