2

I'm trying to create a beamer presentation using pandoc + markdown. I want a sidebar that displays the sections of my presentation.

Something like this (desired output, not mine):

If I click on any of the links in the sidebar, it takes me to that section, which isn't necessarily named like the thing in the sidebar.

I've come up with this after some digging in the beamer documentation and net:

--- title: "Your Presentation Title" author: "Your Name" date: "October 2024" output: beamer header-includes: - \usetheme{Berkeley} - \usecolortheme{sidebartab}{\insertsectionnavigation} --- # Introduction This slide provides an introduction to the topic. # Functions ## What are Functions? A function is a block of code that performs a specific task. 

Corresponding pandoc code:

pandoc -t beamer -o beamer.tex testing_beamer_themes.md -s --mathml 

However this only displays the title and author in the sidebar, not the frames.

4
  • 1
    Welcome to TeX.SE! Can you please show the resulting TeX code? Did you get error messages? Commented Oct 19, 2024 at 17:37
  • \usecolortheme does not look like the right command to add structural information into the side-bar. Commented Oct 19, 2024 at 17:37
  • @Mensch , the resulting TeX code doesnt show any errors upon compiling , in overleaf atleast Commented Oct 19, 2024 at 18:57
  • @PuzzleheadedSoup-98 The \usecolortheme{sidebartab}{\insertsectionnavigation} will definitely cause an error, overleaf unfortunately is just good at hiding errors. Always check the top right corner for the tiny red square. Commented Oct 19, 2024 at 19:00

1 Answer 1

2

The sidebar shows sections and subsections, not frames. Add a (sub-)section before each of your frames and you'll see them in the sidebar:

--- title: "Your Presentation Title" author: "Your Name" date: "October 2024" output: beamer_presentation header-includes: - \usetheme{Berkeley} - \AtBeginSection[]{} - \AtBeginSubsection[]{} --- # Big Section ## Introduction ### Introduction This slide provides an introduction to the topic. # Functions ### Functions #### What are Functions? A function is a block of code that performs a specific task. 

enter image description here

6
  • this works ! but how would i add subsections in the sidebar ? something like "types of relations" under "Relations on Sets" in the pic i uploaded Commented Oct 19, 2024 at 18:54
  • Use ## whatever to add a subsection and then increase the level of all the following headings by one. Commented Oct 19, 2024 at 18:57
  • pandoc is rendering anything after the title of the slide as a phantomsection instead of subsection : \phantomsection\label{what-are-functions-expected-as-subsection} . Correcting it to subsection manually works , but is there a way to make it subsection in markdown ? Commented Oct 19, 2024 at 19:12
  • @PuzzleheadedSoup-98 I updated the example to use a subsection for the intro Commented Oct 19, 2024 at 19:24
  • thank you ! this works perfectly! Commented Oct 19, 2024 at 19:39

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.