New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controlling image size in a simple way in Markdown #4

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

Comments

Projects
None yet
2 participants
@jeromyanglim
Owner

jeromyanglim commented Jul 13, 2012

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

This comment has been minimized.

Show comment
Hide comment
@jeromyanglim

jeromyanglim Jul 13, 2012

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.

Owner

jeromyanglim commented Jul 13, 2012

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

This comment has been minimized.

Show comment
Hide comment
@dmg46664

dmg46664 Aug 29, 2013

Doesn't seem to work for external images.

dmg46664 commented Aug 29, 2013

Doesn't seem to work for external images.

@tandav tandav referenced this issue Apr 22, 2017

Closed

Various Temp Links #5

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