* [NTG-context] [ \startTEXpage with \strut ]
@ 2024-12-07 8:10 vm via ntg-context
2024-12-08 12:54 ` [NTG-context] " Wolfgang Schuster
0 siblings, 1 reply; 2+ messages in thread
From: vm via ntg-context @ 2024-12-07 8:10 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: vm
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
Trying to get a single page of a specific size, I set the width and
height of \startTEXpage only to find out that a \strut as a last command
before the \stopTEXpage, will expand the height.
8<----
\setuppapersize [A2]
\starttext
\startTEXpage[offset=0mm, width=220mm, height=110mm]
MWE without \type{\strut} -> Landscape (220 × 110 mm)
%MWE with \type{\strut} -> Landscape (220 × 111 mm)
%\strut
\stopTEXpage
\stoptext
--->8
There if probably a reason to it,
so I'd like to know why it works as it does.
.F
[-- Attachment #2: without_strut.pdf --]
[-- Type: application/pdf, Size: 9822 bytes --]
[-- Attachment #3: with_strut.pdf --]
[-- Type: application/pdf, Size: 9650 bytes --]
[-- Attachment #4: 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] 2+ messages in thread
* [NTG-context] Re: [ \startTEXpage with \strut ]
2024-12-07 8:10 [NTG-context] [ \startTEXpage with \strut ] vm via ntg-context
@ 2024-12-08 12:54 ` Wolfgang Schuster
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2024-12-08 12:54 UTC (permalink / raw)
To: mailing list for ConTeXt users, vm via ntg-context
vm via ntg-context schrieb am 07.12.2024 um 09:10:
> Trying to get a single page of a specific size, I set the width and
> height of \startTEXpage only to find out that a \strut as a last
> command before the \stopTEXpage, will expand the height.
>
> 8<----
>
> \setuppapersize [A2]
> \starttext
> \startTEXpage[offset=0mm, width=220mm, height=110mm]
> MWE without \type{\strut} -> Landscape (220 × 110 mm)
> %MWE with \type{\strut} -> Landscape (220 × 111 mm)
> %\strut
> \stopTEXpage
> \stoptext
>
> --->8
The problem here is "\pack_framed_initialize" which was added in LMTX
and causes a problem with the parameter handler.
%%%% page-app.mkxl
\def\page_fitting_start_normal
{\setbox\b_page_fitting\hbox
\bgroup
\inheritedfittingpageframed
\bgroup
\pack_framed_initialize
\ignorepars} % \gobblespacetokens} brr also gobbles next assingment
%%%%
When you compare the output of the following two boxes you will notice
the second box has a depth (the part below the dashed line) while the
first one hasn't.
This happens only when you set an instance for the frame because now
ConTeXt fails to use the default value for "bottom".
When you now remove "\csname pack_framed_initialize\endcsname" from the
example or add "bottom=\vss" to \setuptest the second box has the
correct height.
%%%% begin example
\unprotect
\installnamespace {test}
\installframedcommandhandler \????test {test} \????test
\protect
\starttext
\setuptest
[frame=off,
offset=overlay,
align=normal,
width=4cm,
height=4cm]
\start \showboxes
\let\currenttest\empty
\setbox\scratchbox\hbox\bgroup
\inheritedtestframed\bgroup
\csname pack_framed_initialize\endcsname
\strut xxx
\egroup
\egroup
\box\scratchbox
\definetest[foo]
\def\currenttest{foo}
\setbox\scratchbox\hbox\bgroup
\inheritedtestframed\bgroup
\csname pack_framed_initialize\endcsname
\strut xxx
\egroup
\egroup
\box\scratchbox
\stop
\stoptext
%%%% end example
Wolfgang
___________________________________________________________________________________
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] 2+ messages in thread
end of thread, other threads:[~2024-12-08 12:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-07 8:10 [NTG-context] [ \startTEXpage with \strut ] vm via ntg-context
2024-12-08 12:54 ` [NTG-context] " Wolfgang Schuster
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).