ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Strange pagebreaks in LMTX
Date: Thu, 5 Sep 2019 06:27:16 +0200	[thread overview]
Message-ID: <3D99B968-5FC9-4C8F-9D7A-D81DF4B96390@gmail.com> (raw)
In-Reply-To: <49ab9470-ad18-f0af-461e-049d48322145@gmail.com>

Hi Wolfgang,

Thanks for your answer. I tried Hans' suggestion to use \textbackground instead of background: indeed it solves the problem of incorrect page breaks, but it seems that \setuptextbackground « leftframe=on » is not honoured, that is one cannot say for instance:

	\setuptextbackground[frame=off,leftframe=on]

while using \background this would be possible. 
The other issue, as you pointed out is the way the end of \textbackground can be controlled (even though for my case it is not an issue). 

The \sidebar mechanism in order to have a vertical line on the left of each exercise does not work properly neither, because it is difficult to control precisely where it ends.

Best regards: OK


> On 4 Sep 2019, at 18:32, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> 
> Hans Hagen schrieb am 04.09.2019 um 17:58:
>> On 9/4/2019 2:24 PM, Otared Kavian wrote:
>>> Hi all,
>>> 
>>> I have a document which typesets correctly in mkiv giving a PDF file with 7 pages, but the same document typeset with lmtx gives two pages with a strange pagebreak on the second page. Up to now, unfortunately, I could not create a minimal example to show this behaviour, so I put the files in the folder here:
>>> 
>>>     https://www.dropbox.com/sh/7rolmpe47njvy0l/AADmcILO0XgY3Sb6FC2dwMw-a?dl=0 
>>> 
>>> and the PDF file obtained with mkiv is here
>>> 
>>>     https://www.dropbox.com/s/udbz0lulat9vum7/bug-pagebreaks-mkiv.pdf?dl=0 
>>> 
>>> while the one obtained with lmtx is here
>>> 
>>>     https://www.dropbox.com/s/t6kge5lq8otju4y/bug-pagebreaks-lmtx.pdf?dl=0 
>>> 
>>> Also, the TeX file typesets correctly with lmtx, if I don't use textrules, so  I wonder whether there has been some changes in the way such textrules have to be used.
>>> As far as I can remember, two months ago the same file was typeset with lmtx without any problem.
>>> 
>>> Thanks in advance for any help,
>>> Best regards: OK
>> you have some interaction between textrules and backgrounds (and that can be a matter of very small differences in dimensions and rounding and such .. i just don't see a quick way out) ... esp these backgrounds are an old mechanism (maybe i should alias it to textbackgrounds in lmtx)
>> 
>> much better is to use this:
>> 
>> \definetextbackground
>>   [xx]
>>   [location=paragraph]
>> 
>> \starttextbackground[xx]
>> \stoptextbackground
>> 
>> can you try to use that instead? less page overflow too
>> 
>> (actually i should iontegrate some title line in that)
> A limitation of textbackgrounds is the limited control over the vertical space at page breaks.
> 
> With the old background mechanism you get the normal topoffset and bottomoffset values
> but with textbackgrounds you can just control the space at the end and end of the environment.
> 
> \showframe[text][text]
> 
> \starttext
> 
> \dorecurse{3}{\samplefile{knuth}}
> 
> \startbackground[topoffset=1em,bottomoffset=1em]
> \dorecurse{2}{\samplefile{knuth}}
> \stopbackground
> 
> \dorecurse{2}{\samplefile{knuth}}
> 
> \page
> 
> \definetextbackground[xx][location=paragraph,frame=off,background=color,backgroundcolor=gray,topoffset=1em,bottomoffset=1em]
> 
> \dorecurse{3}{\samplefile{knuth}}
> 
> \starttextbackground[xx]
> \dorecurse{2}{\samplefile{knuth}}
> \stoptextbackground
> 
> \dorecurse{2}{\samplefile{knuth}}
> 
> \stoptext
> 
> Wolfgang
> 

___________________________________________________________________________________
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-09-05  4:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 12:24 Otared Kavian
2019-09-04 15:58 ` Hans Hagen
2019-09-04 16:32   ` Wolfgang Schuster
2019-09-05  4:27     ` Otared Kavian [this message]
2019-09-05  4:45       ` Aditya Mahajan
2019-09-05  5:59         ` Otared Kavian
2019-09-05  6:52           ` Duncan Hothersall
2019-09-05  7:32           ` Aditya Mahajan
2019-09-05  8:06             ` Otared Kavian

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=3D99B968-5FC9-4C8F-9D7A-D81DF4B96390@gmail.com \
    --to=otared@gmail.com \
    --cc=ntg-context@ntg.nl \
    /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).