3

I composed my thesis in A5 format, which is the final publishing format, however for review I need to print it in A4. This is a common problem, I have seen here a various times. However, I have some special issues I could not find any previous answers to.

Neither just printing on A4 (font to big) nor centering the A5 content on the A4 page (like here, font to small) are options. I prefer to magnify the entire document content by the factor 1.324 = 1324/1000 = 1000/755, which is the scaling factor between the font sizes 9pt (A5) and 12pt (desired for A4).

I found a solution using \geometry and the arguments paper, layout and mag which gives me exactly the composition I want, but the output paper dimensions the printer sees are not correct - and suprisingly different depending on whether I compile with ´pdflatex´ (preferred) or lualatex.


Lets call this solution Case 1:

\geometry{paper=a4paper, layout=a5paper, mag=755,  layouthoffset=7.0135mm, layoutvoffset=9.4651mm}
  • The composition is as desired
  • \layout shows 158.6mm x 224.3mm which is the A4 size downscaled with the 1.324, which should not be downscaled, but I don't actually care
  • The dimensions in the PDF properties if compiled with lualatex are also 158.6mm x 224.3mm
  • The dimensions in the PDF properties if compiled with pdflatex are 119.7mm x 169.3mm, which is the A5 size downscaled with the 1.324. Here I need a fix, as it should be 210mm x 297mm

I read in the manual about the truedimen option of geometry, so lets call it Case 2:

\geometry{paper=a4paper, layout=a5paper, mag=1324, layouthoffset=7.0135mm, layoutvoffset=9.4651mm, truedimen} 
  • I need the reciprocal value for mag, which appears to be more logical
  • The output of \layout is 158.6mm x 224.3mm and therefore still wrong (not important)
  • The dimensions in the PDF properties if compiled with lualatex are also 158.6mm x 224.3mm, so they still agree with \layout and are still wrong.
  • The dimensions in the PDF properties if compiled with pdflatex are 210mm x 297mm, yeah, that is correct.
  • But. The content sizes are correct, but the margins of only the even pages are completely screwed up. How can I fix this?

I also read that hyperref should be loaded before geometry, but that certainly breaks even more. Setting of the pdftex or luatex option in geometry does not seem to have any effect.

Summary: I'd like to have a solution for pdflatex, with a correct composition and the correct A4 paper dimensions in the pdf properties, so I don't have any troubles with the printing shop and it would be just nice, if everything would be correct.

I would be glad I you could help me out, thank you very much in advance.

Full MWE

\PassOptionsToPackage{usegeometry, paper=a5, pagesize, BCOR = 12mm, DIV = 16}{typearea}
\documentclass[fontsize=9pt, twoside=true]{scrbook}

\usepackage{etoolbox}
\usepackage{blindtext}

% Translate to A4 - Scale content according to fontsize
% 9pt -> 12pt => Factor 1.324142 => mag = 755 => layoutvoffset = (a4-a5*Faktor) / 2 = 9.4651mm
%                                             => layouthoffset = (a4-a5*Faktor) / 2 = 7.0135mm
\usepackage{geometry}
\geometry{paper=a4paper, layout=a5paper, mag=755,  layouthoffset=7.0135mm, layoutvoffset=9.4651mm}            % Case 1        
%\geometry{paper=a4paper, layout=a5paper, mag=1324, layouthoffset=7.0135mm, layoutvoffset=9.4651mm, truedimen} % Case 2

