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
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) 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 -----------------------------------------------------------------
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
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
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
On Thu, 5 Sep 2019, Otared Kavian wrote:
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.
See https://adityam.github.io/context-blog/post/frame-with-solid-left-line-redux... Aditya
Hi Aditya, Thank you for your reply and for the link to your article: your explanations are cristal clear and the solution for me is to use what you explain. There is only one issue remaining, when using your code, that is: \definetextbackground [leftbartext] [ location=paragraph, mp=mpos:region:leftbar, width=broad, frame=off, framecolor=darkred, rulethickness=.5pt, leftoffset=2ex, % rightoffset=2.25ex, % topoffset=2.25ex, % bottomoffset=2.25ex, background=color, backgroundcolor=white, ] \startuseMPgraphic{mpos:region:leftbar} draw_multi_pars; draw_multi_side; \stopuseMPgraphic then when there is a footnote the leftbartext runs into the footnote, between the number and the footnote itself, and the result is not nice. I did not find a way to push the footnote and its number a little to the right, or the leftbartext to the left. Best regards: OK
On 5 Sep 2019, at 06:45, Aditya Mahajan
wrote: On Thu, 5 Sep 2019, Otared Kavian wrote:
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.
See
https://adityam.github.io/context-blog/post/frame-with-solid-left-line-redux...
Aditya___________________________________________________________________________________ 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 ___________________________________________________________________________________
I have found in similar situations sometimes the easiest fix is to set the
backgroundcolor of footnotes to white (or your page colour if different).
Bests,
DH
On Thu, 5 Sep 2019 at 07:00, Otared Kavian
Hi Aditya,
Thank you for your reply and for the link to your article: your explanations are cristal clear and the solution for me is to use what you explain.
There is only one issue remaining, when using your code, that is:
\definetextbackground [leftbartext] [ location=paragraph, mp=mpos:region:leftbar, width=broad, frame=off, framecolor=darkred, rulethickness=.5pt, leftoffset=2ex, % rightoffset=2.25ex, % topoffset=2.25ex, % bottomoffset=2.25ex, background=color, backgroundcolor=white, ]
\startuseMPgraphic{mpos:region:leftbar} draw_multi_pars; draw_multi_side; \stopuseMPgraphic
then when there is a footnote the leftbartext runs into the footnote, between the number and the footnote itself, and the result is not nice. I did not find a way to push the footnote and its number a little to the right, or the leftbartext to the left.
Best regards: OK
On 5 Sep 2019, at 06:45, Aditya Mahajan
wrote: On Thu, 5 Sep 2019, Otared Kavian wrote:
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.
See
https://adityam.github.io/context-blog/post/frame-with-solid-left-line-redux...
Aditya___________________________________________________________________________________
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
___________________________________________________________________________________
___________________________________________________________________________________ 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
___________________________________________________________________________________
-- Duncan Hothersall, Operations Director CAPDM Limited - Online Program Enablers 0131 477 8620 www.capdm.com Registered in Scotland: SC168970 VAT: 682 846 983 Registered address: 20 Forth Street Edinburgh EH1 3LH UK https://maps.google.com/?q=22+Forth+Street,+Edinburgh,+EH1+3LH,+UK&entry=gmail&source=g Capture, author, publish, deliver and manage your learning materials. *Sign up to the CAPDM newsletter here http://eepurl.com/bqzBQn*
On Thu, 5 Sep 2019, Otared Kavian wrote:
Hi Aditya,
Thank you for your reply and for the link to your article: your explanations are cristal clear and the solution for me is to use what you explain.
There is only one issue remaining, when using your code, that is:
\definetextbackground [leftbartext] [ location=paragraph, mp=mpos:region:leftbar, width=broad, frame=off, framecolor=darkred, rulethickness=.5pt, leftoffset=2ex, % rightoffset=2.25ex, % topoffset=2.25ex, % bottomoffset=2.25ex, background=color, backgroundcolor=white, ]
\startuseMPgraphic{mpos:region:leftbar} draw_multi_pars; draw_multi_side; \stopuseMPgraphic
then when there is a footnote the leftbartext runs into the footnote, between the number and the footnote itself, and the result is not nice. I did not find a way to push the footnote and its number a little to the right, or the leftbartext to the left.
You can move the leftbartex to the left by using `frameoffset=dimension` key. Aditya
participants (5)
-
Aditya Mahajan
-
Duncan Hothersall
-
Hans Hagen
-
Otared Kavian
-
Wolfgang Schuster