Pandoc: Allow to center images without caption in Beamer

Created on 26 Oct 2017  路  6Comments  路  Source: jgm/pandoc

Pandoc 1.19.2.1 from Ubuntu 17.10

# Something about the speaker

-   First fact
-   Second fact

![Organisation logo](images/logo.png)

-   Something about the organisation

This way, there is a caption as described in the manual. But that is not wanted. So, add a non-breaking space, gets rid of the caption but doesn鈥檛 center the image anymore.

# Something about the speaker

-   First fact
-   Second fact

![Organisation logo](images/logo.png)\

-   Something about the organisation

Wanting a centered image without caption should be common on slides.

Most helpful comment

Another option is to use   as the caption:

![ ](img/path/file.png)

All 6 comments

You could always add a class with image attributes and add
some CSS to make sure that images with that class are
centered.

Do CSS attributes also work with LaTeX Beamer?

Pandoc doesn't aim to be a layout engine, see http://pandoc.org/CONTRIBUTING.html#out-of-scope

However, you can change your LaTeX template or even write raw TeX (for both, see the MANUAL).

I know that I can write raw TeX, but than I鈥檇 loose the possibility to convert it to reveal.js for example.

As there is already a way to pass attributes like width and height in curly braces, it be great to also be able to display the position. That doesn鈥檛 go against Pandoc鈥檚 goal. So please re-open.

Another option is to use a filter. Add a center class:

![Organisation logo](images/logo.png){.center}\

For HTML/reveal.js, you just need to add some appropriate CSS.
For LaTeX/Beamer, you can use a filter that finds images with the center class and adds a bit of raw TeX to do the centering.

Another option is to use   as the caption:

![ ](img/path/file.png)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ERnsTL picture ERnsTL  路  58Comments

jclement picture jclement  路  117Comments

elliottslaughter picture elliottslaughter  路  44Comments

jgm picture jgm  路  48Comments

jgm picture jgm  路  51Comments