summaryrefslogtreecommitdiff
path: root/macros/context
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-03-25 03:02:28 +0000
committerNorbert Preining <norbert@preining.info>2023-03-25 03:02:28 +0000
commit2d6e8c1374d2f1b73403403fe3c1ed84180d3bfa (patch)
tree52a0314aa04c42f356a77ee714677c3a9c3b55e3 /macros/context
parent85fda71ebb01e4a5b0ce50edf3dda43f45ebb55a (diff)
CTAN sync 202303250302
Diffstat (limited to 'macros/context')
-rw-r--r--macros/context/contrib/context-calendar-examples/t-calendar-examples/VERSION2
-rw-r--r--macros/context/contrib/context-calendar-examples/t-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex82
-rw-r--r--macros/context/contrib/context-collatingmarks/t-collatingmarks/VERSION2
-rw-r--r--macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/README.md36
-rw-r--r--macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.pdfbin0 -> 140658 bytes
-rw-r--r--macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.tex3
-rw-r--r--macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collatingmarks/README.txt36
-rw-r--r--macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collatingmarks/t-collatingmarks.pdfbin97437 -> 0 bytes
-rw-r--r--macros/context/contrib/context-collatingmarks/t-collatingmarks/tex/context/third/collatingmarks/t-collatingmarks.tex244
-rw-r--r--macros/context/contrib/context-collatingmarks/t-collatingmarks/tex/context/third/collationg-marks/t-collatingmarks.tex177
-rw-r--r--macros/context/contrib/context-pocketdiary/VERSION2
11 files changed, 266 insertions, 318 deletions
diff --git a/macros/context/contrib/context-calendar-examples/t-calendar-examples/VERSION b/macros/context/contrib/context-calendar-examples/t-calendar-examples/VERSION
index b123147e2a..bcdfbcd1bb 100644
--- a/macros/context/contrib/context-calendar-examples/t-calendar-examples/VERSION
+++ b/macros/context/contrib/context-calendar-examples/t-calendar-examples/VERSION
@@ -1 +1 @@
-1.1 \ No newline at end of file
+2023.03.23 \ No newline at end of file
diff --git a/macros/context/contrib/context-calendar-examples/t-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex b/macros/context/contrib/context-calendar-examples/t-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex
index 3101cbc2d8..135994f9d8 100644
--- a/macros/context/contrib/context-calendar-examples/t-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex
+++ b/macros/context/contrib/context-calendar-examples/t-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex
@@ -25,7 +25,8 @@
% Add a path to the picture placed on page 3:
\setupexternalfigures
- [directory=/YourFolder]
+ [directory=/Users/willi/Documents/TEXdata
+ /Koken/Grossmutters-Guetzli-Rezepte/]
% Choose the main language it determines the interface:
@@ -36,17 +37,25 @@
% The calendar has a pagesize of A6 and with the imposition 4 pages recto and verso are placed on a A4. Two sheets of A4 form one section:
-\setuppapersize[A6][A4]
+%\setuppapersize[A6][A4]
+\setuppapersize[A5][A4,landscape]
-\setuparranging[2*4*2]
+% \setuparranging[2*4*2]
+%\setuparranging[2*2*4]
+\setuparranging[2SIDE]
% The module Collating marks needs appropriate information:
+% \setupMPvariables
+% [pages=8, % pages per sheet of paper doublesided
+% sheets=2, % sheets of paper used per section
+% horpageshift=0mm]
\setupMPvariables
- [pages=8, % pages per sheet of paper doublesided
- sheets=2, % sheets of paper used per section
+ [pages=4, % pages per sheet of paper doublesided
+ sheets=4, % sheets of paper used per section
horpageshift=0mm]
+
% Adapt the layout of the page to the size of the page:
\setuplayout
[topspace=.6cm,
@@ -101,7 +110,7 @@
\setuplabeltext[fr][menu=Menu]
\setuplabeltext[fr][comment=Commentaire]
-% Dutch interfac
+% Dutch interface
\setuplabeltext[nl][menu=Menu]
\setuplabeltext[nl][comment=Commentaar]
@@ -113,30 +122,31 @@
\setuplabeltext[es][menu=MenĂº]
\setuplabeltext[es][comment=Comentario]
+
% The lua code performing all the magic:
\startluacode
local report = logs.reporter("Menu calendar")
-
+
function thirddata.calendar.menuweektable(mondaytimestamp,year,w)
local stamp = mondaytimestamp
local year = year
local week = w
- local daynumber,dayname,monthname,holiday
-
+ local daynumber,dayname,monthname,holiday
+
local day = stamp + 1 * 24 * 60 * 60
-
+
report("Working in function: thirddata.calendar.menuweektable")
-
+
local monthname = string.lower(os.date("%B",day))
-
+
--report("Month: %s Week: %s", monthname,week)
-
+
thirddata.calendar.myheadertext(monthname,week)
-
+
context.bTABLE({setups="table:week"})
-
+
for i = 1,7 do
local day = stamp + i * 24 * 60 * 60
@@ -145,21 +155,20 @@
daynumber = tonumber(os.date("%d",day)) --day number
dayname = string.lower(os.date("%a",day)) -- day name short
monthnumber = tonumber(os.date("%m",day)) -- month name
- holiday = thirddata.calendar.checkchristianfeast(daynumber,monthnumber,year) --
- -- Christian holida
+ holiday = thirddata.calendar.checkchristianfeast(daynumber,monthnumber,year) -- Christian holida
if holiday ~= "" then
report("Holiday (before table row): %s", holiday)
- report("Day number (before table row): %s", daynumber)
+ report("Day number (before table row): %s", daynumber)
report("Day name (before table row): %s",dayname)
- end
-
+ end
+
context.bTR()
context.bTD({style="bfa"})
if dayname == "sun" or holiday ~= "" and f ~= "ashw" then
- local dnu = daynumber
- local dna = dayname
+ local dnu = daynumber
+ local dna = dayname
context.color({"red"},function() context(dnu) end)
context("~")
context.color({"red"},function() context.labeltext(dna) end)
@@ -187,11 +196,11 @@
context.eTABLE()
context.page({"yes"})
end
-
+
function thirddata.calendar.myheadertext(monthname,week)
-
- report("Working in function myheadertext")
-
+
+ report("Working in function myheadertext")
+
context.setupheadertexts{
function()
context("\\bgroup\\bfa")
@@ -204,14 +213,16 @@
return true
end}
end
-
+
function thirddata.calendar.week(weeknumber,year)
local w = weeknumber
- local mondaytimestamp = thirddata.calendar.weekcalendar(w,year)
-
+ local year = year
+ local month = thirddata.calendar.select_month(1,w,year)
+ local mondaytimestamp = thirddata.calendar.weekcalendar(w,month,year)
+
report("Working in function: thirddata.calendar.week")
--report("Mondaytimestamp %s", mondaytimestamp)
-
+
thirddata.calendar.menuweektable(mondaytimestamp,year,w)
end
@@ -238,10 +249,10 @@
\stopstandardmakeup
\setupheadertexts[][]
-
+
\strut\vfil
-
- \startplacefigure
+
+ \startplacefigure
[number=,
title=,
location=middle]
@@ -253,13 +264,13 @@
\page
\setups{Footertext}
-
+
\dorecurse{52}
{\setvariables
[PocketDiary]
[Week=\recurselevel]
\MenuWeektable{\recurselevel}{\getvariable{PocketDiary}{Year}}\page}
-
+
\page
\setupheadertexts[\bf \labeltext{notes}]
@@ -268,3 +279,4 @@
{3}
{\strut\page}
\stoptext
+
diff --git a/macros/context/contrib/context-collatingmarks/t-collatingmarks/VERSION b/macros/context/contrib/context-collatingmarks/t-collatingmarks/VERSION
index 78b372db7d..bcdfbcd1bb 100644
--- a/macros/context/contrib/context-collatingmarks/t-collatingmarks/VERSION
+++ b/macros/context/contrib/context-collatingmarks/t-collatingmarks/VERSION
@@ -1 +1 @@
-2022-01-01 \ No newline at end of file
+2023.03.23 \ No newline at end of file
diff --git a/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/README.md b/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/README.md
new file mode 100644
index 0000000000..f35f92a89e
--- /dev/null
+++ b/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/README.md
@@ -0,0 +1,36 @@
+## Collting Marks
+
+# Introduction
+Collating marks are small black rules placed on printed sections. On each section the mark is moved by the length of the black rule. When the book is assembled on the spine appears a stair like pattern. Continuity of this pattern insures that the book is ordered in the correct sequence of sections.
+
+# Usage
+The module is used in connection with arranging pages for folding to form sections.
+
+Depending on the arranging scheme used the module must be set up accordingly in the set of MetaPost variables.
+
+Example:
+
+\usemodule[collatingmarks][Collatingmarks=yes]
+
+\setupMPvariables
+ [pages=8, % pages per sheet of paper doublesided
+ sheets=2, % sheets of paper used per section
+ horpageshift=0mm, % used for correction if horizontal page-shifting is used
+ frenchdoors=false,
+ wickel=false]
+
+This setup is used for the arranging scheme \setuparranging[2*4*2] which indicates that it is double-sided printed with 4 pages recto and verso and there are two sheets of paper forming together the sections containing 16 pages.
+
+The shift parameter is used to adjust the position of the collating mark centered on the spine. This is specially important when a horizontal shift-list is used for arranging!
+
+Exanmple:
+
+\definepageshift
+ [hor]
+ [horizontal]
+ [1mm,-1mm,.75mm,-.75mm,.5mm,-.5mm,.25mm,0mm,
+ 0mm,-.25mm,.5mm,-.5mm,.75mm,-.75mm,1mm,-1mm]
+
+\setuppageshift[paper][hor] %paper= arrange only, horizontal only
+
+\setuparranging[2*2*4]
diff --git a/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.pdf b/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.pdf
new file mode 100644
index 0000000000..1dd95ed6c6
--- /dev/null
+++ b/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.pdf
Binary files differ
diff --git a/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.tex b/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.tex
new file mode 100644
index 0000000000..ab3abb9aa3
--- /dev/null
+++ b/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.tex
@@ -0,0 +1,3 @@
+The documentation of this module can be created from the source-file by running:
+
+mtxrun --script modules --process t-collatingmarks.tex \ No newline at end of file
diff --git a/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collatingmarks/README.txt b/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collatingmarks/README.txt
deleted file mode 100644
index ea5acef366..0000000000
--- a/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collatingmarks/README.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-Modulename : t-collatingmarks
-Author : Willi Egger
-License : Public Domain
-
-Description
------------
-
-t-collatingmarks offers an extension to the page arranging schemes built into ConTeXt. When preparing multiple sections, each section gets a collating mark on the spine on the outermost fold of the section. This mark moves down along the spine with each section number. When the bootblack is put together, it shows a staircase like row of markings on the spine. This enables the bookbinder to see whether the bootblack is assembled correctly i.e. that the sections are put on top of each other in sequence.
-
-Usage
------
-
-\usemodule[collatingmarks][Collatingmarks=yes]
-\setuppapersize[A5][A2]
-\setuplayout[location=middle,marking=on]
-\setuppagenumbering[alternative=doublesided]
-\setuparranging[2*4]
-
-\setupMPvariables
- [pages=8, % pages per sheet of paper double sided depending on the arrangement scheme used.
- sheets=1, % sheets of paper used per section
- shift=0mm] % used for correction if horizontal page-shifting is used while imposition is active
-\starttext
- \dorecurse
- {10}
- {\startsection[title={Text \recurselevel}]
- \input tufte \par
- \startsubject[title={Ward}]
- \input ward\par
- \stopsubject
- \stopsection
- }
-\stoptext
-
-
-
diff --git a/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collatingmarks/t-collatingmarks.pdf b/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collatingmarks/t-collatingmarks.pdf
deleted file mode 100644
index 9b08852536..0000000000
--- a/macros/context/contrib/context-collatingmarks/t-collatingmarks/doc/context/third/collatingmarks/t-collatingmarks.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/context/contrib/context-collatingmarks/t-collatingmarks/tex/context/third/collatingmarks/t-collatingmarks.tex b/macros/context/contrib/context-collatingmarks/t-collatingmarks/tex/context/third/collatingmarks/t-collatingmarks.tex
deleted file mode 100644
index c1c2443707..0000000000
--- a/macros/context/contrib/context-collatingmarks/t-collatingmarks/tex/context/third/collatingmarks/t-collatingmarks.tex
+++ /dev/null
@@ -1,244 +0,0 @@
-%D \module
-%D [ file=t-collatingmarks,
-%D version=2022.01.01,
-%D title=\CONTEXT\ User Module,
-%D subtitle=Environment for collating marks,
-%D author={W. Egger},
-%D date=\currentdate,
-%D copyright={W. Egger},
-%D email=w.egger@boede.nl,
-%D license=Public Domain]
-
-% context --ctx=s-mod t-collatingmarks.tex
-% \enablemode[demo]
-
-%M \startmodule[collatingmarks]
-
-%D \startsubject[title={Introduction}]
-%D
-%D This code is based on the work of Thomas A. Schmitz,
-%D who created the module for different crop marks.
-%D
-%D If a book consists of multiple sections, each section should be marked
-%D along the spine with a collating mark. This mark moves down along the spine
-%D according to the number of the section. After collating the book it becomes
-%D easy to check whether the sequence of the sections is correct. One should
-%D see a \quotation{stair case} on the spine of the book as shown in the following figure.
-
-%D \startexample
-%D \startuniqueMPgraphic{Collatingblocks}
-%D numeric b,w,h;
-%D b := \the\textwidth;
-%D w := .75b;
-%D h := .2b;
-%D pair A,B;
-%D path sq,p[],block[];
-%D sq := unitsquare xscaled w yscaled h;
-%D block[1] := unitsquare xscaled (.1w) yscaled (h/6);
-%D block[1] := block[1] shifted (0.1w,h-h/6);
-%D fill block[1];
-%D label.bot(textext("\switchtobodyfont[6pt] \white\rotate[rotation=90]{1}"),center block[1] shifted (0,.5*h/12));
-%D draw sq;
-%D A := llcorner sq;
-%D B := lrcorner sq;
-%D p[1] := A--B;
-%D for i = 1 upto 5 :
-%D p[i+1] := p[1] shifted (0,h/6*i);
-%D draw p[i+1];
-%D endfor;
-%D for i = 1 upto 5 :
-%D block[i+1] := block[1] shifted (i*.1w, -i*h/6);
-%D fill block[i+1];
-%D numeric ii;
-%D ii := i+1;
-%D label.bot(textext("\switchtobodyfont[6pt] \white\rotate[rotation=90]{"& decimal ii &"}"),
-%D center block[i+1] shifted (0,.5*h/12));
-%D endfor;
-%D \stopuniqueMPgraphic
-%D \placefigure[middle,none][]{}{\useMPgraphic{Collatingblocks}}
-%D \stopexample
-%D \stopsubject
-%D
-%D \startsubject[title={Using the module}]
-%D
-%D If the collating marks should be placed, then the system should be setup with
-%D
-%D \starttyping
-%D \usemodule[collatingmarks][Collatingmarks=yes]
-%D \setupMPvariables
-%D [pages=8,
-%D sheets=2,
-%D horpageshift=0mm]
-%D \stoptyping
-%D
-%D Note that the
-%D collating marks-setup needs to know how many pages are placed on a
-%D doublesided printed sheet of paper and how many such sheets result in a
-%D section i.e. these values depend on the \type{\setuparranging} command. The
-%D shift-option is 0~mm if no horizontal page shifting is issued during
-%D imposition. If a horizontal page shifting is used, then the shift option is
-%D used to position the collating mark precisely on the centre of the spine.
-%D
-%D Be aware that the use of collating marks in MKII causes a lot of calls to
-%D \METAPOST, resulting in very long compilation times.
-%D
-%D So better use MKIV or LMTX where METAPOST\ is included as a
-%D library. In this case the time overhead is absolutely minimal.
-%D
-%D \stopsubject
-%D
-%D \startsubject[title={Vocabulary}]
-%D
-%D EN: Collating mark, DE: Kollationiermarke, NL: collationeerblokje
-%D
-%D\stopsubject
-%D
-%D \startsubject[title=The module code]
-
-
-\writestatus{loading}{Context User Module / Collating Marks}
-
-\unprotect
-
-\setupmodule[Collatingmarks=yes]
-
-
-\def\MCMpages{16}
-\def\MCMsheets{1}
-\def\MCMshift{0mm}
-
-\setupMPvariables
- [Collatingmarks]
- [pages=\MCMpages, %pages per sheet doublesided
- sheets=\MCMsheets,% number of sheets forming one section
- horpageshift=\MCMshift]
-
-%D We prepare collating marks:
-
-\processaction[\currentmoduleparameter{Collatingmarks}]
- [yes=>\def\Collatingmarks{Collatingmarks},
- no=>\def\Collatingmarks{},
- \v!unknown=>\def\Collatingmarks{},
- \v!default=>\def\Collatingmarks{}]
-
-\startusableMPgraphic{Collatingmarks}
- StartPage;
-
- numeric offset, sectionno, pages, sheets, factor, correction, offset, pageshift;
- path p,q;
-
- pages := \MPvar{pages};
- sheets := \MPvar{sheets};
- pageshift:=\MPvar{horpageshift};
-
- z5colm = ulcorner Page;
- z6colm = (x5colm, y5colm-10mm);
-
- p := unitsquare xscaled 1mm yscaled 7mm;
-
- if \realfolio mod 2 = 1 : % on uneven pages only
- sectionno := \realfolio div (sheets*pages)+ 1;
- label.lrt(textext("\switchtobodyfont[5pt]"& decimal sectionno &""),llcorner Page shifted (1mm,-2mm));
- if \realfolio mod (sheets*pages) = 1 : % on the first page of a section only
- nofmarkings := (y6colm-7mm) div 7mm;
- offset := y6colm-sectionno*7mm;
- if sectionno > nofmarkings :
- correction := sectionno div nofmarkings;
- offset := y6colm-(sectionno-correction*nofmarkings)*7mm;
- fi;
- p := p shifted (-1mm-2pageshift,offset);
- fill p withcolor black;
- if sectionno < 9 :
- label.rt(textext("\switchtobodyfont[3pt] \white "& decimal sectionno &""), center p shifted (-1.3mm,0));
- else :
- label.rt(textext("\switchtobodyfont[3pt] \white "& decimal sectionno &""), center p shifted (-1.5mm,0));
- fi;
- fi;
- fi;
-\stopusableMPgraphic
-
-
-%D \startsubsubject[title={Implementation}]
-%D
-%D Collating marks are calculated and drawn by \METAPOST. The result is
-%D placed into an overlay which is used as a page background
-%D
-%D \starttyping
-%D \defineoverlay[Collatingmarks][\useMPgraphic{Collatingmarks}]
-%D \stoptyping
-%D
-\defineoverlay[Collatingmarks][\useMPgraphic{Collatingmarks}]
-%D
-%D \starttyping
-%D \setupbackgrounds[page][state=repeat,background={\Collatingmarks}]
-%D \stoptyping
-%D
-\setupbackgrounds[page][state=repeat,background={\Collatingmarks}]
-%D
-%D We let \METAPOST do the calculations and draw de collating marks.
-%D
-%D \stopsubsubject
-
-\protect
-
-%D \stopsubject
-%D
-%M \stopmodule
-
-
-
-
-\doifnotmode{demo}{\endinput}
-
-%D \startsubject[title={Example}]
-%D \starttyping
-%D \usemodule[collatingmarks][Collatingmarks=yes]
-%D \setuppapersize[A5][A2]
-%D \setuplayout[location=middle,marking=on]
-%D \setuppagenumbering[alternative=doublesided]
-%D \setuparranging[2*4]
-%D
-%D \setupMPvariables
-%D [pages=8, % pages per sheet of paper doublesided
-%D sheets=1, % sheets of paper used per section
-%D horpageshift=0mm] % used for correction if horizontal page-shifting is used while imposition is active
-%D
-%D \starttext
-%D \dorecurse
-%D {10}
-%D {\startsection[title={Text \recurselevel}]
-%D \input tufte \par
-%D \startsubject[title={Ward}]
-%D \input ward\par
-%D \stopsubject
-%D \stopsection%
-%D }
-%D \stoptext
-%D \stoptyping
-%D \stopsubject
-%D \stoptext
-
-
-\usemodule[collatingmarks][Collatingmarks=yes]
-\setuppapersize[A5][A2]
-\setuplayout[location=middle,marking=on]
-\setuppagenumbering[alternative=doublesided]
-\setuparranging[2*4]
-
-\setupMPvariables
- [pages=8, % pages per sheet of paper doublesided
- sheets=1, % sheets of paper used per section
- horpageshift=0mm] % used for correction if horizontal page-shifting is used while imposition is active
-
-\starttext
- \dorecurse
- {10}
- {\startsection[title={Text \recurselevel}]
- \input tufte \par
- \startsubject[title={Ward}]
- \input ward\par
- \stopsubject
- \stopsection%
- }
-\stoptext
-
diff --git a/macros/context/contrib/context-collatingmarks/t-collatingmarks/tex/context/third/collationg-marks/t-collatingmarks.tex b/macros/context/contrib/context-collatingmarks/t-collatingmarks/tex/context/third/collationg-marks/t-collatingmarks.tex
new file mode 100644
index 0000000000..5b340243a5
--- /dev/null
+++ b/macros/context/contrib/context-collatingmarks/t-collatingmarks/tex/context/third/collationg-marks/t-collatingmarks.tex
@@ -0,0 +1,177 @@
+%D \module
+%D [ file=t-collatingmarks,
+%D version=\currentdate,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Environment for collating marks,
+%D author={W. Egger},
+%D date=\currentdate,
+%D copyright={W. Egger},
+%D email=w.egger@boede.nl,
+%D license=Public Domain]
+%D
+%D The documentation can be generated with:
+%D mtxrun --script modules --process t-collatingmarks.tex
+
+\startmodule[collatingmarks]
+
+\writestatus{loading}{Context Module for collating marks}
+
+%D\enablemode[demo]
+
+%D \subject{Introduction}
+%D
+%D This code is based on the work of Thomas A. Schmitz, who created the module for
+%D different crop marks.
+%D
+%D If a book consists of multiple sections, each section should be marked
+%D along the spine with a collating mark. This mark moves down along the spine
+%D according to the number of the section. After collating the book it becomes
+%D easy tho check whether the sequence of the sections is correct. One should
+%D see a \quotation{stair case} on the spine of the book.
+%D
+%D \subject{Using the module}
+%D
+%D If the collating marks should be placed, then the system should be setup with
+%D \type{\setupMPvariables[pages=8,sheets=2,shift=0mm,frenchdoors=false,wickel=false]} Note that the
+%D collating marks-setup needs to know how many pages are placed on a
+%D doublesided printed sheet of paper and how many such sheets result in a
+%D section i.e. these values depend on the \type{\setuparranging} command. The
+%D shift-option is 0mm if no horizontal page shifting is issued during
+%D imposition. If a horizontal page shifting is used, then the shift option is
+%D used to position the collating mark precisely on the spine.
+%D
+%D The two keys \quotation{frenchdoors} and \quotation{wickel} are used for
+%D special purposes. These are not intended for general use.
+%D For the preparation of a binding called
+%D French doors, where there is a left (normal) and a right book, which opens
+%D from left to right the MPvariable \quotation{frenchdoors} must be set to true
+%D (boolean).
+%D For preparing a section with parallelfolding/letterfolding/Wickelfalz the
+%D MPvariable \quotation{wickel} must be set to true (boolean).
+%D
+%D Be aware that the use of collating marks in MKII causes a lot of calls to
+%D Metapost, resulting in very long compilation times.
+%D So better use MKIV where Metapost is included as a
+%D library. In this case the time overhead is absolutely minimal.
+%D
+%D \section{Vocabulary}
+%D
+%D EN: Collating mark, DE: Kollationiermarke, NL: collationeerblokje
+%D
+
+
+\unprotect
+
+\setupmodule[Collatingmarks=yes]
+
+\setupMPvariables
+ [Collatingmarks]
+ [pages=16, %pages per sheet doublesided
+ sheets=1,% number of sheets forming one section
+ horpageshift=0,
+ frenchdoors=false,
+ wickel=false]
+
+%D We prepare collating marks:
+
+\processaction[\currentmoduleparameter{Collatingmarks}]
+ [yes=>\def\Collatingmarks{Collatingmarks},
+ no=>\def\Collatingmarks{},
+ \v!unknown=>\def\Collatingmarks{},
+ \v!default=>\def\Collatingmarks{}]
+
+%D The newly prepared macros go into the page background:
+
+\setupbackgrounds[page][state=repeat,background={\Collatingmarks}]
+
+%D We define an overlay for the collating marks.
+
+\defineoverlay[Collatingmarks][\useMPgraphic{Collatingmarks}]
+
+%D We let \METAPOST do the calculations and draw de collating marks.
+
+\startusableMPgraphic{Collatingmarks}
+StartPage;
+
+numeric offset, sectionno, pages, sheets, factor, correction, offset, pageshift;
+path p,q;
+boolean frenchdoors,wickel;
+
+pages := \MPvar{pages};
+sheets := \MPvar{sheets};
+pageshift := \MPvar{horpageshift};
+frenchdoors := \MPvar{frenchdoors};
+wickel := \MPvar{wickel};
+
+z5colm = ulcorner Page;
+z6colm = (x5colm, y5colm-10mm);
+
+p := unitsquare xscaled 1mm yscaled 7mm;
+
+if \realpagenumber mod 2 = 1 : % on uneven pages only
+ sectionno := \realpagenumber div (sheets*pages)+1;
+ label.lrt(textext("\switchtobodyfont[5pt]"& decimal sectionno &""),llcorner Page shifted (1mm,-2mm));
+ if \realpagenumber mod (sheets*pages) = 1 : % on the first page of a section only
+ nofmarkings := (y6colm-7mm) div 7mm;
+ offset := y6colm-sectionno*7mm;
+ if sectionno > nofmarkings :
+ correction := sectionno div nofmarkings;
+ offset := y6colm-(sectionno-correction*nofmarkings)*7mm;
+ fi;
+ if frenchdoors or wickel :
+ p := p shifted ((PaperWidth),offset);
+ else :
+ p := p shifted (-1mm-2pageshift,offset);
+ fi;
+ fill p withcolor black;
+ if sectionno < 9 :
+ label.rt(textext("\switchtobodyfont[3pt] \white "& decimal sectionno &""), center p shifted (-1.3mm,0));
+ else :
+ label.rt(textext("\switchtobodyfont[3pt] \white "& decimal sectionno &""), center p shifted (-1.5mm,0));
+ fi;
+ fi;
+fi;
+\stopusableMPgraphic
+
+\protect
+\stopmodule
+
+\doifnotmode{demo}{\endinput}
+
+
+
+%D Example:
+%D \usemodule[collatingmarks][Collatingmarks=yes]
+%D \setuppapersize[A5][A2]
+%D \setuplayout[location=middle,marking=on]
+%D \setuppagenumbering[alternative=doublesided]
+%D \setuparranging[2*4]
+%D
+%D \setupMPvariables
+%D [pages=8, % pages per sheet of paper doublesided
+%D sheets=1, % sheets of paper used per section
+%D horpageshift=0mm, % used for correction if horizontal page-shifting is used
+%D frenchdoors=false,
+%D wickel=false]
+%D
+%D \starttext
+%D \dorecurse{10}{\section{Text \recurselevel}\input tufte \par\subject{Ward} \input ward\par}
+%D \stoptext
+
+
+\usemodule[collatingmarks][Collatingmarks=yes]
+\setuppapersize[A5][A2]
+\setuplayout[location=middle,marking=on]
+\setuppagenumbering[alternative=doublesided]
+\setuparranging[2*4*2]
+
+\setupMPvariables
+ [pages=8, % pages per sheet of paper doublesided
+ sheets=2, % sheets of paper used per section
+ horpageshift=0mm, % used for correction if horizontal page-shifting is used
+ frenchdoors=false,
+ wickel=false]
+
+\starttext
+ \dorecurse{10}{\section{Text \recurselevel}\input tufte \par\subject{Ward} \input ward\par}
+\stoptext
diff --git a/macros/context/contrib/context-pocketdiary/VERSION b/macros/context/contrib/context-pocketdiary/VERSION
index 68151b2e10..97060b2f65 100644
--- a/macros/context/contrib/context-pocketdiary/VERSION
+++ b/macros/context/contrib/context-pocketdiary/VERSION
@@ -1 +1 @@
-2.5 \ No newline at end of file
+2023.03.17 \ No newline at end of file