
Hello, I want to draw the cutting line on an A4 sheet. cutting line (to draw) | ------------ | | | | | | | | | ------------ \setuppapersize[A5][A4,landscape] \setuparranging[2*2] \showframe \setuplayout[middle] \starttext \dorecurse{100}{\input knuth \relax} \stoptext

Am 08.04.25 um 10:19 schrieb Alan Caruanambo:
Hello, I want to draw the cutting line on an A4 sheet.
cutting line (to draw) | ------------ | | | | | | | | | ------------
\setuppapersize[A5][A4,landscape] \setuparranging[2*2]
\showframe
\setuplayout[middle]
\starttext \dorecurse{100}{\input knuth \relax} \stoptext
I would use a layer and some MetaPost code, like this: \startuniqueMPgraphic{MPfoldmark} pickup pensquare scaled 0.5pt ; drawoptions(dashed evenly withcolor "registration") ; xd := OverlayWidth/2; draw (xd,0)--(xd,\pagecutmarklength); draw (xd,OverlayHeight)--(xd,(OverlayHeight - \pagecutmarklength)); \stopuniqueMPgraphic \defineoverlay[foldmark][\uniqueMPgraphic{MPfoldmark}] \definelayer[PagePlus][ x=-\pagecutmarklength, y=-\pagecutmarklength, width=1pw+2\pagecutmarklength, height=1ph+2\pagecutmarklength, ] \setupbackgrounds[page][background=PagePlus] \setlayerframed[PagePlus][ y=-\measure{Trim}, x=0mm, height=1ph, width=1pw, background=foldmark, ]{} This is not the most simple solution, but it should work with any page size. Hraban

Am 08.04.25 um 11:20 schrieb Henning Hraban Ramm:
\definelayer[PagePlus][ x=-\pagecutmarklength, y=-\pagecutmarklength, width=1pw+2\pagecutmarklength, height=1ph+2\pagecutmarklength, ] \setupbackgrounds[page][background=PagePlus]
\setlayerframed[PagePlus][ y=-\measure{Trim}, x=0mm, height=1ph, width=1pw, background=foldmark, ]{}
Sorry, I didn’t test the code; the measures make no sense. Will you manage on your own? Hraban

I modified it, but it only affects the first page. The mark appears on the edge of the page; I just want a line in the middle. \setuppapersize[A5][A4,landscape] \setuparranging[2*2] \setuplayout[middle] \startuniqueMPgraphic{MPfoldmark} pickup pensquare scaled 0.5pt ; drawoptions(dashed evenly withcolor "registration") ; xd := OverlayWidth/2; draw (xd,0)--(xd,\pagecutmarklength); draw (xd,OverlayHeight)--(xd,(OverlayHeight - \pagecutmarklength)); \stopuniqueMPgraphic \defineoverlay[foldmark][\uniqueMPgraphic{MPfoldmark}] \definelayer[PagePlus][ x=-\pagecutmarklength, y=-\pagecutmarklength, width=1\paperwidth+2\pagecutmarklength, height=1\paperheight+2\pagecutmarklength, ] \setupbackgrounds[page][background=PagePlus] \setlayerframed[PagePlus][ y=-\measure{Trim}, x=0mm, height=1\paperheight, width=1\paperwidth, background=foldmark, ]{} \starttext \dorecurse{100}{\input knuth \relax} \stoptext

Am 08.04.25 um 12:18 schrieb alan.caruanambom@gmail.com:
I modified it, but it only affects the first page.
The mark appears on the edge of the page; I just want a line in the middle.
\setuppapersize[A5][A4,landscape] \setuparranging[2*2]
\setuplayout[middle]
\startuniqueMPgraphic{MPfoldmark} pickup pensquare scaled 0.5pt ; drawoptions(dashed evenly withcolor "registration") ; xd := OverlayWidth/2; draw (xd,0)--(xd,\pagecutmarklength); draw (xd,OverlayHeight)--(xd,(OverlayHeight - \pagecutmarklength));
I wanted the marks outside, just change the draw coordinates to draw (xd,0)--(xd,OverlayHeight); Then you also don’t need the \pagecutmarklength anywhere.
\stopuniqueMPgraphic
\defineoverlay[foldmark][\uniqueMPgraphic{MPfoldmark}]
\definelayer[PagePlus][ x=-\pagecutmarklength, y=-\pagecutmarklength, width=1\paperwidth+2\pagecutmarklength, height=1\paperheight+2\pagecutmarklength, repeat=yes, ] \setupbackgrounds[page][background=PagePlus, state=repeat, ]
If a layer should be repeated on all pages, you must define it with "repeat=yes" and set it as background with "state=repeat". Have fun, Hraban

Cutting an A4 landscape in half is plain vanilla 148.5 mm, folding the sheet in two, so why would there be a need to draw a line (that you have to cut exactly in two to avoid bleeding) (just thinking) .F On 08/04/2025 12:36, Henning Hraban Ramm wrote:
Am 08.04.25 um 12:18 schrieb alan.caruanambom@gmail.com:
I modified it, but it only affects the first page.
The mark appears on the edge of the page; I just want a line in the middle.
\setuppapersize[A5][A4,landscape] \setuparranging[2*2]
\setuplayout[middle]
\startuniqueMPgraphic{MPfoldmark} pickup pensquare scaled 0.5pt ; drawoptions(dashed evenly withcolor "registration") ; xd := OverlayWidth/2; draw (xd,0)--(xd,\pagecutmarklength); draw (xd,OverlayHeight)--(xd,(OverlayHeight - \pagecutmarklength));
I wanted the marks outside, just change the draw coordinates to draw (xd,0)--(xd,OverlayHeight);
Then you also don’t need the \pagecutmarklength anywhere.
\stopuniqueMPgraphic
\defineoverlay[foldmark][\uniqueMPgraphic{MPfoldmark}]
\definelayer[PagePlus][ x=-\pagecutmarklength, y=-\pagecutmarklength, width=1\paperwidth+2\pagecutmarklength, height=1\paperheight+2\pagecutmarklength, repeat=yes, ] \setupbackgrounds[page][background=PagePlus, state=repeat, ]
If a layer should be repeated on all pages, you must define it with "repeat=yes" and set it as background with "state=repeat".
Have fun, Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________

Hi Alan, On Tue, 2025-04-08 at 03:19 -0500, Alan Caruanambo wrote:
Hello, I want to draw the cutting line on an A4 sheet.
cutting line (to draw) | ------------
| | | | | |
You can use \showframe for this: \setuppapersize[A5][A4,landscape] \setuppaper[nx=2, ny=1, offset=-1.5pt] \setuparranging[XY] \definepalet[layout][page=black] \showframe[page] \setupbackgrounds[page][topframe=off, bottomframe=off, rulethickness=2pt] \starttext \dorecurse{10}{\samplefile{knuth}} \stoptext Thanks, -- Max

On 4/8/25 10:19, Alan Caruanambo wrote:
Hello, I want to draw the cutting line on an A4 sheet.
cutting line (to draw) | ------------ | | | | | | | | | ------------
Hi Alan, I think this is what you might need: \setuppapersize[A4/2][A4,landscape] \setuparranging[2*2] \setuplayout[marking=page] \starttext \dorecurse{10}{\samplefile{knuth}} \stoptext I hope it might help, Pablo
participants (6)
-
Alan Caruanambo
-
alan.caruanambom@gmail.com
-
Henning Hraban Ramm
-
Max Chernoff
-
Pablo Rodriguez
-
vm