From 27fe9ed02ee57d6eef73ac45126fabe4a168ccab Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Sat, 2 Mar 2024 18:00:49 +0100 Subject: [PATCH] =?UTF-8?q?Add=20article=20about=20printing=20on=20M=C3=B6?= =?UTF-8?q?bius=20bands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/images/mobius-print/Makefile | 6 + content/images/mobius-print/booklet.ipe | 398 +++++++++++++++++++ content/images/mobius-print/booklet.svg | 200 ++++++++++ content/images/mobius-print/interleave.patch | 99 +++++ content/images/mobius-print/leporello.ipe | 372 +++++++++++++++++ content/images/mobius-print/leporello.svg | 121 ++++++ content/images/mobius-print/mobius.ipe | 368 +++++++++++++++++ content/images/mobius-print/mobius.svg | 115 ++++++ content/images/mobius-print/twoside.ipe | 380 ++++++++++++++++++ content/images/mobius-print/twoside.svg | 107 +++++ content/mobius-print.rst | 183 +++++++++ 11 files changed, 2349 insertions(+) create mode 100644 content/images/mobius-print/Makefile create mode 100644 content/images/mobius-print/booklet.ipe create mode 100644 content/images/mobius-print/booklet.svg create mode 100644 content/images/mobius-print/interleave.patch create mode 100644 content/images/mobius-print/leporello.ipe create mode 100644 content/images/mobius-print/leporello.svg create mode 100644 content/images/mobius-print/mobius.ipe create mode 100644 content/images/mobius-print/mobius.svg create mode 100644 content/images/mobius-print/twoside.ipe create mode 100644 content/images/mobius-print/twoside.svg create mode 100644 content/mobius-print.rst diff --git a/content/images/mobius-print/Makefile b/content/images/mobius-print/Makefile new file mode 100644 index 0000000..8e75801 --- /dev/null +++ b/content/images/mobius-print/Makefile @@ -0,0 +1,6 @@ +all: booklet.svg mobius.svg leporello.svg booklet.svg + +%.svg: %.ipe + iperender -svg "$<" "$@" + +.PHONY: all diff --git a/content/images/mobius-print/booklet.ipe b/content/images/mobius-print/booklet.ipe new file mode 100644 index 0000000..76a257d --- /dev/null +++ b/content/images/mobius-print/booklet.ipe @@ -0,0 +1,398 @@ + + + + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0.6 0 0 0.6 0 0 e +0.4 0 0 0.4 0 0 e + + + + +0.6 0 0 0.6 0 0 e + + + + + +0.5 0 0 0.5 0 0 e + + +0.6 0 0 0.6 0 0 e +0.4 0 0 0.4 0 0 e + + + + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h +-0.4 -0.4 m +0.4 -0.4 l +0.4 0.4 l +-0.4 0.4 l +h + + + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h + + + + + +-0.5 -0.5 m +0.5 -0.5 l +0.5 0.5 l +-0.5 0.5 l +h + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h +-0.4 -0.4 m +0.4 -0.4 l +0.4 0.4 l +-0.4 0.4 l +h + + + + + + +-0.43 -0.57 m +0.57 0.43 l +0.43 0.57 l +-0.57 -0.43 l +h + + +-0.43 0.57 m +0.57 -0.43 l +0.43 -0.57 l +-0.57 0.43 l +h + + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +-1 0.333 m +0 0 l +-1 -0.333 l + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h +-1 0 m +-2 0.333 l +-2 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h +-1 0 m +-2 0.333 l +-2 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.3 0 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.3 0 l +-0.5 -0.333 l +h + + + + +1 0 m +0 0.333 l +0 -0.333 l +h +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +1 0 m +0 0.333 l +0 -0.333 l +h +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Side A +Side B +n +1 +n-1 +2 +\dots + +128 768 m +128 720 l +192 720 l +192 768 l +h + + +128 704 m +128 656 l +192 656 l +192 704 l +h + +n-2 +3 +n-3 +4 + +128 768 m +128 720 l +192 720 l +192 768 l +h + + +128 704 m +128 656 l +192 656 l +192 704 l +h + +\frac{n}{2}+2 +\frac{n}{2}-1 +\frac{n}{2}+1 +\frac{n}{2} + +128 768 m +128 720 l +192 720 l +192 768 l +h + + +128 704 m +128 656 l +192 656 l +192 704 l +h + + +168 728 m +152 696 l + + +168 696 m +152 728 l + + +168 728 m +152 696 l + + +168 696 m +152 728 l + + +168 728 m +152 696 l + + +168 696 m +152 728 l + + + diff --git a/content/images/mobius-print/booklet.svg b/content/images/mobius-print/booklet.svg new file mode 100644 index 0000000..1001835 --- /dev/null +++ b/content/images/mobius-print/booklet.svg @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/images/mobius-print/interleave.patch b/content/images/mobius-print/interleave.patch new file mode 100644 index 0000000..fa3069b --- /dev/null +++ b/content/images/mobius-print/interleave.patch @@ -0,0 +1,99 @@ +From b32e0a3e27142898e87e13464154d4f9d8c5e96e Mon Sep 17 00:00:00 2001 +From: LEdoian +Date: Sat, 2 Mar 2024 01:20:25 +0100 +Subject: [PATCH] Implemented interleave + +--- +SPDX-License-Identifier: GPL-2.0-or-later + + cmds.cc | 39 +++++++++++++++++++++++++++++++++++++++ + paperjam.1.txt | 10 ++++++++++ + 2 files changed, 49 insertions(+) + +diff --git a/cmds.cc b/cmds.cc +index a2ac331..49590a5 100644 +--- a/cmds.cc ++++ b/cmds.cc +@@ -2,6 +2,7 @@ + * PaperJam -- Commands + * + * (c) 2018--2022 Martin Mares ++ * (c) 2024 LEdoian + */ + + #include +@@ -1490,6 +1491,42 @@ static const arg_def slice_args[] = { + { NULL, 0, NULL } + }; + ++/*** interleave ***/ ++ ++class interleave_cmd : public cmd_exec { ++ int n; ++public: ++ interleave_cmd(cmd *c) ++ { ++ n = c->arg("n")->as_int(0); ++ if (n <= 0) ++ err("The number of interleaving groups must be positive"); ++ } ++ vector process(vector &pages) override; ++}; ++ ++vector interleave_cmd::process(vector &pages) ++{ ++ vector in, out; ++ ++ in = pages; ++ // The last page may be superfluous... ++ while (in.size() % n) ++ in.push_back(new empty_page(in[0]->width, in[0]->height)); ++ int split = (int) in.size() / n; ++ ++ for (int i=0; i cmd_exec *ctor(cmd *c) { return new T(c); } +@@ -1515,6 +1552,8 @@ const cmd_def cmd_table[] = { + "Fit image to a given paper" }, + { "flip", flip_args, 0, &ctor, + "Flip page horizontally and/or vertically" }, ++ { "interleave", interleave_args, 0, &ctor, ++ "Interleave pages from different parts of the document" }, + { "margins", margins_args, 0, &ctor, + "Define image box by dimensions of margins around it" }, + { "merge", no_args, 0, &ctor, +diff --git a/paperjam.1.txt b/paperjam.1.txt +index 94f3432..9bebcd4 100644 +--- a/paperjam.1.txt ++++ b/paperjam.1.txt +@@ -255,6 +255,16 @@ Flip pages horizontally or vertically. + *v=*'switch':: + Flip vertically. + ++interleave ++~~~~~~~~~~ ++Splits the document into n groups of same size and interleaves them (first page ++from all groups, then second, ...). ++ ++If the number of input pages is not divisible by n, blank pages are added. ++ ++*n=*'number':: ++ Number of groups. ++ + margins + ~~~~~~~ + Define a new image box by dimensions of margins around it. More technically, +-- +2.43.0 diff --git a/content/images/mobius-print/leporello.ipe b/content/images/mobius-print/leporello.ipe new file mode 100644 index 0000000..dd3f442 --- /dev/null +++ b/content/images/mobius-print/leporello.ipe @@ -0,0 +1,372 @@ + + + + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0.6 0 0 0.6 0 0 e +0.4 0 0 0.4 0 0 e + + + + +0.6 0 0 0.6 0 0 e + + + + + +0.5 0 0 0.5 0 0 e + + +0.6 0 0 0.6 0 0 e +0.4 0 0 0.4 0 0 e + + + + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h +-0.4 -0.4 m +0.4 -0.4 l +0.4 0.4 l +-0.4 0.4 l +h + + + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h + + + + + +-0.5 -0.5 m +0.5 -0.5 l +0.5 0.5 l +-0.5 0.5 l +h + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h +-0.4 -0.4 m +0.4 -0.4 l +0.4 0.4 l +-0.4 0.4 l +h + + + + + + +-0.43 -0.57 m +0.57 0.43 l +0.43 0.57 l +-0.57 -0.43 l +h + + +-0.43 0.57 m +0.57 -0.43 l +0.43 -0.57 l +-0.57 0.43 l +h + + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +-1 0.333 m +0 0 l +-1 -0.333 l + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h +-1 0 m +-2 0.333 l +-2 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h +-1 0 m +-2 0.333 l +-2 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.3 0 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.3 0 l +-0.5 -0.333 l +h + + + + +1 0 m +0 0.333 l +0 -0.333 l +h +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +1 0 m +0 0.333 l +0 -0.333 l +h +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +64 768 m +64 704 l +112 704 l +112 768 l +h + + +64 688 m +64 624 l +112 624 l +112 688 l +h + + +128 768 m +128 704 l +176 704 l +176 768 l +h + + +128 688 m +128 624 l +176 624 l +176 688 l +h + +Side A +Side B +1 +n +n-1 +2 +\dots + +128 768 m +128 704 l +176 704 l +176 768 l +h + + +128 688 m +128 624 l +176 624 l +176 688 l +h + +\frac{n}{2}+1 +\frac{n}{2} + +344 712 m +344 680 l + + + diff --git a/content/images/mobius-print/leporello.svg b/content/images/mobius-print/leporello.svg new file mode 100644 index 0000000..67df266 --- /dev/null +++ b/content/images/mobius-print/leporello.svg @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/images/mobius-print/mobius.ipe b/content/images/mobius-print/mobius.ipe new file mode 100644 index 0000000..9dec614 --- /dev/null +++ b/content/images/mobius-print/mobius.ipe @@ -0,0 +1,368 @@ + + + + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0.6 0 0 0.6 0 0 e +0.4 0 0 0.4 0 0 e + + + + +0.6 0 0 0.6 0 0 e + + + + + +0.5 0 0 0.5 0 0 e + + +0.6 0 0 0.6 0 0 e +0.4 0 0 0.4 0 0 e + + + + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h +-0.4 -0.4 m +0.4 -0.4 l +0.4 0.4 l +-0.4 0.4 l +h + + + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h + + + + + +-0.5 -0.5 m +0.5 -0.5 l +0.5 0.5 l +-0.5 0.5 l +h + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h +-0.4 -0.4 m +0.4 -0.4 l +0.4 0.4 l +-0.4 0.4 l +h + + + + + + +-0.43 -0.57 m +0.57 0.43 l +0.43 0.57 l +-0.57 -0.43 l +h + + +-0.43 0.57 m +0.57 -0.43 l +0.43 -0.57 l +-0.57 0.43 l +h + + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +-1 0.333 m +0 0 l +-1 -0.333 l + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h +-1 0 m +-2 0.333 l +-2 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h +-1 0 m +-2 0.333 l +-2 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.3 0 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.3 0 l +-0.5 -0.333 l +h + + + + +1 0 m +0 0.333 l +0 -0.333 l +h +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +1 0 m +0 0.333 l +0 -0.333 l +h +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +64 768 m +64 704 l +112 704 l +112 768 l +h + + +64 688 m +64 624 l +112 624 l +112 688 l +h + + +128 768 m +128 704 l +176 704 l +176 768 l +h + + +128 688 m +128 624 l +176 624 l +176 688 l +h + +Side A +Side B +1 +\frac{n}{2}+ 1 +\frac{n}{2}+ 2 +2 +\dots + +128 768 m +128 704 l +176 704 l +176 768 l +h + + +128 688 m +128 624 l +176 624 l +176 688 l +h + +n +\frac{n}{2} + + diff --git a/content/images/mobius-print/mobius.svg b/content/images/mobius-print/mobius.svg new file mode 100644 index 0000000..5201665 --- /dev/null +++ b/content/images/mobius-print/mobius.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/images/mobius-print/twoside.ipe b/content/images/mobius-print/twoside.ipe new file mode 100644 index 0000000..70f1c1a --- /dev/null +++ b/content/images/mobius-print/twoside.ipe @@ -0,0 +1,380 @@ + + + + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0.6 0 0 0.6 0 0 e +0.4 0 0 0.4 0 0 e + + + + +0.6 0 0 0.6 0 0 e + + + + + +0.5 0 0 0.5 0 0 e + + +0.6 0 0 0.6 0 0 e +0.4 0 0 0.4 0 0 e + + + + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h +-0.4 -0.4 m +0.4 -0.4 l +0.4 0.4 l +-0.4 0.4 l +h + + + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h + + + + + +-0.5 -0.5 m +0.5 -0.5 l +0.5 0.5 l +-0.5 0.5 l +h + + +-0.6 -0.6 m +0.6 -0.6 l +0.6 0.6 l +-0.6 0.6 l +h +-0.4 -0.4 m +0.4 -0.4 l +0.4 0.4 l +-0.4 0.4 l +h + + + + + + +-0.43 -0.57 m +0.57 0.43 l +0.43 0.57 l +-0.57 -0.43 l +h + + +-0.43 0.57 m +0.57 -0.43 l +0.43 -0.57 l +-0.57 0.43 l +h + + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-0.8 0 l +-1 -0.333 l +h + + + + +-1 0.333 m +0 0 l +-1 -0.333 l + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h +-1 0 m +-2 0.333 l +-2 -0.333 l +h + + + + +0 0 m +-1 0.333 l +-1 -0.333 l +h +-1 0 m +-2 0.333 l +-2 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.3 0 l +-0.5 -0.333 l +h + + + + +0.5 0 m +-0.5 0.333 l +-0.3 0 l +-0.5 -0.333 l +h + + + + +1 0 m +0 0.333 l +0 -0.333 l +h +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + +1 0 m +0 0.333 l +0 -0.333 l +h +0 0 m +-1 0.333 l +-1 -0.333 l +h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +64 768 m +64 704 l +112 704 l +112 768 l +h + + +64 688 m +64 624 l +112 624 l +112 688 l +h + + +128 768 m +128 704 l +176 704 l +176 768 l +h + + +128 688 m +128 624 l +176 624 l +176 688 l +h + +Side A +Side B +1 +2 +4 +3 +\dots + +128 768 m +128 704 l +176 704 l +176 768 l +h + + +128 688 m +128 624 l +176 624 l +176 688 l +h + +n +n-1 + +168 712 m +168 680 l + + +168 712 m +168 680 l + + +168 712 m +168 680 l + + + diff --git a/content/images/mobius-print/twoside.svg b/content/images/mobius-print/twoside.svg new file mode 100644 index 0000000..432a2e5 --- /dev/null +++ b/content/images/mobius-print/twoside.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/mobius-print.rst b/content/mobius-print.rst new file mode 100644 index 0000000..32b1462 --- /dev/null +++ b/content/mobius-print.rst @@ -0,0 +1,183 @@ +Print your stuff on Möbius bands! +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + +:slug: mobius-print +:date: 2024-03-02 18:07 +:tags: lifehack, print +:category: technology +:keywords: Möbius band, two-sided printing, +:lang: en +:translation: false +:status: published + +I found a fun and useful way of printing stuff to ~~both~~all sides of a paper. +I just need to find the right printer! + +Quick recap: how to conventionally print stuff two-sided +======================================================== + +A typical way is just sending the page to get printed two-sided (with setting +the correct way of flipping pages). That is, on the other side of page 1 is +page 2, next sheet contains pages 3,4, then 5 & 6, … + +This is usually trivial to print on duplex printers, a bit hard to simulate on +one-sided printers (but some drivers can do that) and has drawbacks when you +need to look at stuff on other pages at the same time – you need to flip the +sheet often, as you only can put half of the pairs of pages next to each other +(even one and the following odd one). + +.. figure:: {static}/images/mobius-print/twoside.svg + :width: 66% + + Ordinary two-sided printing. Red arrows show sheet flips between consecutive + pages. + +A slight improvement hack is putting two pages on the same side of the paper +(works well with A-series of papers, I don't know for Letters &co.) – you can +put up to four pages of the original document next to each other, if they are +the right ones, but there are still pairs of pages that need turning sheets. +Also only works if the original pages do not have too tiny features on them. +[#illustrations]_ + +Booklets are fun and approachable, but still suffer from the same issues as the +conventional duplex print. They might be a bit hard to print, but programs like +``pdfbook`` or ``paperjam`` make it easy to prepare for the classic duplex +printing. Also, it is maybe hard to tell which page ends up where, as the order +is: last+first, second+penultimate, third-from-end+third, … until the pages +meet in the middle. + +.. figure:: {static}/images/mobius-print/booklet.svg + :width: 66% + + The most common booklet order with two pages per side for landscape + orientation. (Note that we show more pages, and thus more sheet-flips; the + number of sheet-flips is in fact the same as for two-sided printing.) + +The improvement for seeing multiple consecutive pages +===================================================== + +In order to be able to look simultaneously at many consecutive pages of the +original, I think the order of first+first-past-half, second+second-past-half, +… middle+last is much better (or maybe even the best). Since consecutive pages +end up on different sheets (whenever there are at least three pages), if the +original has e.g. figures on different page or long code listing, you can see +it all! + +.. figure:: {static}/images/mobius-print/mobius.svg + :width: 66% + + The "Möbius order" of pages. + +And this is really easy to use: You read a page and when you don't need it +anymore, you flip it and put to the end of the page stack [#ordering]_. If you +need to look at several pages, just rotate them in the same order as they go the +first time. [#mistake]_ + +Need to print this? For one-sided printers this is rather easy, too: just print +the first half (the bigger one) on the sheets, then put them back into the tray +and print the rest on them. You might need to experiment which side the sheets +should be put in and whether you need to print the rest in reverse order, but +that is it. + +Got the pages shuffled? Sort them by the first half, as if the print was +one-sided. + +The only annoying thing for me is that there is not much software that could +reorder the pages for two-sided printing, so that you don't need to re-insert +the sheets back in the tray. So I `patched +<{static}/images/mobius-print/interleave.patch>`__ `paperjam +`__ to enable this. [#multi-mobius]_ + +And the best part? If you would try to glue consecutive pages side-to-side, +you'd end up with a Möbius band! So if you get a Möbius paper, you can just +print this one-sided (duh :-D) + +Honorable mention: leporello +============================ + +Printing leporellos (aka concertina folded) also has many of the same benefits, +since there is only one pair of consecutive pages that need a page flip. The +order is first+last, second+penultimate, … and the original pages can be +shuffled this way with ``paperjam`` or simply using the other order for the +second side printing, than for the Möbius band. But there is a bit of fun +topology missing here :-) + +.. figure:: {static}/images/mobius-print/leporello.svg + :width: 66% + + A leporello order is also quite good, with only one sheet-flip in the entire + document. + +Is this the best order? +======================= + +Yes, if "best" means "the minimum difference of numbers of pages that get put +on the same sheet is as big as possible". The proof is left as an exercise for +the reader. + +.. Hint: you cannot pair the middle page to anything else to get a better + result. + +Of course, this holds for a set of pages with no additional assumptions. In +ordinary print, having a sheet-turn between chapters is fine and under similar +guarantees other approaches may yield better results. + +Cheat sheet: paperjam commands +============================== + +.. list-table:: Various commands for ordering pages for duplex printing with paperjam. + :header-rows: 1 + :widths: auto + + * - Order + - Command + * - Classic two-sided + - ``null`` + * - Two pages per side + - ``nup(2)`` + * - Booklet + - ``book`` (follow with ``nup(2)`` for actual booklet print) + * - Leporello + - ``modulo(2) {1 2} modulo(1,half) {1 -1}`` (The first ``modulo`` just adds blank pages to the end.) + * - Möbius (with patch) + - ``interleave(2)`` + * - Möbius (known page count) + - ``select {1..5 10..6} modulo(1,half) {1,-1}`` + * - Multiple Möbius bands, odd-even + - ``modulo(4) {1 3 2 4}`` + * - Multiple bands, "modulo 3" + - ``modulo(6) {1 4 2 5 3 6}`` + * - Second half (smaller) of pages in reverse order + - ``modulo(1,half) {-1}`` + * - Second half (smaller) of pages in normal order + - ``modulo(1,half) {-1} modulo(1) {-1}`` + * - First half (bigger) of pages + - ``modulo(2) {1 2} modulo(1,half) {1}`` + +I might create more patches for avoiding the weird ``modulo`` commands… + +---- + +.. [#illustrations] Most of the figures in this article are drawn with a single + page per a side of a sheet. I consider putting more pages on a single side + of paper to be an implementation detail, because it is not always possible + (e.g. with too small font) and sometimes you could put more than two pages + on a single side of paper, which leads to the fact that if you put + everything on one side of the paper, you can see everything at once and save + the other side. Not very useful though… My only exception is the booklet + printing below, because that one seems to be rather common. + +.. [#ordering] See how this neatly puts the first-past-half page right after + the half of the stack? Awesome! + +.. [#mistake] Also, if you flip the page around the wrong edge, you can just + rotate the rest of the stack and end up with the correct orientation. + +.. [#multi-mobius] A slight variation for which I can generate the order + with upstream ``paperjam`` is using this order on small subsets of pages. + For example, if you only want to be able to see any two consecutive pages, + you can do this for just four pages – the order is then 1+3, 2+4, 5+7, 6+8,… + Since each sheet either contains two odd or two even pages, the following + page is on different sheet than the previous one. And you can do this + "modulo 3" to see three pages: 1+4, 2+5, 3+6, 7+10, … This "simulates" + multiple smaller Möbius bands, but will be probably harder to use.