ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>,
	Pablo Rodriguez <oinos@gmx.es>
Subject: Re: issue with images in frames
Date: Fri, 18 Oct 2019 10:08:43 +0200	[thread overview]
Message-ID: <4bb79730-ef59-ebbe-396b-139d484dcd8a@xs4all.nl> (raw)
In-Reply-To: <9b377ef8-912b-d471-fc13-7c4fcfe35b1d@gmail.com>

On 10/17/2019 11:31 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 17.10.2019 um 21:51:
>> Dear list,
>>
>> I have the following sample:
>>
>>      \setupexternalfigures[location=default]
>>      \starttext
>>      \startxtable[option={stretch, width}]
>>          \startxrow
>>              \startxcell
>>                  \dontleavehmode\dorecurse{100}{
>>                      \externalfigure[cow.pdf][scale=50] }
>>              \stopxcell
>>              \startxcell
>>                  \input zapf
>>              \stopxcell
>>          \stopxrow
>>      \stopxtable
>>      \stoptext
>>
>> Some time ago, there were no difference between images and text
>> remaining inside the frame.
> 
> Not a solution but closer to the problem.
> 
> Commenting the \local(left|right)box settings brings the line breaks back.
> 
> \everyforgetall\emptytoks
> 
> \appendtoks
>      \localleftbox {}%
>      \localrightbox{}%
> \to \everyforgetall
> 
> \setupexternalfigures[location=default]
> 
> \starttext
> 
> \vbox
>    {\dontleavehmode
>     \dorecurse{100}
>       {\externalfigure[cow.pdf][scale=50] }}
> 
> \stoptext
Ah, a pretty clever analysis!

This side effect has puzzled me for a while (adding an \allowbreak also 
works). The solution is simple:

- i don't reset when not set (only happens in some special delimiters case)

- i added a safeguard to luametatex (we can't change luatex behaviour) 
not to inject an unneeded local par node (which is the cause of the 
problem) when there is no local box in use

(As setting these boxes can be changed mid par their state is registered 
in the node list in order to be taken into account when a paragraph is 
made. It's a bit pain-in-the-butt mechanism with potential side effects, 
also in terms of memory management. When it was incorporated (irr it 
comes from aleph) it was basically broken but stepwise it got fixed. So, 
it seems another corner case had to be catched. Thanks for noticing.)

Hans

-----------------------------------------------------------------
                                           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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2019-10-18  8:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 19:51 Pablo Rodriguez
2019-10-17 21:31 ` Wolfgang Schuster
2019-10-18  8:08   ` Hans Hagen [this message]
2019-10-18 14:19     ` Pablo Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bb79730-ef59-ebbe-396b-139d484dcd8a@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    --cc=wolfgang.schuster.lists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).