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>,
	Pablo Rodriguez <oinos@gmx.es>
Subject: Re: lmtx-20210118 | Corruption with rotated floats
Date: Sat, 23 Jan 2021 22:43:10 +0100	[thread overview]
Message-ID: <653fa140-7329-e9c6-c0e9-b20ef5125dfb@xs4all.nl> (raw)
In-Reply-To: <98457b5b-e6d9-bf0e-7114-96b17c110ad2@gmx.es>

On 1/23/2021 12:10 PM, Pablo Rodriguez wrote:
> On 1/23/21 8:59 AM, Richard Mahoney wrote:
>> [...]
>> \placetable[here,90]
>>
>> results in the trashing of all subsequent body text in the PDF.
>> [...]
>> This error has been occurring for some time now, and unfortunately,
>> while I would like to keep up the recent releases of LMTX, it is
>> essential that I should be able to rotate tables and images. Does
>> anyone know of a fix?
> 
> Richard,
> 
> a minimal sample with images would read:
> 
>    \setupexternalfigures[location=default]
>    \starttext
>    \placefigure[90, here]{Rotated sample}{\externalfigure[hacker.jpg]}
>    \input zapf
>    \stoptext
> 
> I don’t know why, but both MkIV and current latest (LMTX from
> 2021.01.22 09:41) place the rotated figure on a different page (with 90
> and 270).
> 
> LMTX misplaces next paragraph on next page with both 90 and 270.
> 
> To show the issues with tables, a minimal sample would help. I’m afraid
> I don’t have any experience rotating tables.
The code is not different from mkiv but instead we swap dimens using a 
primitive. When you set \overloadmode=4 (which can be interesting as it 
might reveal issues in a style) the run will quit with an error ... this 
is a fix:

\def\strc_floats_set_page_variant
   {\bgroup
    \strc_floats_set_local_hsize
    \ifcase\c_strc_floats_rotation\else
      % Swapping fails in overloadmode and is also wrong (as it then is 
persistent due
      % to global being inherited).
     %\swapdimens\hsize\vsize
      \scratchdimen\hsize
      \hsize\vsize
      \vsize\scratchdimen
    \fi

(it also indicates that we're cheating with the sizes which when it 
happens global is pretty dangerous ... it works but i admit that it is 
not nice)

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:[~2021-01-23 21:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23  7:59 Richard Mahoney
2021-01-23 11:10 ` Pablo Rodriguez
2021-01-23 21:43   ` Hans Hagen [this message]
2021-01-23 23:00     ` Pablo Rodriguez
2021-02-01 19:18 ` [Solved] Fwd: " Richard Mahoney

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=653fa140-7329-e9c6-c0e9-b20ef5125dfb@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    /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).