Closed paulmenzel closed 7 years ago
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’d 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’t go against Pandoc’s 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)
Another solution is to switch off captions in the preamble:
Create a file LaTeX_additional_preamble.tex
with
\usepackage{caption}
\DeclareCaptionFormat{empty}{}\captionsetup{format=empty}
and pass it to pandoc
via -H LaTeX_additional_preamble.tex
.
Pandoc 1.19.2.1 from Ubuntu 17.10
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’t center the image anymore.
Wanting a centered image without caption should be common on slides.