[NTG-context] startTEXpage on A4

Hans Hagen j.hagen at xs4all.nl
Sun Oct 9 18:39:55 CEST 2022


On 10/9/2022 3:52 PM, Leah Neukirchen via ntg-context wrote:
> Wolfgang Schuster via ntg-context <ntg-context at 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
-----------------------------------------------------------------


More information about the ntg-context mailing list