diff options
Diffstat (limited to 'tex/context/modules/mkiv/m-typesetting.mkiv')
-rw-r--r-- | tex/context/modules/mkiv/m-typesetting.mkiv | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/tex/context/modules/mkiv/m-typesetting.mkiv b/tex/context/modules/mkiv/m-typesetting.mkiv new file mode 100644 index 000000000..34713fa38 --- /dev/null +++ b/tex/context/modules/mkiv/m-typesetting.mkiv @@ -0,0 +1,149 @@ +%D \module +%D [ file=m-typesetting, +%D version=2017.11.15, % reused from columnset style +%D title=\CONTEXT\ Modules, +%D subtitle=Typesetting pages, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] + +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\startmodule[typesetting] + +% \setupcombination +% [style=mono] + +\definecombination + [twopages] + +\definecombination + [fourpages] + [distance=.5\bodyfontsize, + width=\textwidth] + +\definecombination + [sixpages] + [distance=.5\bodyfontsize, + width=\textwidth] + +\definemeasure[twopages] [\dimexpr\dimexpr\textwidth-3 \bodyfontsize\relax/4\relax] +\definemeasure[fourpages] [\dimexpr\dimexpr\textwidth-3 \bodyfontsize\relax/4\relax] +\definemeasure[sixpages] [\dimexpr\dimexpr\textwidth-2.5\bodyfontsize\relax/6\relax] +\definemeasure[eightpages][\dimexpr\dimexpr\textwidth-3 \bodyfontsize\relax/4\relax] + +\starttexdefinition unexpanded OnePage #1 + \startlinecorrection[blank] + \startcombination[twopages][1*1] + {\typesetfile[#1.tex][page=1,lines=15]} {1} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\starttexdefinition unexpanded OneSpread #1 + \startlinecorrection[blank] + \startcombination[twopages][1*1] + {\typesetfile[#1.tex][page=2,lines=15]} {2} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\starttexdefinition unexpanded TwoPages #1 + \startlinecorrection[blank] + \startcombination[twopages][2*1] + {\typesetfile[#1.tex][page=1,width=\measure{twopages}]} {1} + {\typesetfile[#1.tex][page=2,width=\measure{twopages}]} {2} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\starttexdefinition unexpanded TwoSpread #1 + \startlinecorrection[blank] + \startcombination[twopages][2*1] + {\typesetfile[#1.tex][page=2,width=\measure{twopages}]} {2} + {\typesetfile[#1.tex][page=3,width=\measure{twopages}]} {3} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\starttexdefinition unexpanded FourPages #1 + \startlinecorrection[blank] + \startcombination[fourpages][4*1] + {\typesetfile[#1.tex][page=1,width=\measure{fourpages}]} {1} + {\typesetfile[#1.tex][page=2,width=\measure{fourpages}]} {2} + {\typesetfile[#1.tex][page=3,width=\measure{fourpages}]} {3} + {\typesetfile[#1.tex][page=4,width=\measure{fourpages}]} {4} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\starttexdefinition unexpanded FourSpread #1 + \startlinecorrection[blank] + \startcombination[fourpages][4*1] + {\typesetfile[#1.tex][page=2,width=\measure{fourpages}]} {2} + {\typesetfile[#1.tex][page=3,width=\measure{fourpages}]} {3} + {\typesetfile[#1.tex][page=4,width=\measure{fourpages}]} {4} + {\typesetfile[#1.tex][page=5,width=\measure{fourpages}]} {5} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\starttexdefinition unexpanded SixPages #1 + \startlinecorrection[blank] + \startcombination[sixpages][6*1] + {\typesetfile[#1.tex][page=1,width=\measure{sixpages}]} {1} + {\typesetfile[#1.tex][page=2,width=\measure{sixpages}]} {2} + {\typesetfile[#1.tex][page=3,width=\measure{sixpages}]} {3} + {\typesetfile[#1.tex][page=4,width=\measure{sixpages}]} {4} + {\typesetfile[#1.tex][page=5,width=\measure{sixpages}]} {5} + {\typesetfile[#1.tex][page=6,width=\measure{sixpages}]} {6} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\starttexdefinition unexpanded SixSpread #1 + \startlinecorrection[blank] + \startcombination[sixpages][6*1] + {\typesetfile[#1.tex][page=2,width=\measure{sixpages}]} {2} + {\typesetfile[#1.tex][page=3,width=\measure{sixpages}]} {3} + {\typesetfile[#1.tex][page=4,width=\measure{sixpages}]} {4} + {\typesetfile[#1.tex][page=5,width=\measure{sixpages}]} {5} + {\typesetfile[#1.tex][page=6,width=\measure{sixpages}]} {6} + {\typesetfile[#1.tex][page=7,width=\measure{sixpages}]} {7} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\starttexdefinition unexpanded EightPages #1 + \startlinecorrection[blank] + \startcombination[fourpages][4*2] + {\typesetfile[#1.tex][page=1,width=\measure{eightpages}]} {#1 / 1} + {\typesetfile[#1.tex][page=2,width=\measure{eightpages}]} {#1 / 2} + {\typesetfile[#1.tex][page=3,width=\measure{eightpages}]} {#1 / 3} + {\typesetfile[#1.tex][page=4,width=\measure{eightpages}]} {#1 / 4} + {\typesetfile[#1.tex][page=5,width=\measure{eightpages}]} {#1 / 5} + {\typesetfile[#1.tex][page=6,width=\measure{eightpages}]} {#1 / 6} + {\typesetfile[#1.tex][page=7,width=\measure{eightpages}]} {#1 / 7} + {\typesetfile[#1.tex][page=8,width=\measure{eightpages}]} {#1 / 8} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\starttexdefinition unexpanded EightSpread #1 + \startlinecorrection[blank] + \startcombination[fourpages][4*2] + {\typesetfile[#1.tex][page=2,width=\measure{eightpages}]} {#1 / 2} + {\typesetfile[#1.tex][page=3,width=\measure{eightpages}]} {#1 / 3} + {\typesetfile[#1.tex][page=4,width=\measure{eightpages}]} {#1 / 4} + {\typesetfile[#1.tex][page=5,width=\measure{eightpages}]} {#1 / 5} + {\typesetfile[#1.tex][page=6,width=\measure{eightpages}]} {#1 / 6} + {\typesetfile[#1.tex][page=7,width=\measure{eightpages}]} {#1 / 7} + {\typesetfile[#1.tex][page=8,width=\measure{eightpages}]} {#1 / 8} + {\typesetfile[#1.tex][page=9,width=\measure{eightpages}]} {#1 / 9} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +\stopmodule |