modern-latex-theme icon indicating copy to clipboard operation
modern-latex-theme copied to clipboard

Images break out of bounds

Open newhinton opened this issue 2 years ago • 2 comments

Hey, i really like your theme.

However, when i generate a pdf from markdown, images span multiple pages.

The images itself are huge, but they should scale. I use very basic markdown:

![Title](IMG.jpg)

Thank you for your help!

newhinton avatar Feb 21 '23 13:02 newhinton

I assume you are using pandoc, if so you should be able to use ![Title](IMG.jpg){width=20%}. You also need to use the link_attributes features:

pandoc \
  --template=latex.template \
  --pdf-engine=lualatex \
  --pdf-engine-opt="-shell-escape" \
  -f markdown_github+link_attributes
  -o [OUTPUT.pdf] [INPUT.md]

randombenj avatar Feb 22 '23 15:02 randombenj

That works, to some extend.

I can use ![Title](IMG.jpg){width=20px height=10px} to scale the image, but that does not keep the aspect ratio.

In the end it will be easier to calculate the size manually. But thanks!

newhinton avatar Feb 22 '23 21:02 newhinton