ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* startTEXpage on A4
@ 2022-10-09 13:19 Leah Neukirchen via ntg-context
  2022-10-09 13:48 ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Leah Neukirchen via ntg-context @ 2022-10-09 13:19 UTC (permalink / raw)
  To: ntg-context; +Cc: Leah Neukirchen

Hi,

is there a way to have something like

\setuppapersize[A5][A4]

but have the "inner paper size" be a computed fit like in
\startTEXpage?

Or, alternatively, is there is a way to print crop marks around
an environment like \startTEXpage?

Thanks,
-- 
Leah Neukirchen  <leah@vuxu.org>  https://leahneukirchen.org/
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: startTEXpage on A4
  2022-10-09 13:19 startTEXpage on A4 Leah Neukirchen via ntg-context
@ 2022-10-09 13:48 ` Wolfgang Schuster via ntg-context
  2022-10-09 13:52   ` Leah Neukirchen via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-10-09 13:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Leah Neukirchen via ntg-context
  Cc: Wolfgang Schuster, Leah Neukirchen

Leah Neukirchen via ntg-context schrieb am 09.10.2022 um 15:19:
> Hi,
>
> is there a way to have something like
>
> \setuppapersize[A5][A4]
>
> but have the "inner paper size" be a computed fit like in
> \startTEXpage?
>
> Or, alternatively, is there is a way to print crop marks around
> an environment like \startTEXpage?

Can you be more concrete what your goal is, there are a few ways to solve
your problem but with a few more information we can give you a good 
solution.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: startTEXpage on A4
  2022-10-09 13:48 ` Wolfgang Schuster via ntg-context
@ 2022-10-09 13:52   ` Leah Neukirchen via ntg-context
  2022-10-09 14:02     ` Wolfgang Schuster via ntg-context
  2022-10-09 16:39     ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 8+ messages in thread
From: Leah Neukirchen via ntg-context @ 2022-10-09 13:52 UTC (permalink / raw)
  To: ntg-context; +Cc: Leah Neukirchen

Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> writes:

> Leah Neukirchen via ntg-context schrieb am 09.10.2022 um 15:19:
>> Hi,
>>
>> is there a way to have something like
>>
>> \setuppapersize[A5][A4]
>>
>> but have the "inner paper size" be a computed fit like in
>> \startTEXpage?
>>
>> Or, alternatively, is there is a way to print crop marks around
>> an environment like \startTEXpage?
>
> Can you be more concrete what your goal is, there are a few ways to solve
> your problem but with a few more information we can give you a good
> solution.

Say I want to print some stickers or paper strips of non-fixed size,
and get crop marks around them to know where to cut.

With \setuppapersize and \setuparranging I can do this nicely if I
know the size in advance, but in some cases I don't.

-- 
Leah Neukirchen  <leah@vuxu.org>  https://leahneukirchen.org
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: startTEXpage on A4
  2022-10-09 13:52   ` Leah Neukirchen via ntg-context
