Skip to content
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

Images break out of bounds #7

Open
newhinton opened this issue Feb 21, 2023 · 2 comments
Open

Images break out of bounds #7

newhinton opened this issue Feb 21, 2023 · 2 comments

Comments

@newhinton
Copy link

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!

@randombenj
Copy link
Owner

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]

@newhinton
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants