0

Ref: Two-sided printing of A6 pages on A4 paper

Enough discussion is done on the question that is shared in the above mentioned link.

My new question: The above mentioned link gives 8 A6 pages on 2 A4 pages [8 on 2 book, @AndrewStacey 's answer accepted]. For an A6 book that is 240 pages long, we end up with 30 signatures of A6 size each containing 8 pages. Each signature has just 2 double sided sheets [A6 size]. So to make a complete book, one needs to staple each of the 30 signatures and bind them together.

Can it be possible to have fewer signatures by having, for example, 16 A6 pages laid out over 4 A4 pages [16 on 4book]? Or better still, 24 A6 pages over 6 A4 pages [24 on 6 book]? That would make the stapling and binding process easier.

I am not sure if I'm asking too much but I want to reduce the labour involved in the binding process since a A6 sized book already presents many space induced challenges than an A5/A4 sized book.

vrgovinda
  • 330

1 Answers1

1

It would be nice if there were a better way to create the layout than just cut-and-paste, but once it's defined then the length of the definition can easily be hidden in a style file. pgfmorepages is built on pgfpages which uses xkeyval for its key handling and as far as I can tell, xkeyval doesn't allow for grouping keys into a single style in the manner of pgfkeys which would make this easier.

Anyway, this is - I think - the 24 on 6 layout you're after. I've defined a meta page style which figures out which physical page a logical page should end up on, where it should be, and what rotation. This reads in the number of physical and logical pages in the signature so to change it to 8 on 4 then you just change the lines that set the physical and logical pages of the layout (I'd also change the name, of course).

\documentclass{article}
%\url{https://tex.stackexchange.com/q/660686/86}
%Adapted from \url{https://tex.stackexchange.com/q/638802/86}
%Adapted from \url{http://tex.stackexchange.com/q/279042/86}
\usepackage{pgfmorepages}

\makeatletter \newcommand\setsignaturepage[1]{% % Figure out which page it is on \pgfmathtruncatemacro\signaturepage{% 2((\pgf@physicalpages-1)/2 - abs(floor( (#1-1)/4) - (\pgf@physicalpages-1)/2)) + 1.5 - abs(mod(#1-1,4) - 1.5) + 1 }% % Figure out the rotation angle \pgfmathtruncatemacro\signatureangle{% 90(mod(#1+1,4) - mod(#1+1,2)) }% % Figure out which side of the page it's on \pgfmathsetmacro\signaturex{% #1 > (\pgf@logicalpages/2) ? .25 : .75 }% % Figure out whether it is at the top or bottom of the page \pgfmathsetmacro\signaturey{% .25 + .25*(mod(#1+1,4) - mod(#1+1,2)) }% % Put all that together into a single page definition \edef\signatureonpage{% \noexpand\pgfpagesphysicalpage{\signaturepage}{}% \noexpand\pgfpageslogicalpageoptions{#1}{% rotation=\signatureangle,% center=\noexpand\pgfpoint{\signaturex\noexpand\pgfphysicalwidth}{\signaturey\noexpand\pgfphysicalheight}% }% }% \signatureonpage }

\pgfpagesdeclarelayout{24 on 6, book format} {% \edef\pgfpageoptionheight{\the\paperheight} \edef\pgfpageoptionwidth{\the\paperwidth} \def\pgfpageoptionborder{0pt} \def\pgfpageoptionfirstshipout{1} }% {% \pgfpagesphysicalpageoptions {% logical pages=24,% physical pages=6,% physical height=\pgfpageoptionheight,% physical width=\pgfpageoptionwidth,% current logical shipout=\pgfpageoptionfirstshipout% } \pgfpagessetdefaults{% border shrink=\noexpand\pgfpageoptionborder,% resized width=.5\noexpand\pgfphysicalwidth,% resized height=.5\noexpand\pgfphysicalheight,% } \newcount\pgf@mp@pg \pgf@mp@pg=0 \loop \advance\pgf@mp@pg by 1 \setsignaturepage{\the\pgf@mp@pg} \ifnum\pgf@mp@pg < \pgf@logicalpages \repeat } \makeatother

\pgfpagesuselayout{24 on 6, book format}

\newcommand\dopage{% \noindent\resizebox{.99\linewidth}{!}{Page \thepage} \newpage}

\begin{document} \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \dopage\dopage \end{document}

Andrew Stacey
  • 153,724
  • 43
  • 389
  • 751
  • Thank you very much! I'm wondering if therecan be a simpler method. Especially for me, the code is beyond my grasp [in spite of your comments]. If you can guide me to some other resource to get started, it will be very nice. – vrgovinda Oct 15 '22 at 11:39
  • @VrajarajaGovindaDas Your comment doesn't make sense to me. Just copy the bit between \makeatletter and \makeatother into your document (or stick it in a separate file and \include it in your preamble) to define the layout and then the line \pgfpagesuselayout invokes it. You can use it as-is without needing to understand how it is constructed. My comments are as much for me when I look back at this in a few months time after someone else asks a similar question. – Andrew Stacey Oct 15 '22 at 19:19
  • Sorry for not being clear. My intention is that I would like to start learning using LaTeX for book publishing and printing on a professional level. What resources would you recommend? – vrgovinda Oct 16 '22 at 12:10
  • @VrajarajaGovindaDas I don't know anything about the book publishing side so I don't have any specific recommendations for that. Maybe one of the resources at https://tex.stackexchange.com/q/11/86 has something useful for you. – Andrew Stacey Oct 16 '22 at 12:58
  • ok. In order to learn pgfpages and pgfmorepages, is the package manual sufficient. Do you have a blog or tutorial that you can share? I think learning how to make my books print ready is very important for me. Thanks for all your help. – vrgovinda Oct 17 '22 at 04:47
  • I think that pgfpages is covered in the PGF/TikZ manual, so that's probably the best place to start. pgfmorepages is built on top of that, so understanding pgfpages is important to understanding that. But how much you need to understand depends on whether you just want to use it or want to design your own layouts. If just use an existing layout (including ones like this one in this answer) then you don't need to understand much. – Andrew Stacey Oct 17 '22 at 21:29
  • Is your code trimming the pages' margins? – vrgovinda Oct 19 '22 at 14:04
  • Nope. (And some more characters to get over the limit) – Andrew Stacey Oct 19 '22 at 18:28