Re: [NTG-context] Moving horizontally a whole ensemble of layers in the same run?

2019-12-17 Thread Hans Hagen

On 12/17/2019 7:18 PM, Rudolf Bahr wrote:


Hi Hans,

assume we fixed between "\definelayer" and "\flushlayer" a whole ensemble
of layers on a page. And by calculating per luacode we determined the leftmost
and the rightmost edge of the ensemble and would now like to horizontally centre
the ensemble. We don't know the rightmost edge before we placed the last layer.
By luacode we can calculate how much the centring movement should be, because we
know "\textwidth", but we cannot save the calculated centring value in the 
context
program for another run. Saving the luacode values of hundred of pages in 
flattened
lua tables would be possible, but rather awkward; the problem of relating pages 
to
tables would arise, especially when pages are taken out or additional pages are
inserted.

Do you know a way to settle the centring in the same context run in which the 
layers
are placed? Could "\flushlayer" perform it somehow?

you need to make a MWE to show what you mean

normally

\hbox to {\hss\hss}

is good enough for centering

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
___


[NTG-context] Moving horizontally a whole ensemble of layers in the same run?

2019-12-17 Thread Rudolf Bahr

Hi Hans,

assume we fixed between "\definelayer" and "\flushlayer" a whole ensemble
of layers on a page. And by calculating per luacode we determined the leftmost
and the rightmost edge of the ensemble and would now like to horizontally centre
the ensemble. We don't know the rightmost edge before we placed the last layer.
By luacode we can calculate how much the centring movement should be, because we
know "\textwidth", but we cannot save the calculated centring value in the 
context
program for another run. Saving the luacode values of hundred of pages in 
flattened
lua tables would be possible, but rather awkward; the problem of relating pages 
to
tables would arise, especially when pages are taken out or additional pages are
inserted.

Do you know a way to settle the centring in the same context run in which the 
layers
are placed? Could "\flushlayer" perform it somehow?

Rudolf
___
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] Very strange behaviour of itemize, \quotation and \dots

2019-12-17 Thread Hans Hagen

On 12/17/2019 10:04 AM, Otared Kavian wrote:

Hi Hans,

Last week I sent you a PDF showing a strange behaviour of \startitemize and 
\quotation in LMTX. I finally could nail down the origin of the problem: it 
seems that if the command
  
	\setupsynctex[state=start]


is present twice at the beginning of the document, then the combination \item 
and \quotation and \dots prevents the item to be shown correctly…
(In my case I was typesetting a document with the above command in which a file 
containing it also was \input).

Below is the minimal example and its PDF.

you can check the (lmtx) beta (new luametatex bin etc)

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] Very strange behaviour of itemize, \quotation and \dots

2019-12-17 Thread Hans Hagen

On 12/17/2019 10:04 AM, Otared Kavian wrote:

Hi Hans,

Last week I sent you a PDF showing a strange behaviour of \startitemize and 
\quotation in LMTX. I finally could nail down the origin of the problem: it 
seems that if the command
  
	\setupsynctex[state=start]


is present twice at the beginning of the document, then the combination \item 
and \quotation and \dots prevents the item to be shown correctly…
(In my case I was typesetting a document with the above command in which a file 
containing it also was \input).

Below is the minimal example and its PDF.

Best regards: OK
% begin file: bug-itemize-lmtx.tex

\setupsynctex[stat=start]

\setupsynctex[state=start] % if this is removed then everything is fine…

\setupquotation[style=italic,left={«~},right={~»}]

\showframe
\starttext

\startitemize[n]

\dorecurse{4}{\item This item \quotation{is shown correcly\dots}

\item This item \quotation{\dots is not shown correctly}}

\stopitemize

\stoptext
% end file: bug-itemize-lmtx.tex
took me a while to figure out that it is actually an engine issue 
(obscured in luatex but exposed in luametatex)


fixed in next beta

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
___


[NTG-context] Very strange behaviour of itemize, \quotation and \dots

2019-12-17 Thread Otared Kavian
Hi Hans,

Last week I sent you a PDF showing a strange behaviour of \startitemize and 
\quotation in LMTX. I finally could nail down the origin of the problem: it 
seems that if the command
 
\setupsynctex[state=start]

is present twice at the beginning of the document, then the combination \item 
and \quotation and \dots prevents the item to be shown correctly…
(In my case I was typesetting a document with the above command in which a file 
containing it also was \input).

Below is the minimal example and its PDF.

Best regards: OK
% begin file: bug-itemize-lmtx.tex

\setupsynctex[stat=start]

\setupsynctex[state=start] % if this is removed then everything is fine…

\setupquotation[style=italic,left={«~},right={~»}]

\showframe
\starttext

\startitemize[n]

\dorecurse{4}{\item This item \quotation{is shown correcly\dots} 

\item This item \quotation{\dots is not shown correctly}}

\stopitemize

\stoptext
% end file: bug-itemize-lmtx.tex



bug-itemize-lmtx.pdf
Description: Adobe PDF document
___
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
___