[NTG-context] Document with page 2 only

2019-09-04 Thread Mikael P. Sundqvist
Hi,

with a freshly updated ConTeXt-lmtx and the following document

\starttext
Hello World.
\stoptext

I end up with the following document, having a page 2 only. Log file is
attached (says there are two pages).

/Mikael


pagetwo.pdf
Description: Adobe PDF document
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.08.24 22:50 MKIV beta  fmt: 2019.9.4  int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name '/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name '/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'pagetwo', input './pagetwo', result 'pagetwo'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name './pagetwo.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
backend > xmp > using file '/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 2, userpage 2, subpage 2
close source> level 2, order 3, name './pagetwo.tex'
close source> level 1, order 3, name 'cont-yes.mkiv'

system  > start used files

system  > text: pagetwo

system  > stop used files


system  > start used files

system  >1: filename=char-prv.lua filetype=tex format=tex foundname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/char-prv.lua fullname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/char-prv.lua usedmethod=database
system  >2: filename=cont-yes.mkiv filetype=tex format=tex foundname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv fullname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv usedmethod=database
system  >3: filename=publ-imp-default.lua filetype=lua foundname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua fullname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua usedmethod=database
system  >4: filename=cont-new.mkiv filetype=tex foundname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv fullname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv usedmethod=database
system  >5: filename=lang-exc.lua filetype=lua foundname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua fullname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua usedmethod=database
system  >6: filename=lang-us.lua filetype=lua foundname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua fullname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua usedmethod=database
system  >7: filename=/home/mps/Dropbox/lth/dokument/analysdialog/pagetwo.tex format=tex foundname=/home/mps/Dropbox/lth/dokument/analysdialog/pagetwo.tex fullname=/home/mps/Dropbox/lth/dokument/analysdialog/pagetwo.tex usedmethod=direct
system  >8: filename=lm.lfg filetype=tex foundname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg fullname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg usedmethod=database
system  >9: filename=lmroman12-regular filetype=otf format=otf foundname=/home/mps/ConTeXt-lmtx/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf fullname=/home/mps/ConTeXt-lmtx/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
system  >   10: filename=latinmodern-math.otf filetype=opentypefonts foundname=/home/mps/ConTeXt-lmtx/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf fullname=/home/mps/ConTeXt-lmtx/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
system  >   11: filename=lpdf-pdx.xml filetype=tex foundname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml fullname=/home/mps/ConTeXt-lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml usedmethod=database

system  > stop used files


system  > start commandline options

system  > currentrun="3"
system  > fulljobname="./pagetwo.tex"
system  > input="./pagetwo.tex"
system  > kindofrun="2"
system  > maxnofruns="9"
system  > texmfbinpath="/home/mps/ConTeXt-lmtx/tex/texmf-linux-64/bin"

system  > stop commandline options


system  > start commandline files

system  >1: ./pagetwo.tex

system  > stop commandline files


modules > start used modules

Re: [NTG-context] Document with page 2 only

2019-09-04 Thread Hans Hagen

On 9/4/2019 1:13 PM, Mikael P. Sundqvist wrote:

Hi,

with a freshly updated ConTeXt-lmtx and the following document

\starttext
Hello World.
\stoptext

I end up with the following document, having a page 2 only. Log file is 
attached (says there are two pages).

strange. can you wipe the cache and remake the format?

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
___


Re: [NTG-context] Strange pagebreaks in LMTX

2019-09-04 Thread Wolfgang Schuster

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
___


Re: [NTG-context] Document with page 2 only

2019-09-04 Thread Mikael P. Sundqvist
On Wed, Sep 4, 2019 at 1:37 PM Hans Hagen  wrote:

> On 9/4/2019 1:13 PM, Mikael P. Sundqvist wrote:
> > Hi,
> >
> > with a freshly updated ConTeXt-lmtx and the following document
> >
> > \starttext
> > Hello World.
> > \stoptext
> >
> > I end up with the following document, having a page 2 only. Log file is
> > attached (says there are two pages).
> strange. can you wipe the cache and remake the format?
>
> 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
>
> ___
>

Thanks. Clearing the cache did not help, but reinstalling did. I will test
those things before sending to the list in the future.

/Mikael
___
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
___


[NTG-context] Cross-reference expansion with ConTeXt and processing with LuaTeX

2019-09-04 Thread Oliver von Criegern

Dear list members,

I want to process cross-references in ConTeXt/LuaTeX, that is, to do 
some calculations in Lua with the page and line numbers returned by the 
\at and \inlinerange commands.


But this does not work, as these commands are obviously not being 
expanded before they are passed to Lua.


Here is a minimal example:


|\setupreferencing[state=start]||\definenumber[test]\setnumber[test][5]\startluacodefunction 
TestVar(var)print('VARIABLE: ')print(var)tex.print(var)end 
\stopluacode\def\TestLua#1{\ctxlua{TestVar([==[#1]==])}}% Cf. 
https://www.contextgarden.net/Programming_in_LuaTeX\startbuffer[testtext]\dorecurse{100}{Words, 
words, words. }\stopbuffer\starttext\startlinenumberingCounter: 
\TestLua{\rawcountervalue[test]}\par% The counter is expanded before 
being passed to Lua.Lineref: \TestLua{\inlinerange[1]}\par% The line 
reference is not expanded before being passed to 
Lua.\getbuffer[testtext]\someline[1]LABEL 1 \stoplinenumbering\stoptext|||



