* [NTG-context] Draw cutting line
@ 2025-04-08 8:19 Alan Caruanambo
2025-04-08 9:20 ` [NTG-context] " Henning Hraban Ramm
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Alan Caruanambo @ 2025-04-08 8:19 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 304 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 508 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Draw cutting line
2025-04-08 8:19 [NTG-context] Draw cutting line Alan Caruanambo
@ 2025-04-08 9:20 ` Henning Hraban Ramm
2025-04-08 9:27 ` Henning Hraban Ramm
2025-04-08 12:39 ` Max Chernoff via ntg-context
2025-04-08 17:07 ` Pablo Rodriguez via ntg-context
2 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2025-04-08 9:20 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Draw cutting line
2025-04-08 9:20 ` [NTG-context] " Henning Hraban Ramm
@ 2025-04-08 9:27 ` Henning Hraban Ramm
2025-04-08 10:18 ` alan.caruanambom
0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2025-04-08 9:27 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Draw cutting line
2025-04-08 9:27 ` Henning Hraban Ramm
@ 2025-04-08 10:18 ` alan.caruanambom
2025-04-08 10:36 ` Henning Hraban Ramm
0 siblings, 1 reply; 9+ messages in thread
From: alan.caruanambom @ 2025-04-08 10:18 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Draw cutting line
2025-04-08 10:18 ` alan.caruanambom
@ 2025-04-08 10:36 ` Henning Hraban Ramm
2025-04-08 10:49 ` vm via ntg-context
0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2025-04-08 10:36 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Draw cutting line
2025-04-08 10:36 ` Henning Hraban Ramm
@ 2025-04-08 10:49 ` vm via ntg-context
0 siblings, 0 replies; 9+ messages in thread
From: vm via ntg-context @ 2025-04-08 10:49 UTC (permalink / raw)
To: ntg-context; +Cc: vm
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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Draw cutting line
2025-04-08 8:19 [NTG-context] Draw cutting line Alan Caruanambo
2025-04-08 9:20 ` [NTG-context] " Henning Hraban Ramm
@ 2025-04-08 12:39 ` Max Chernoff via ntg-context
2025-04-08 17:07 ` Pablo Rodriguez via ntg-context
2 siblings, 0 replies; 9+ messages in thread
From: Max Chernoff via ntg-context @ 2025-04-08 12:39 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Max Chernoff
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Draw cutting line
2025-04-08 8:19 [NTG-context] Draw cutting line Alan Caruanambo
2025-04-08 9:20 ` [NTG-context] " Henning Hraban Ramm
2025-04-08 12:39 ` Max Chernoff via ntg-context
@ 2025-04-08 17:07 ` Pablo Rodriguez via ntg-context
2025-04-08 21:58 ` alan.caruanambom
2 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-04-08 17:07 UTC (permalink / raw)
To: ConTeXt users; +Cc: Pablo Rodriguez
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Draw cutting line
2025-04-08 17:07 ` Pablo Rodriguez via ntg-context
@ 2025-04-08 21:58 ` alan.caruanambom
0 siblings, 0 replies; 9+ messages in thread
From: alan.caruanambom @ 2025-04-08 21:58 UTC (permalink / raw)
To: ntg-context
Thanks you.
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-04-08 22:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-08 8:19 [NTG-context] Draw cutting line Alan Caruanambo
2025-04-08 9:20 ` [NTG-context] " Henning Hraban Ramm
2025-04-08 9:27 ` Henning Hraban Ramm
2025-04-08 10:18 ` alan.caruanambom
2025-04-08 10:36 ` Henning Hraban Ramm
2025-04-08 10:49 ` vm via ntg-context
2025-04-08 12:39 ` Max Chernoff via ntg-context
2025-04-08 17:07 ` Pablo Rodriguez via ntg-context
2025-04-08 21:58 ` alan.caruanambom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).