Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandoc (Markdown - Latex) Support #7

Closed
michaelk99 opened this issue Mar 6, 2024 · 7 comments
Closed

Pandoc (Markdown - Latex) Support #7

michaelk99 opened this issue Mar 6, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@michaelk99
Copy link

What and Why

I like to use pandoc to generate nice beamer slides from a markdown file
pandoc -t beamer pres.md -o pres.pdf

Unfortunately, this jku beamer theme does not work out-of-the box.
I've setup my tex installation so that the jku beamer template on the respective path and this works with normal latex beamer slides.

Example

See the attached file pres.md
If theme: Boadilla is selected the file pres.pdf is generated without errors.
pres.pdf

Error

When I set the JKU theme in the Markdown file theme: jku, I get the following error:

Error producing PDF.
! LaTeX Error: \begin{itemize} on input line 146 ended by \end{beamer@framepauses}.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.
...

l.146

\end{frame}

michaelroland added a commit that referenced this issue Mar 7, 2024
…ly as environment wrapping a list) (see issue #7)
@michaelroland michaelroland self-assigned this Mar 7, 2024
@michaelroland michaelroland added the enhancement New feature or request label Mar 7, 2024
@michaelroland
Copy link
Owner

Thanks for reporting! Could you check if PR #8 works for you too?

I tested with the following pandoc preamble:

---
title: JKU Presentation Theme
subtitle: for Pandoc with \LaTeX\ Beamer
author:
- Space for speaker names
institute:
- Space for institute name
date: \today
classoption:
- ngerman
- english
theme: jku
aspectratio: 169
section-titles: false
# Note: Do not set section-titles to true. Use appropriate themeoptions instead.
themeoptions:
- darkmode
- fancyfonts
- totalframenumber
- mathastext
tables: true
biblatex: true
biblatexoptions:
- backend=biber
- citestyle=authoryear
- sortcites=true
- style=ACM-Reference-Format
bibliography: references.bib
csquotes: true
indent: true
---

Note that you should set section-titles to false, set appropriate classoption (particularly language settings for babel, etc to work) and themeoptions to configure the JKU beamer theme (color mode, etc.)

@michaelk99
Copy link
Author

Thanks for the quick fix and the detailed pandoc preamble! Works as expected!

@michaelroland
Copy link
Owner

Btw. for the full design experience of the template, you may want to compile using the XeLaTeX toolchain with

pandoc -t beamer --slide-level=3 --pdf-engine=latexmk --pdf-engine-opt=-gg --pdf-engine-opt=-bibtex --pdf-engine-opt=-pdfxe main.md -o main.pdf

or

pandoc -t beamer --slide-level=3 --pdf-engine=xelatex main.md -o main.pdf

Use --slide-level=N to determine the heading level that will produce frames in case you want sectioning (with --slide-level=3, level 1 headings will produces section slides, level 2 headings subsection slides, and level 3 headings will produce frame titles)

@michaelk99
Copy link
Author

Thanks! I'll give it a try!

@michaelroland
Copy link
Owner

Do you have some longer source file with typical pandoc/markdown features that you use in your projects? Would be interesting as a test-case ...

@michaelk99
Copy link
Author

I mainly use it as a quick way to produce slides for meetings based on some notes. So mainly some images and Latex equations. Need to look into setting up the bibliography.

@jondo
Copy link

jondo commented Jul 5, 2024

Here's a small example (adapted from here, tested with Pandoc 2.9.2.1 and pandoc-citeproc 0.17.0.1, both from Ubuntu 22.04), showing the following features: list, enumeration, web link, bibliographic reference, image, equation, table.

markdown-slides.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants