# A4 and two A5 on A4

22 views

### Cecil Westerhof

Nov 23, 2022, 5:44:08 AM11/23/22
to
I have a document that I want to create as A4, but also as two A5 on
an A4. (The same document, but shrinked.)
Is this possible with latex?

I am using lualatex if that makes a difference.

--
Cecil Westerhof
Senior Software Engineer

### Rolf Niepraschk

Nov 23, 2022, 12:26:02 PM11/23/22
to
Am 23.11.22 um 11:41 schrieb Cecil Westerhof:
> I have a document that I want to create as A4, but also as two A5 on
> an A4. (The same document, but shrinked.)
> Is this possible with latex?
>
> I am using lualatex if that makes a difference.
>

Create a new LaTeX document and load the original document into it via
pdfpages. See pdfpages documentation.

...Rolf

### Cecil Westerhof

Nov 23, 2022, 1:44:08 PM11/23/22
to
Thanks, I will look into that.

### Nicola Talbot

Nov 24, 2022, 5:21:19 PM11/24/22
to
On 23/11/2022 10:41, Cecil Westerhof wrote:
> I have a document that I want to create as A4, but also as two A5 on
> an A4. (The same document, but shrinked.)
> Is this possible with latex?
>
> I am using lualatex if that makes a difference.
>

Try pdfjam (https://ctan.org/pkg/pdfjam). I think the syntax is
something like:

pdfjam --nup 2x1 filename.pdf

Regards
Nicola Talbot
--
Dickimaw Books
Home: https://www.dickimaw-books.com/
Creating a LaTeX Minimal Example:
https://www.dickimaw-books.com/latex/minexample/
LaTeX Resources: https://www.dickimaw-books.com/latexresources.html

### Eric Pozharski

Nov 24, 2022, 9:33:20 PM11/24/22
to
with <ju73d4...@mid.individual.net> Rolf Niepraschk wrote:
> Am 23.11.22 um 11:41 schrieb Cecil Westerhof:

>> I have a document that I want to create as A4, but also as two A5 on
>> an A4. (The same document, but shrinked.) Is this possible with
>> latex?

I was doing this (two A5s on one A4) for years. Here comes what I've
learned.

Fonts refuse to scale (bonus horror -- printing on ink-jet, if you know
what I mean). Thus either 12pt on A4 with questionable typesetting (and
occassionaly unreadable scaled to A5). Or comfortable 10pt that's

Thus I've ended up with 9pt (or even 8pt) on A5, and reordering
aproprietely on A4 -- see? no scaling!

>> I am using lualatex if that makes a difference.

I'm not sure it's relevant -- scaling is much deeper.

> Create a new LaTeX document and load the original document into it via
> pdfpages. See pdfpages documentation.

I'm not badmouthing or anything, but (back then, a decade ago) did't
work for me -- boxes went ballistic, bookletting was impossible. I've
used psutils instead (but you need postscript for this to work, of
course).

Please consider this. If what you want is one-shot -- do it once and
forget about it. If it becomes routine -- invent a procedure of
typesetting your documents twice -- for two paper sizes two different
base-font sizes.

--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom

### Peter Flynn

Nov 25, 2022, 7:36:49 AM11/25/22
to
On 24/11/2022 10:26, Eric Pozharski wrote:
> with <ju73d4...@mid.individual.net> Rolf Niepraschk wrote:
>> Am 23.11.22 um 11:41 schrieb Cecil Westerhof:
>
>>> I have a document that I want to create as A4, but also as two A5 on
>>> an A4. (The same document, but shrinked.) Is this possible with
>>> latex?
>
> I was doing this (two A5s on one A4) for years. Here comes what I've
> learned.
>
> Fonts refuse to scale (bonus horror -- printing on ink-jet, if you know
> what I mean). [...] I've
> used psutils instead (but you need postscript for this to work, of
> course).

If this was a decade ago and you were using plain LaTeX --> DVI --> PS
then font scaling with Type 3 fonts could be an issue, except that I've
been doing a4 documents 2up to make 4pp A5 signatures for several

If you're generating PDF with pdflatex or xelatex or lualatex and all
your fonts are either Type 1 (for pdflatex) or TT/OT (for xelatex and
lualatex) then the problem should not arise.

Peter

### Axel Berger

Nov 25, 2022, 11:14:18 AM11/25/22
to
Peter Flynn wrote:
> then the problem should not arise.

Same here. Except what Eric seems to be saying, not sure if I understand
correctly, is that A5 scaled up yields a rather large font (from e.g. 10
to 14 pt) or the other way round a tiny one. That will always remain
true. Also A4 without large fonts yields over long lines, so you will
choose either wide margins or two columns.

That said technically there is no reason against. I have printed A4
pages two up and given a good printer they remain legible, but I'm short
sighted and can go quite near with glasses off.

--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --

### Cecil Westerhof

Dec 1, 2022, 7:44:10 AM12/1/22
to
I use the following:
\documentclass[a4paper]{article}

\usepackage{pdfpages}

\begin{document}

\includepdf[nup=1x2, pages={1, 1}, landscape]{Generated/flyer.pdf}

\end{document}

There is only one slight problem: the two are a bit to close to
each-other. When I cut the A4 to 2 A5, the left page has left a bigger
margin as right, while for the right page it is the other way around.
Can I do something about that?

### Peter Flynn

Dec 1, 2022, 5:58:20 PM12/1/22
to
On 01/12/2022 12:41, Cecil Westerhof wrote:
> Rolf Niepraschk <Rolf.Ni...@gmx.de> writes:
>
>> Am 23.11.22 um 11:41 schrieb Cecil Westerhof:
>>> I have a document that I want to create as A4, but also as two A5 on
>>> an A4. (The same document, but shrinked.)
>>> Is this possible with latex?
>>> I am using lualatex if that makes a difference.
>>>
>>
>> Create a new LaTeX document and load the original document into it via
>> pdfpages. See pdfpages documentation.
>
> I use the following:
> \documentclass[a4paper]{article}
>
> \usepackage{pdfpages}
>
> \begin{document}
>
> \includepdf[nup=1x2, pages={1, 1}, landscape]{Generated/flyer.pdf}
>
> \end{document}
>
> There is only one slight problem: the two are a bit to close to
> each-other. When I cut the A4 to 2 A5, the left page has left a bigger
> margin as right, while for the right page it is the other way around.
> Can I do something about that?

Use the geometry package to get rid of all margins

\pagestyle{empty}

However, some printers have an unprintable margin, so they force the
image to shift down and right. If your printer driver has a "photo
bleed" setting that prints to the edge of the paper, try that. But
that's a physical problem, out of the range of LaTeX to deal with.

Peter

### Cecil Westerhof

Dec 2, 2022, 4:44:07 AM12/2/22
to
That works. On my printer it loses a little bit from the first
character on the left side and a little bit on the last character on
the right side. I could change that with increasing the left and right
margin.

By the way: I put your addition before pdfpages. Does it matter where
I put it?

Thanks.

### Cecil Westerhof

Dec 2, 2022, 5:28:15 AM12/2/22
to
By in the original document changing:
\usepackage[
top = .5cm,
bottom = .5cm,
outer = .5cm,
inner = .5cm
]{geometry}

to:
\usepackage[
top = .5cm,
bottom = .5cm,
outer = .6cm,
inner = .6cm
]{geometry}

It is OK.

for the next time.

### Ulrich D i e z

Dec 2, 2022, 5:46:59 AM12/2/22
to
Eric Pozharski wrote:

[about shrinking a document from A5 to A4 via pdfpages so that two
A4 pages of the document get scaled in height and width to 50% and
placed on one sheet of A4 paper]

The way of approaching matters depends on the purpose.
E.g.: Shall the downscaled document only be used for printing
on paper so that loosing hyperlinks and "fillability" of forms
doesn't matter?

> Fonts refuse to scale (bonus horror -- printing on ink-jet, if you know
> what I mean). Thus either 12pt on A4 with questionable typesetting (and
> occassionaly unreadable scaled to A5). Or comfortable 10pt that's

E.g., typesetting in font of size 24pt and scaling with a scaling
factor of 50% is not the same as typesetting with a font of size 12pt.

There is a reason why many fonts are not delivered in just one size
but in different sizes.

If, e.g., you downscale with a scaling-factor of 50% some material
typeset with a font of size 24pt, then the shapes of glyphs/letters
often don't look the same as the glyphs/letters when typesetting
with a font of size 12 pt.

Thus, when doing this I never encountered technical problems with
up- or downscaling fonts this way, but the horror was that some
fonts did not look good at all any more when re-scaled.

Some other problems encountered were:

- If the to-be downscaled document contained text that was already
typeset in a small font size, e.g., footnotes with mathematical
expressions nested in exponents of mathematical formulas, components
(dots, strokes, lines) of the glyphs of the characters typeset in
small font size turned out so thin that ink-jet-printers did not
print them any more.

- I had some tikzpicture underlaying some graphs with a millimeter
raster for graph-paper. After downscaling the lines of the
millimeter raster were so thin that that the ink-jet-printer
did not print them any more.

- When inserting pages of a pdf-document into another pdf-document
as images, as is done, e.g., by the package pdfpages, then you
loose all hyperlinks and also forms won't be fillable any more.

If I need a document with fonts of smaller size to be typeset on
paper of smaller size, I tend not to downscale but to typeset it
using smaller papersize and layout and smaller fonts.

But this approach comes along with other problems:

- If unitlengths/units of
* coordinates within picture-environments/tikzpicture-environments
* measurements of images to be included via \includegraphics
* whatsoever other dimensions used in the document
are hardcoded for one paper-size, those things will have the
same measurements regardless modifications of paper-size/layout
and font-size. Hardcoding thickness of some lines/rules for
ensuring that they get printed is a good thing. But hardcoding
the measurements of a photo-picture probably is not. ;-)

- If you wish two A4-pages of the document to occur on one sheet
of A4-paper and wish to preserve hyperlinks and fillable forms
and the like, this might require sticking to papersize A4
while typesetting for papersize A5 while having the output-
routine patched to place two pages of the document on one
sheet of paper. Laying hands on output-routines is a task which
might not be taken for trivial by some people.

