3

I'm creating a presentation using markdown and pandoc. The presentation output is PDF, and I'm using some LaTeX (beamer) templates to get the right look of the slides.

When I just add text, everything looks fine. But when I include an image in my markdown code, the background image from my beamer theme is shrunk to about 3/4 of the slide size, and the logotype is enlarged to about 4 times the size it has when no images are included. This is of course very annoying.

This is my markdown code for including an image:

## SHOWING AN IMAGE
See the ![update](overview_smallest.png =141x98).

This is my beamer theme adding the background and logo images:

\mode<presentation>
\beamertemplatenavigationsymbolsempty
\usecolortheme[RGB={36,130,204}]{structure}
\setbeamerfont{monotype}{size=\tiny}
\setbeamerfont{frametitle}{size=\small}
\setbeamerfont{title}{size=\Huge}
\setbeamerfont{normal text}{size=\large}
\useoutertheme{Custom}
\useinnertheme{circles}
\usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{bakgrund.jpg}}
\logo{\includegraphics[height=0.5cm]{logo.png}}
\mode
<all>

My objective is to be able to add images without having my background and logo distorted. If that is not possible using markdown, please suggest a different tool that would allow me to include files and use pure text files as source.

Lisa H
  • 31
  • 4

1 Answers1

0

The solution is basically the same as this: Inserting logo into beamer presentation using R Markdown

Replace this:

\usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{bakgrund.jpg}}
\logo{\includegraphics[height=0.5cm]{logo.png}}

with this:

\pgfdeclareimage[width=\paperwidth,height=\paperheight]{background}{bakgrund.png}
\usebackgroundtemplate{\pgfuseimage{background}}
\pgfdeclareimage[height=0.5cm]{logo}{logo.png}
\logo{\pgfuseimage{logo}}

I've only tried it for the background, so this bit definitely works!

Community
  • 1
  • 1
Joanne Demmler
  • 1,406
  • 11
  • 31