Controlling image size in a simple way in Markdown #4

Closed
jeromyanglim opened this Issue Jul 13, 2012 · 2 comments

Projects

None yet

2 participants

@jeromyanglim
Owner

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?

@jeromyanglim
Owner

Stephen Sinclair uses the following code

 \centerline{\includegraphics[height=2in]{myimage.png}}

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

tex:
    pandoc --toc --slide-level 2 -t beamer talk.md -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.

@dmg46664

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