Sincerely

Ulrich0

### Ulrich D i e z

Dec 2, 2022, 2:30:59 PM12/2/22
to
Cecil Westerhof wrote:

> I have a document that I want to create as A4, but also as two A5 on
> an A4. (The same document, but shrinked.)
> Is this possible with latex?
>
> I am using lualatex if that makes a difference.

Assume you have a document in A4/portrait:

MyDocument.tex :

\documentclass[a4paper,twoside]{article}
% Margins: horizontal recto (usually righthand-page whose number is odd):
% left margin: 1cm, right margin: 2cm 1cm
% horizontal verso (usually lefthand-page whose number is even):
% left margin: 2cm, right margin:
% vertical: top-margin: 1.5cm, bottom-margin: 1.5cm
% (This way the ratio
% larger horizontal margin : top/bottom-margin : smaller horizontal margin
% is 2:3:4 ,)
% Pagestyle plain with no headheight and no headsep as there won't be any
% \flushbottom.
%------------------------------------------------------------------------------
\newlength\bottommargin
\newbox\scratchbox
\newcount\pagelineamount
%------------------------------------------------------------------------------
% Page style:
\pagestyle{plain}%
%------------------------------------------------------------------------------
% Margins:
\evensidemargin=2cm
\oddsidemargin=.5\evensidemargin
\topmargin=1.5\oddsidemargin
\bottommargin=\topmargin
%..............................................................................
% Margin-paragraphs:
% - Shall go into outer/wider margins:
% (Left and right margin are not of equal width.
% Thus each time you switch via \normalmarginpar and \reversemarginpar
% you need to recalculate \marginparwidth.)
\marginparsep=.2\evensidemargin
\marginparwidth=\evensidemargin
% Distance of bottom-line of text-block on page to baseline of page-number
% in footer:
\footskip=.5\bottommargin
{% assuming footer contains only page numbers in arabic digits in normalfont:
\setbox\scratchbox=\hbox{\normalfont 1234567890}%
%..............................................................................
% Adjust parameters to TeX's peculiarities:
\csname @ifundefined\endcsname{pagewidth}{}{\pagewidth=\paperwidth}%
\csname @ifundefined\endcsname{pdfpagewidth}{}{\pdfpagewidth=\paperwidth}%
\csname @ifundefined\endcsname{pageheight}{}{\pageheight=\paperheight}%
\csname @ifundefined\endcsname{pdfpageheight}{}{\pdfpageheight=\paperheight}%
\textwidth=\paperwidth
\textheight=\paperheight
{% adjust \topskip=the distance of the baseline of the first line of text
% to the baseline of the page-header
\setbox\scratchbox=\hbox{\normalfont 1234567890%
abcdefghijklmnopqrstuvwxyz%
ABCDEFGHIJKLMNOPQRSTUVWXYZ}%
\global\topskip=\ht\scratchbox}%
\flushbottom
\usepackage{lipsum}

\begin{document}
\noindent\lipsum[1][1-10]
\marginpar{Some margin paragraph.}
\lipsum[2-17]
\marginpar{Some margin paragraph.}
\lipsum[18-55]
\lipsum[56][1-3]
\end{document}

You can use this for creating an A5-booklet from it which can be printed:

MyDocumentA5booklet.tex

% This is just an a4-paper document with no margins at all where pdfpages'
% \includepdf is used for including an A4-portrait pdf-file as A5-bookert.
%
\documentclass[a4paper]{article}
%============[adjust margins/layout so that there are no margins]=============
\csname @ifundefined\endcsname{pagewidth}{}{\pagewidth=\paperwidth}%
\csname @ifundefined\endcsname{pdfpagewidth}{}{\pdfpagewidth=\paperwidth}%
\csname @ifundefined\endcsname{pageheight}{}{\pageheight=\paperheight}%
\csname @ifundefined\endcsname{pdfpageheight}{}{\pdfpageheight=\paperheight}%
\textwidth=\paperwidth
\oddsidemargin=0cm
\marginparsep=0cm
\marginparwidth=0cm
\evensidemargin=\oddsidemargin
\textheight=\paperheight
\topmargin=0cm
\footskip=0cm
\pagestyle{empty}%
\parindent=0ex
\parskip=0ex
\usepackage{pdfpages}
%..............................................................................
\begin{document}
% In case you wish to obtain a stack of a4 paper that you can all together
% fold in half to get an A5 booklet:
\includepdf[nup=1x2, landscape, pages=-, booklet]{MyDocument.pdf}%
\end{document}

Sincerely

Ulrich

### Ulrich D i e z

Dec 2, 2022, 6:23:04 PM12/2/22
to
I wrote:

> You can use this for creating an A5-booklet from it which can be printed:
>
>

I just realized that nargin adjustment is not needed:

MyDocumentA5booklet.tex

% This is just an a4-paper document where pdfpages'
% \includepdf is used for including an A4-portrait pdf-file as A5-bookert.
%
\documentclass[a4paper]{article}