@ 2022-10-09 14:02     ` Wolfgang Schuster via ntg-context
  2022-10-09 16:39     ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-10-09 14:02 UTC (permalink / raw)
  To: Leah Neukirchen; +Cc: Wolfgang Schuster, ntg-context

Leah Neukirchen schrieb am 09.10.2022 um 15:52:
> Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> writes:
>
>> Leah Neukirchen via ntg-context schrieb am 09.10.2022 um 15:19:
>>> Hi,
>>>
>>> is there a way to have something like
>>>
>>> \setuppapersize[A5][A4]
>>>
>>> but have the "inner paper size" be a computed fit like in
>>> \startTEXpage?
>>>
>>> Or, alternatively, is there is a way to print crop marks around
>>> an environment like \startTEXpage?
>> Can you be more concrete what your goal is, there are a few ways to solve
>> your problem but with a few more information we can give you a good
>> solution.
> Say I want to print some stickers or paper strips of non-fixed size,
> and get crop marks around them to know where to cut.
>
> With \setuppapersize and \setuparranging I can do this nicely if I
> know the size in advance, but in some cases I don't.

You can use \framed to create a box which takes the size of its content. 
The borders
of the framed box can be used to cut the stickers and with the 
frameoffset key
(or offset if your prefer) you can increase the distance between the borders
and the content.

\setuplayout[page]

\starttext

\centerbox
    {\startframed[width=10cm,align=normal,frameoffset=1cm]
         \input ward
     \stopframed}

\stoptext

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: startTEXpage on A4
  2022-10-09 13:52   ` Leah Neukirchen via ntg-context
  2022-10-09 14:02     ` Wolfgang Schuster via ntg-context
@ 2022-10-09 16:39     ` Hans Hagen via ntg-context
  2022-10-09 18:49       ` Leah Neukirchen via ntg-context
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen via ntg-context @ 2022-10-09 16:39 UTC (permalink / raw)
  To: Leah Neukirchen via ntg-context; +Cc: Hans Hagen

On 10/9/2022 3:52 PM, Leah Neukirchen via ntg-context wrote:
> Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> writes:
> 
>> Leah Neukirchen via ntg-context schrieb am 09.10.2022 um 15:19:
>>> Hi,
>>>
>>> is there a way to have something like
>>>
>>> \setuppapersize[A5][A4]
>>>
>>> but have the "inner paper size" be a computed fit like in
>>> \startTEXpage?
>>>
>>> Or, alternatively, is there is a way to print crop marks around
>>> an environment like \startTEXpage?
>>
>> Can you be more concrete what your goal is, there are a few ways to solve
>> your problem but with a few more information we can give you a good
>> solution.
> 
> Say I want to print some stickers or paper strips of non-fixed size,
> and get crop marks around them to know where to cut.
> 
> With \setuppapersize and \setuparranging I can do this nicely if I
> know the size in advance, but in some cases I don't.
\unprotect % fix needed

\def\page_boxes_apply_offset % #box
   {\unless\ifdim\topoffset=\zeropoint
      \expandafter\page_boxes_apply_offset_indeed
    \orunless\ifdim\backoffset=\zeropoint
      \expandafter\page_boxes_apply_offset_indeed
    \else
      \expandafter\gobbleoneargument
    \fi}

\protect

\definepapersize
   [label]
   [width=6cm,
    height=25mm]

\setuppapersize
   [label] [A4]

\setuplayout
   [page]

\setuppaper
   [nx=3,
    ny=10,
    dx=1mm,
    dy=1mm]

\setuplayout
   [horoffset=50mm,
    veroffset=10mm]

\setuparranging
   [XY]

\setupbackgrounds
   [page]
   [frame=on]

\starttext
     \dorecurse{56}
       {\startpagemakeup
          \midaligned{test #1}
        \stoppagemakeup}
\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: startTEXpage on A4
  2022-10-09 16:39     ` Hans Hagen via ntg-context
@ 2022-10-09 18:49       ` Leah Neukirchen via ntg-context
  2022-10-09 19:11         ` Henning Hraban Ramm via ntg-context
  2022-10-10 12:39         ` Willi Egger via ntg-context
  0 siblings, 2 replies; 8+ messages in thread
From: Leah Neukirchen via ntg-context @ 2022-10-09 18:49 UTC (permalink / raw)
  To: ntg-context; +Cc: Leah Neukirchen

Hans Hagen via ntg-context <ntg-context@ntg.nl> writes:

> On 10/9/2022 3:52 PM, Leah Neukirchen via ntg-context wrote:
>> Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> writes:
>> 
>>> Leah Neukirchen via ntg-context schrieb am 09.10.2022 um 15:19:
>>>> Hi,
>>>>
>>>> is there a way to have something like
>>>>
>>>> \setuppapersize[A5][A4]
>>>>
>>>> but have the "inner paper size" be a computed fit like in
>>>> \startTEXpage?
>>>>
>>>> Or, alternatively, is there is a way to print crop marks around
>>>> an environment like \startTEXpage?
>>>
>>> Can you be more concrete what your goal is, there are a few ways to solve
>>> your problem but with a few more information we can give you a good
>>> solution.
>> Say I want to print some stickers or paper strips of non-fixed size,
>> and get crop marks around them to know where to cut.
>> With \setuppapersize and \setuparranging I can do this nicely if I
>> know the size in advance, but in some cases I don't.
>
> \definepapersize
>   [label]
>   [width=6cm,
>    height=25mm]

But that requires knowing the size in advance.  Think of the labels in
a museum that depend how long the description is. ;)

-- 
Leah Neukirchen  <leah@vuxu.org>  https://leahneukirchen.org/
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: startTEXpage on A4
  2022-10-09 18:49       ` Leah Neukirchen via ntg-context
