Controlling image size in a simple way in Markdown #4

jeromyanglim opened this Issue Jul 13, 2012 · 2 comments


None yet

2 participants


I've found that using the default image option,

 ![my image](My_image.png)

that the image was way too large.

What is a good strategy for incorporating images into slides at the appropriate size?


Stephen Sinclair uses the following code


I.e., It's

  • \centerline{...} can be omitted; it simply provides optional centring
  • height can be adjusted as required. Something like 2in or 3in seems to work well.

Other ideas

There was a suggestion on tex.SE about creating a custom latex environment for graphics

General debugging

I added the following line to my makefile in order to output tex for debugging purposes or potentially for post processing

    pandoc --toc --slide-level 2 -t beamer -o talk.tex

Other ideas

I also saw various suggestions in this thread regarding the general issue of image sizing. This one appealed to me:

 \includegraphics[keepaspectratio,width=\textwidth, height=.8\textheight]{image} 

I think it maintains aspect ratio and fits the image both to the width and height requirements.
Of course, it's annoying that every image needs such a long spiel. If it's a good default for all images, I could possibly apply some post processing to the tex file.


Doesn't seem to work for external images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment