127

The question

Is there any way to automatically scale and put an entire document on an A0 page? The thesis for which this is to be done is available as LaTeX code, as well as PDF output. Of course I know it is possible to do this manually, but I would prefer a LaTeX solution.


A small background

Our university introduced a new page limit for master theses. This is not exactly appreciated by the teaching staff as well as students. To make a little joke, we decided to try to arrange an entire thesis (of approximately 200 pages) on a A0 poster, put it up in the hallway, and put a magnification glass next to it with a note saying: "New page limit introduced: 1 page maximum for all upcoming theses!"


The final result

As some of you asked for this: below you can see a picture of the final result. (I "professionally removed" some of the sensitiv information.)

We presented the poster during my final presentation and everyone liked it a lot! Now, it is on display next to my office and is still attracting some attention once in a while. The final result

Zwähnia
  • 2,011
  • 61
    I had a similar situation in our organization in that they, one day, insisted that every report had to be times-roman font (not my beloved Palatino), but allowed that figures could have other fonts. So I submitted my report, where each page of my Palatino manuscript was slightly reduced to full-page figure size, with the caption "Figure xx: Page xx, as the author would have liked it to appear." The caption was, of course, in Times Roman. The only other Times Roman was a 1 paragraph intro on page 1, where the Times-Roman requirement was ridiculed and the subsequent layout explained. – Steven B. Segletes Mar 19 '14 at 11:27
  • 2
    That is amazing @StevenB.Segletes! Can you post a picture of it? – Ingo Mar 19 '14 at 11:37
  • @Ingo See answer below. – Steven B. Segletes Mar 19 '14 at 12:16
  • 4
    For better legibility, consider buying a duplex printer. – Daniel Mar 19 '14 at 23:00
  • 1
  • You need a high resolution printer (at least 600 dpi) for the magnification glass to be useful. – Thorbjørn Ravn Andersen Mar 20 '14 at 13:46
  • There's a company (I have no connection with them at all) that does the same with classic books - great poster idea: https://www.spinelessclassics.com/ – David Brossard Mar 21 '14 at 19:19
  • 200 pages for a thesis? If we are talking bachelor's or master's, that's probably way too much. – Raphael Mar 22 '14 at 11:46
  • 1
    @DavidBrossard: Also, litographs.com. – Raphael Mar 22 '14 at 11:47
  • @Raphael, why is that too much? – Ingo Mar 22 '14 at 17:04
  • @ThorbjørnRavnAndersen we had it printed at a local printing shops, I am confident that they use high resolution printers! – Zwähnia Mar 22 '14 at 17:11
  • 2
    @Ingo: At my university, a masters thesis gives credits worth about one (half-year) term of full-time work (900 hours); I don't know about others, of course. In this setting, if your students do nothing but write, 200 pages means 4,5 hours per page -- that does not strike me as much time for writing, layout and editing of a proper thesis. And then, you want them to do actual work, don't you? (Of course, quality standards may differ, too, and whether you count dozens of pages of easily generated figures or source code dumps.) – Raphael Mar 22 '14 at 22:51
  • @Raphael, thanks for the explanation. At our university, the MSc thesis comprises 60 ECTS in total, and some students even combine the thesis with their internship. In such constellations you can easily end up at >150 page. – Ingo Mar 23 '14 at 17:03
  • @Ingo I see, that makes more sense; thanks for the updated frame of reference. I still think it's kind of a lot, but it sounds at least feasible. – Raphael Mar 24 '14 at 10:33
  • @Zwähnia, very nice. – daleif Sep 24 '14 at 09:31
  • 1
    The magnifying glass is a very nice touch 8^) – Steven B. Segletes Mar 11 '15 at 11:05

5 Answers5

80

You can use pdfpages. In the example below, test2.pdf has 178 pages, and ceil(sqrt(178)) = 14.

The purpose of the delta option is actually to add additional white space between each page. By setting it to negative values I guess the effect is that each page overlaps a bit. So it doesn't actually crop anything, but one gets the same effect -- less white space. Some trial and error is required to find suitable values, and it will depend on the margins of the original PDF.

enter image description here

\documentclass{article}
\usepackage[a0paper,margin=0cm]{geometry}

\usepackage{pdfpages}