@ 2022-10-09 19:11         ` Henning Hraban Ramm via ntg-context
  2022-10-10 12:39         ` Willi Egger via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-10-09 19:11 UTC (permalink / raw)
  To: Leah Neukirchen via ntg-context; +Cc: Henning Hraban Ramm

Am 09.10.22 um 20:49 schrieb Leah Neukirchen via ntg-context:

> But that requires knowing the size in advance.  Think of the labels in
> a museum that depend how long the description is. ;)

Well, on the labels in the church museum (https://staurothek.de) in 
Limburg/Lahn, the text just stops if it’s too long ;P
(No, really, whoever was in charge of the labels there did a crap job. 
On a big sign there are even correction remarks left.)

Hraban

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: startTEXpage on A4
  2022-10-09 18:49       ` Leah Neukirchen via ntg-context
  2022-10-09 19:11         ` Henning Hraban Ramm via ntg-context
@ 2022-10-10 12:39         ` Willi Egger via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Willi Egger via ntg-context @ 2022-10-10 12:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

I would suggest the approach of Wolfgang because the standard setting of \framed(texts)’ width is fit and the height setting can be changed to this too. Further I would suggest to use an overlay and a Metafun graphic for the cut-indicators.


\defineoverlay[Cutpointstight][\useMPgraphic{Cutpointstight}]

\startuniqueMPgraphic{Cutpointstight}
		path p;
		p := unitsquare xscaled OverlayWidth yscaled OverlayHeight;
		draw ulcorner p;
		draw urcorner p;
		draw llcorner p;
		draw lrcorner p;
\stopuniqueMPgraphic

\framedtext
	[height=fit,
         align={lohi,center},
	 background=Cutpointstight,
         foregroundcolor=black,
         frame=off,
	 offset=3pt]
	{{\tfa HALITGARII EPISCOPI
	 \blank[small]
	 De vitiis et virtutibus
	 \blank[small]
	 Ordinum Poenitentium}
	\blank[small]
	Libri V.}

I hope this solves your issue

Willi
> On 9 Oct 2022, at 20:49, Leah Neukirchen via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Hans Hagen via ntg-context <ntg-context@ntg.nl> writes:
> 
>> On 10/9/2022 3:52 PM, Leah Neukirchen via ntg-context wrote:
>>> Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> writes:
>>> 
>>>> Leah Neukirchen via ntg-context schrieb am 09.10.2022 um 15:19:
>>>>> Hi,
>>>>> 
>>>>> is there a way to have something like
>>>>> 
>>>>> \setuppapersize[A5][A4]
>>>>> 
>>>>> but have the "inner paper size" be a computed fit like in
>>>>> \startTEXpage?
>>>>> 
>>>>> Or, alternatively, is there is a way to print crop marks around
>>>>> an environment like \startTEXpage?
>>>> 
>>>> Can you be more concrete what your goal is, there are a few ways to solve
>>>> your problem but with a few more information we can give you a good
>>>> solution.
>>> Say I want to print some stickers or paper strips of non-fixed size,
>>> and get crop marks around them to know where to cut.
>>> With \setuppapersize and \setuparranging I can do this nicely if I
>>> know the size in advance, but in some cases I don't.
>> 
>> \definepapersize
>>  [label]
>>  [width=6cm,
>>   height=25mm]
> 
> But that requires knowing the size in advance.  Think of the labels in
> a museum that depend how long the description is. ;)
> 
> -- 
> Leah Neukirchen  <leah@vuxu.org>  https://leahneukirchen.org/
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-10 12:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-09 13:19 startTEXpage on A4 Leah Neukirchen via ntg-context
2022-10-09 13:48 ` Wolfgang Schuster via ntg-context
2022-10-09 13:52   ` Leah Neukirchen via ntg-context
2022-10-09 14:02     ` Wolfgang Schuster via ntg-context
2022-10-09 16:39     ` Hans Hagen via ntg-context
2022-10-09 18:49       ` Leah Neukirchen via ntg-context
2022-10-09 19:11         ` Henning Hraban Ramm via ntg-context
2022-10-10 12:39         ` Willi Egger via ntg-context

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).