\TestLua just passes the argument to the Lua command TestVar, which 
prints it to stdout and returns it to TeX. The pdf result looks good at 
first glance, showing the correct values as expected, but in stdout we read:


|VARIABLE: 5 VARIABLE: \inlinerange[1] |||

The line reference obviously has not been expanded before but only after 
having been passed to the Lua command. Accordingly, when trying to 
perform mathematical calculations on it in Lua, there will be an error.


So how can I pass the value of my reference to Lua?

Best regards,
Oliver


||

___
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
___


Re: [NTG-context] Strange pagebreaks in LMTX

2019-09-04 Thread Hans Hagen

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
-
___
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
___


Re: [NTG-context] Overfull hbox issues: different font,

2019-09-04 Thread Hans Hagen

On 9/3/2019 11:17 PM, Julian G wrote:

Hello everyone,
I apologize if this has been brought up already (or if my mistake is painfully 
obvious), but I'm having a slight issue with overfull hboxes. I think it is 
connected to hyphenation and/or using different fonts.

Test file: at the end of this mail or at 
https://gist.github.com/JulianGmp/fe20df633554f5aff02e02eb47a6780f
The output PDF I got: https://i.imgur.com/c8S7Di5.png


give tex a bit more room for dealing with it:

\setupalign[tolerant]

or in large document where you don't want to tweak:

\setupalign[tolerant,stretch]

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
___


Re: [NTG-context] Overfull hbox issues: different font,

2019-09-04 Thread Wolfgang Schuster

Julian G schrieb am 03.09.2019 um 23:17:

Hello everyone,
I apologize if this has been brought up already (or if my mistake is painfully 
obvious), but I'm having a slight issue with overfull hboxes. I think it is 
connected to hyphenation and/or using different fonts.

Test file: at the end of this mail or at 
https://gist.github.com/JulianGmp/fe20df633554f5aff02e02eb47a6780f
The output PDF I got: https://i.imgur.com/c8S7Di5.png

Best regards,
Julian



% Compiled document (screenshot):
% https://i.imgur.com/c8S7Di5.png

\setuppapersize[A4]
\showframe

\setuplayout[
topspace=1cm,
header=0cm,
width=16cm,
footer=0cm,
bottom=1cm,
]

\definefontfamily[arialFamily]   [sans]  [Arial]
\definefontfamily[calibriFamily] [sans]  [Calibri]
% \setupbodyfont[myfontfamily, 12pt]

\define\printExample{Es kann allerdings ein Problem auftreten: Es ist nicht 
immer eindeutig, ob die gemessen Phasenerschiebung eine komplette Umdrehung 
enthaltem. Angenommen sei eine gemessene Verschiebung von \m{\Delta_{\varphi}}, 
visualisiert in Abbildung 10 ... \blank[small] Zwar wird dadurch eine gewisse 
Übersicht geschaffen, jedoch werden potentielle Namens-
konflikte nicht verhindert.}

\setuptolerance[verytolerant]

or

\setupalign[verytolerant]

\starttext

\language[de]


\section{Standard Font}
\subsection{German}
\language[de] \printExample{}
\subsection{English}
\language[en] \printExample{}


\switchtobodyfont[arialFamily, 12pt]
\section{Arial 12pt}
\subsection{German}
\language[de] \printExample{}
\subsection{English}
\language[en] \printExample{}

\page

\switchtobodyfont[calibriFamily, 14pt]
\section{Calibri 14pt}
\subsection{German}
\language[de] \printExample{}
\subsection{English}
\language[en] \printExample{}

\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
___


[NTG-context] Strange pagebreaks in LMTX

2019-09-04 Thread Otared Kavian
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


___
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
___


[NTG-context] Biblatex \crossref equivalent in bibliographies

2019-09-04 Thread Damien Thiriet
Hi,




With biblatex I was using crossref to shorten my .bib files, as can be
seen in this MWE

@periodical{DebatMem2002,
title = {Le Débat},
number = {122},
langid = {french},
date = {2002}
}
@article{ChartiersurRicoeur2002,
author = {Roger Chartier},
title = {Le passé au présent},
crossref = {DebatMem2002},
pages = {4--11}
}

Which keys should I use to achieve the same under ConTeXt? I found xcrossref
and percentcrossref keys "Bibliographies.  The ConTeXt way" but could'nt figure 
out
how to use them. Here is my ConTeXt MWE
as a starting point

\language [fr]
\startbuffer [bib]

@periodical{DebatMem2002,
   title = {Le Débat},
   number = {122},
   langid = {french},
   date = {2002}
}
@article{ChartiersurRicoeur2002,
   author = {Roger
   Chartier},
   title = {Le passé au présent},
   xcrossref = {DebatMem2002}, %does not work the way I would expect
   pages = {4--11}
}

\stopbuffer
\usebtxdataset[bib.buffer]
\usebtxdefinitions[apa]
\definebtxrendering
[example][apa]

\starttext
\nocite[ChartiersurRicoeur2002]
\placelistofpublications
\stoptext

Thanks,

Damien Thiriet
___
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
___


Re: [NTG-context] Strange pagebreaks in LMTX

2019-09-04 Thread Otared Kavian
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
> 

___
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
___


Re: [NTG-context] Strange pagebreaks in LMTX

2019-09-04 Thread Aditya Mahajan

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
___


Re: [NTG-context] Strange pagebreaks in LMTX

2019-09-04 Thread 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
___