Skip to content

Specifying image size for viewing in latex and markdown #395

Answered by Witiko
likandia asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thanks for using the Markdown package for TeX.

Can an image have its width specified, and be able to be viewed in both markdown (say, Github markdown) and latex?

The following works to display the image in latex, but does not work with pure markdown.

![](img/example.png){#id .class width=400}

Github-Flavored Markdown does not support attributes on images. Therefore, you would not be able to use the code you mentioned.

Other flavors of Markdown, such as the one recognized by Pandoc with the link_attributes extension enabled (see the corresponding option linkAttributes for the Markdown package), would allow you to specify attributes on images. However, this would not solve your issue …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@likandia
Comment options

Answer selected by likandia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants