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?

share
    
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
add comment

migrated from tex.stackexchange.com Dec 7 '12 at 19:49

This question came from our site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.

2 Answers

up vote 14 down vote accepted

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:

    \documentclass{article}
    \usepackage{nopageno}
    \usepackage{pdfpages}
    
    \begin{document}
    \includepdf[nup=4x4,pages={1-16},frame=true]{<filename>.pdf}
    \end{document}
    

    (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

share
    
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
add comment

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

share
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
add comment

You must log in to answer this question.

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