\begin{document}
\includepdf[pages=-,nup=14x14,delta=-2cm -3cm]{test2.pdf}
\end{document}
Torbjørn T.
  • 206,688
  • 1
    Isn't there room for squeezing more closely together? – daleif Mar 19 '14 at 11:07
  • 4
    @daleif The pages themselves have no whitespace between them, the whitespace you see is the margins of the original PDF. – Torbjørn T. Mar 19 '14 at 11:11
  • Doesn't it has options to crop these? I'll try and put one of our longer PhD Theses on an A3 just for fun. – daleif Mar 19 '14 at 11:13
  • 12
    Lol, I just tried it with my 495 pages LaTeXbook printed on A4. Not particularly readable, but 200 pages on A0 would be readable. – daleif Mar 19 '14 at 11:22
  • 3
    @daleif Didn't find anything about cropping in the manual, but the delta option can be used for a similar effect, see my updated answer. – Torbjørn T. Mar 19 '14 at 12:58
  • @daleif You can try using the pdfcrop tool on the normal output document. You should then be able to emulate the above effect with pdfnup (although I surely never tried so many pages). You might want to switch off page numbers in the original document or you'll get very strange margins with pdfcrop. – Christian Mar 20 '14 at 02:13
  • 1
    Title pages, part pages might get f'ed up. Torbjørns delta solution is the easiest – daleif Mar 20 '14 at 07:14
  • I used your solution in the end. This was exactly what I hoped for! (the print already arrived yesterday, I didn't see it myself yet but I was told it looks good) – Zwähnia Mar 22 '14 at 17:06
49

By request in the comment section, I have been exhorted to share specifics on my comment:

I had a similar situation in our organization in that they, one day, insisted that every report had to be times-roman font (not my beloved Palatino), but allowed that figures could have other fonts. So I submitted my report, where each page of my Palatino manuscript was slightly reduced to full-page figure size, with the caption "Figure xx: Page xx, as the author would have liked it to appear." The caption was, of course, in Times Roman. The only other Times Roman was a 1 paragraph intro on page 1, where the Times-Roman requirement was ridiculed and the subsequent layout explained

But I would feel guilty if I did not try to first answer the OP's question as it stands. So this is a 2-part answer: first the OP's question; then my comment's elaboration.


PART 1

While it would require quite a bit of tuning, since it doesn't take floats, the method at Making the text fit in a specific space in Latex could be adapted in this regard:

\documentclass{article}
\usepackage{scalerel}
\usepackage{caption}
\usepackage[a0paper,margin=0.5cm]{geometry}
\usepackage{fp}
\usepackage{lipsum}
\usepackage{stackengine}
\newcount\boxheight
\newcount\boxwidth
\newlength\constrainedwidth
\newsavebox\testbox
\newlength\currentwidth

\newcommand\aspect[1]{%
  \boxheight=\ht#1\relax%
  \boxwidth=\wd#1\relax%
  \FPdiv\testaspect{\the\boxheight}{\the\boxwidth}%
%\testaspect\\%                  COMMENT THIS LINE TO REMOVE ASPECT-RATIO PRINTS
}
% TARGET-HEIGHT, TARGET-WIDTH, CONTENT, GUESS>NATURAL-WIDTH, dWIDTH
\newcommand\constraintext[5]{%
  \def\svfboxsep{\the\fboxsep}%
  \setlength\fboxsep{0pt}%
  \setlength\constrainedwidth{#2}%
  \sbox\testbox{\rule{#2}{#1}}%
%TARGET ASPECT RATIO\\%          COMMENT THIS LINE TO REMOVE COMMENT
%V\\%                            COMMENT THIS LINE TO REMOVE COMMENT
  \aspect{\testbox}%
  \edef\aspectratio{\testaspect}%
  \constrainsize{#1}{\aspectratio}{#3}{#4}{#5}%
  \setlength\fboxsep{\svfboxsep}%
}
\newcommand\constrainsize[5]{%
  \sbox{\testbox}{\fbox{\begin{minipage}[b]{#4}{#3}\end{minipage}}}%
  \aspect{\testbox}%
  \FPiflt{\testaspect}{#2}%
    \setlength{\currentwidth}{#4}%
    \addtolength{\currentwidth}{-#5}%
    \constrainsize{#1}{#2}{#3}{\currentwidth}{#5}%
  \else
    \setlength\constrainedwidth{#1}%
    \FPdiv\result{1.0}{#2}%
%RESET ANY OTHER COUNTERS, TO AVOID ITERATION CREEP
   \setcounter{section}{0}%
   \setcounter{figure}{0}%
%                               CHANGE \framebox TO \makebox TO REMOVE FRAME
    \makebox[\result\constrainedwidth]{\hfill%
      \scaleto{\begin{minipage}[b]{\currentwidth}{#3}\end{minipage}}{#1}%
      \hfill%
    }%
  \fi%
}
\parindent 0in
\begin{document}
\centering\constraintext{46in}{32in}{%
\section{Test Section}
\lipsum[1-10]
\section{The Next Section}
\lipsum[11-17]
{\centering\par\rule{2in}{2in}\captionof{figure}{My caption}\par}
\lipsum[1-25]
{\centering\par\rule{3in}{1in}\captionof{figure}{My caption}\par}
\lipsum[1-15]
\section {Conclusions}
\lipsum[16-20]
}{60in}{.2in}
\end{document}

enter image description here


Part 2

Without listing the whole document, the code required to accomplish this part of the task is straightforward. I created my desired document in Palatino, had Adobe spit it out each page in its own file, with names f2_1.pdf, f2_2.pdf, etc. The following code grabbed the right pages and wrapped a figure wrapper around them (using my boxhandler package's \bxfigure). The code looks to be repeated twice because the first block is for captioning pages with roman numbers, and the second block for captioning figures with arabic numbers.

\section{A Meta-Report in Times-Roman Font}

This report is composed, by bureaucratic decree, in 12-point Times-Roman
font. The author has been informed that Palatino font, despite its
increased legibility, does not possess ``curly'' quotes and, therefore,
``is just too different in appearance from the standard font'' that ARL
employs.  Efforts to obtain a local variance to this standard, though
granted regularly in the past to a number of authors, have been
presently denied to this author

[text deleted]

\newcounter{pnum}\newcounter{fnum}\newcounter{countindex}

\setcounter{pnum}{\thefigure}\addtocounter{pnum}{3}
\setcounter{fnum}{\thefigure}\addtocounter{fnum}{5}
\setcounter{countindex}{0}
\def\blahblah{, as the author would have liked it to appear, in Palatino font}

\whiledo{\value{countindex} < 2}{
  \bxfigure[h] {Page \roman{pnum}\blahblah}
  {\fbox{\includegraphics[scale=0.89,trim=47 36 46 60]{f2_\arabic{fnum}}}}
  \clearpage
  \addtocounter{pnum}{1}
  \addtocounter{fnum}{1}
  \addtocounter{countindex}{1}
}

\addtocounter{pnum}{-4}
\setcounter{countindex}{0}

\whiledo{\value{countindex} < 40}{
  \bxfigure[h] {Page \arabic{pnum}\blahblah}
  {\fbox{\includegraphics[scale=0.89,trim=48 36 46 60]{f2_\arabic{fnum}}}}
  \clearpage
  \addtocounter{pnum}{1}
  \addtocounter{fnum}{1}
  \addtocounter{countindex}{1}
}

enter image description here

enter image description here

Needless to say, while the editor was amused, it was not accepted for publication without modification.

27

You could adapt the LaTeX source of the thesis to typeset it on A0 paper in four columns, each of which has the width of one A4 sheet. For better typesetting, i.e. a smaller number of characters per line, you could even increase the number of columns.

\documentclass{article}

\usepackage[a0paper, margin = 2.5cm]{geometry}
\usepackage[english]{babel}
\usepackage{microtype}

\usepackage{multicol}
    \setlength{\columnsep}{1.5cm}

\usepackage[math]{blindtext}

\title{I Like Big Sheets of Paper}
\author{Zw\"ahnia}

\begin{document}
\maketitle

\begin{multicols}{4}
\tableofcontents
\Blinddocument
\Blinddocument
\end{multicols}
\end{document}

whole thesis

title snippet

doncherry
  • 54,637
11

I would take the whole text and preamble of the thesis, but swap some packages to really print it on A 0:

\documentclass[pagesize, paper=a0, english, fontsize=6pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel, blindtext, multicol, endnotes}
\usepackage[margin=2cm]{geometry}
\let\footnote=\endnote

\title{Reamde}

\raggedbottom
%\recalctypearea
\begin{document}
\maketitle{}

\begin{multicols}{5}
  \Blinddocument\footnote{\blindtext{}}

  \Blinddocument\footnote{\blindtext{}}

  \Blinddocument\footnote{\blindtext{}}

  \Blinddocument\footnote{\blindtext{}}

  \Blinddocument\footnote{\blindtext{}}

  \Blinddocument\footnote{\blindtext{}}

\begingroup
\parindent 0pt
\parskip 2ex
\def\enotesize{\normalsize}
\theendnotes
\endgroup
\end{multicols}



\end{document}

If there are footnotes in the thesis, they have to follow inline. I've never thought about a solution for footnotes with multicols, probably that would be a difficult part. Maybe an easy solution were, to print them as endnotes, like I did here in this example.

Display of full page

The endnotes are in the lower right corner:

enter image description here

Keks Dose
  • 30,892
  • I liked your solution as well, however I could not get it running as it caused problems with quite some of the packages I was using. – Zwähnia Mar 22 '14 at 17:09
3

In addition to Torbjørns solution, there is pgfpages which should be able to do the same without using an external PDF. Though you may need to write your own layout macro for it. It is not that hard.

BTW: Interesting idea, when done post an image of it, might look interesting.

daleif
  • 54,450
  • 1
    He should also post a picture of people starring at the poster. – schmendrich Mar 27 '14 at 13:15
  • 1
    @schmendrich he is a she ;-) and unfortunately didn't take any pictures of people starring at it (even though plenty did during the first weeks) but at least I finally posted a picture of it!! – Zwähnia Sep 24 '14 at 09:14