\usepackage{layout}
\makeatletter
\renewcommand*{\lay@value}[2]{\strip@pt\dimexpr0.351459\dimexpr\csname#2\endcsname\relax\relax mm}
\makeatother

\AtEndPreamble{\usepackage{hyperref}}

\begin{document}

\layout
\blindmathpaper

\end{document}

3 Answers 3

1

You might try to magnify it by a factor 1.4142 and then use the package crop.

\mag=1414 a corresponds to a size ratio of A4/A5 =2 (or use your own factor = 1324 if you like)

A5 format (original)

a5

A4 format (A5 document magnified and cropped)

a4xx

This is the code for A4

% !TeX TS-program = pdflatex

\mag=1414 % added <<<<<

\PassOptionsToPackage{usegeometry, paper=a5, pagesize, BCOR = 12mm, DIV = 16}{typearea}
\documentclass[fontsize=9pt, twoside=true]{scrbook}

\usepackage{etoolbox}
\usepackage{blindtext}  

\usepackage{layout}

\makeatletter
\renewcommand*{\lay@value}[2]{\strip@pt\dimexpr0.351459\dimexpr\csname#2\endcsname\relax\relax mm}
\makeatother

\usepackage[cross, a4,center,noinfo,horigin=-1in, vorigin=-1in]{crop} % <<<<<<<<< added

%   \usepackage{geometry}
%   \geometry{paper=a4paper, layout=a4paper,  layouthoffset=7.0135mm, layoutvoffset=9.4651mm}            % Case 1 

%\AtEndPreamble{\usepackage{hyperref}}  

\usepackage{hyperref}

\begin{document}

\layout
\blindmathpaper

\end{document

A similar result is obtained with the package pgfpages and inserting

\pgfpagesuselayout{resize to}[a4paper]

after \begin{document}.

Not related:

By using \AtEndPreamble{\usepackage{hyperref}}

you get (log file)

Class scrbook Warning: seems someone has broken package `auxhook'.
(scrbook)              Usually this happens, if `auxhook' is loaded or used
(scrbook)              implicitly or explicitly by patching \document
(scrbook)              or via etoolbox command \AtEndPreamble.
(scrbook)              Trying an emergency workaround.
(scrbook)              You can avoid this warning adding:
(scrbook)                \usepackage{auxhook}
(scrbook)              before \begin{document} on input line 23.

Why not just \usepackage{hyperref} before \begin{document} ?

1
  • I did not know, that \mag would be available outside geometry as simple as that. I haven't considered pgfpages as it is supposed to break hyperref. I used \AtEndPreamble as the hyperref part of my preamble is actually part of my custom class file, that way I ensure it is loaded last, even if I load more packages in the main document. I will considert this auxhook package though. Mar 20, 2021 at 13:43
1

If the A4 document should only be printed (and there are no links needed), you could use package pdfpages to scale your original document:

\documentclass{scrbook}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-,noautoscale,scale=1.324142]{a5document.pdf}
\end{document}
1
  • That could be a luatex emergency solution. For pdflatex it seems overkill though, compared to the other answers, which do not break hyperref (even if that does not matter for printing). Thanks anyway! Mar 20, 2021 at 13:45
1

With pdflatex you can simply set the pdf page size after \begin{document} (then all the other packages messing around here will no longer interfere. As pdflatex obviously takes mag into account here, you need to set the page smaller then planed.

With luatex mag is not supported as is mentioned in the luatex documentation:

Magnification (\mag) is only supported in dvi output mode.

\PassOptionsToPackage{usegeometry, paper=a5, pagesize, BCOR = 12mm, DIV = 16}{typearea}
\documentclass[fontsize=9pt, twoside=true]{scrbook}

\usepackage{etoolbox}
\usepackage{blindtext}

% Translate to A4 - Scale content according to fontsize
% 9pt -> 12pt => Factor 1.324142 => mag = 755 => layoutvoffset = (a4-a5*Faktor) / 2 = 9.4651mm
%                                             => layouthoffset = (a4-a5*Faktor) / 2 = 7.0135mm
\usepackage{geometry}

\geometry{paper=a4paper,
layout=a5paper, mag=1324,  layouthoffset=7.0135mm, layoutvoffset=9.4651mm}            

\usepackage{layout}
\makeatletter
\renewcommand*{\lay@value}[2]{\strip@pt\dimexpr0.351459\dimexpr\csname#2\endcsname\relax\relax mm}
\makeatother

\usepackage{hyperref}

\usepackage{xfp}
\begin{document} 
\pdfpagewidth=\fpeval{210*755/1000}mm \pdfpageheight=\fpeval{297*755/1000}mm

\layout
\blindmathpaper

\end{document}
1
  • Thank you! The solution of @SimonDispa seems slighty simpler, but I am not sure. Mar 20, 2021 at 13:39

You must log in to answer this question.

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