1

I am currently working with GitHub's wiki and I have markdown pages in the wiki that I would like to convert to PDF files. I have a script that uses Kramdown, bash/sed/grep and custom HTML tags for processing the .md file downloaded directly from GitHub and gettting the final PDF through LaTeX.

The only problem I do not really have a solution for is the scaling of images. I am now trying to face it in the following way:

  1. I assume that all images are r = 150dpi.
  2. I get the dimensions in pixels (w,h).
  3. I calculate the width of the image in inches, W = w / r
  4. I set the width of the image "\includegraphics[widht=Win]"

Most of images work, but the following two problems appear:

  1. If the resolution of the image changes, it does not work.
  2. Sometimes, very long blank gaps appear in between text and images.

Is there a simpler solution to this?

1

1 Answer 1

0

You could try pandoc, which handles the images scaling to some extent, also saving you from writing those bash scripts.

There is also an online service (http://www.cocowrite.com) that translates your markdown file to PDF without requiring you installing all sorts of tools and libraries. Maybe worth having a look.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .