I've often found that it is helpful to post a image with your MWE. In cases where you're using a single-Page MWE, ImageMagick's 'convert' utility does the trick. For multi-page MWEs (e.g. for questions on page-breaking), it's trickier. I would like to be able to produce something like this (from an answer by David Carlisle)enter image description here

How should one do this?

  • Good question! It should go on [meta], however. I've voted to migrate. It might be found to be a duplicate there, I don't remember if the existing questions cover multi-page stuff. – doncherry Dec 7 '12 at 19:38
  • I'm very happy to migrate it -- does that involve closing and reasking? [I also have an answer which I'm in the middle of typing up!] – Mohan Dec 7 '12 at 19:38
  • 1
    I normally adjust the page geometry (if needed) and use Two Page View from Acrobat to capture the image from the screen. – Peter Grill Dec 7 '12 at 19:40
  • 1
    @Mohan Migration-question answered, I suppose :) – doncherry Dec 7 '12 at 19:50

The easiest solution I've found involves using the pdfpages package:

  1. Compile the MWE into a pdf.
  2. pdfpages allows "Several logical pages [to] be arranged onto each sheet of paper", like so:


    (Adjust the nup to get however many rows and columns you want.)

  3. Compile the tex document from 2. to a pdf.

  4. Use convert to extract a turn this new .pdf into a .png.

You will end up with something like this:enter image description here

  • Why isn't my code formatting properly? – Mohan Dec 7 '12 at 19:44
  • 2
    You need 8 spaces inside a list for code formatting. – percusse Dec 7 '12 at 19:45
  • 2
    Also see Why do code snippets not work after lists?. – Werner Dec 7 '12 at 19:50
  • 1
    Additional note: If you want to compare several MWEs side-by-side, the \includepdfmerge command from the pdfpages package will allow you to arrange several logical pages on the same sheet of paper, even if the logical pages come from different pdf files. – Charles Staats Dec 7 '12 at 23:51

I find the simplest is to upload the PDF directly via the image upload facility on the site and it puts all the pages in the PDF into the question/answer. The only issue with that is that the default resolution of the conversion isn't all that high.

For example, here's a pdf with several pages uploaded via the imgur upload:

multipage PDF upload

  • 1
    That works well in your beamer example, but I've had problems in cases where it's not clear where the bottom of a page is (e.g. in pagebreaking questions). The frame option in includepdf helps with this by supplying a grid. – Mohan Dec 11 '12 at 10:15
  • How can you do this now, as the site doesn't allow to use the tool now? – adn Mar 5 '15 at 19:00

You must log in to answer this question.

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