Re: [NTG-context] compilation error in LMTX

2020-08-13 Thread Jannik Voges

Hello,


I have a similar problem with long context-documents (but not all long
context-documents are affected and I don't know what triggers the
error). Sometimes, the errors (error code 139) are happening on second
or third runs (but it might happen on first runs too). When I remove the
chapter where the error happens and all later chapters from the document
it might happen, that the error occures in an earlier chapter.
In addition to that, documents, which had this error yesterday, can now
be compiled without the problem and other documents without the error
yesterday have the error today. Its really strange.


Thanks to all,

Jannik


Am 13.08.20 um 12:49 schrieb Pablo Rodriguez:
> Dear list,
> 
> compiling a huge XML document (output PDF > 1200 pages), I get the
> following error with latest current (2020.08.11 15:59):
> 
>   pages   > flushing realpage 187, userpage 187, subpage 3
>   mtx-context | fatal error: return code: 139
>   Compilation failed.
> 
> Some hints about what I cannot avoid considering a cryptic error message:
> 
> 1. There is no previous warning when compiling previous pages.
> 1. The compulation error appears on the third run.
> 1. ConTeXt latest from 2020.08.07 23:37 compiles this just fine.
> 
> Sorry, there is no minimal sample here. Any ideas about this? Or at
> least, any chances for the source that is breaking compilation?
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> 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
> ___
> 


0x805A4918E8698418.asc
Description: application/pgp-keys
___
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] Two questions about color in MetaFun

2020-08-13 Thread Jairo A. del Rio
Using \MPcolor does it for me. Thank you very much, Aditya :)

Jairo :)

El jue., 13 de ago. de 2020 a la(s) 18:47, Aditya Mahajan (adit...@umich.edu)
escribió:

> On Thu, 13 Aug 2020, Jairo A. del Rio wrote:
>
> > Hi, list! I have two questions concerning MetaFun:
> >
> > 1st:
> >
> > What is the correct way to pass a ConTeXt named color (e.g. xwi's
> "maroon")
> > to MetaFun. Using (with \usecolors[xwi] loaded in the preamble):
> >
> > withcolor maroon
> >
> > does not work.
>
> You need:
>
> withcolor \MPcolor{maroon}
>
> or (note the quotes)
>
> withcolor "maroon"
>
> > 2nd:
> >
> > I was trying to do some stuff for my girlfriend using ConTeXt and I tried
> > to randomize colors in MetaFun using normaldeviate. However, something
> > interesting happens. The following:
> >
> > [snip]
> >
> > changes the color of every letter. I don't complain (in fact it does look
> > better), but I still have a question: what should I do if I wanted to
> > select a random color first and then use it for the entire content?
> Thanks
> > in advance.
>
>
> newcolor randomcolor;
> randomcolor := (normaldeviate, normaldeviate, normaldeviate);
>
>  withcolor randomcolor;
>
> 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
___


Re: [NTG-context] headers again

2020-08-13 Thread jbf
I will let the people with far superior knowledge than I have work 
through this, but I am following it with interest. All I can say is that 
by adopting Aditya's solution, ensuring that for the unnumbered titles I 
also included 'number=no', the numbered chapters did increment 
correctly, after being interrupted by an unnumbered one.


Julian

On 14/8/20 9:44 am, Aditya Mahajan wrote:

On Thu, 13 Aug 2020, Wolfgang Schuster wrote:


Aditya Mahajan schrieb am 13.08.2020 um 04:53:

On Thu, 13 Aug 2020, jbf wrote:


Where running heads (headers) are concerned, if I use \chapter I have no
problems, nor should I expect any. But because I am also using \title,
given that I need some unnumbered chapters interspersed  among them, I
run into difficulties with headers. Numbered chapters have the correct
headers, unnumbered ones (with \title) either don't have them, or do not
have the proper chapter header (they pick up the header from the
previous numbered chapter).

At the moment the only thing I have in the preamble is the expected set
of commands for the numbered chapters:

    [{\hfill\getmarking[chapter]\hfill}][]
     [{\hfill\documentvariable{metadata:title}\hfill}][]

I thought that might work for the unnumbered ones (\title), thinking
that maybe \title inherits from \chapter, but it doesn't. But no amount
of variations on the above commands (repeating them but replacing
'chapter' with 'title'; adding [title] or just title, in the first set
of commands in various positions...) gives me the correct result.

I am assuming, of course, that there is a solution to this difficulty,
and that it may be simple. But I haven't found it. Is the problem that I
am using \title in the main body to get my unnumbered chapters? I
wouldn't think so? It produces the correct result, utlimatley, in the
TOC, Is it possible that I may have something else in my preamble that
is causing the problem? If so, I can't expect someone to 'guess' that
from outside! But at the moment I don't think that is the problem.

If not a direct solution, are there any clues someone might give me that
will lead me to finding my own solution? It would be much appreciated.

A rose by any other name would smell as sweet ...

\showframe
\setupheadertexts[\setups{header}]

\startsetups header
\getmarking[chapter]
\stopsetups

\starttext
\startchapter[title={This is a chapter}]
\input knuth
\page
\input knuth
\stopchapter

\startchapter[title={This is a title}, number=no]
\input ward
\page
\input knuth
\stopchapter
\stoptext

Don't do this, unnumbered chapter still increase the counter and
when you add another chapter afterwards you wonder why the number
is wrong.

(this reply is in jest )

incrementnumber=no,


The correct way here is to reset the marking entries
at the begin of a new chapter or title with

\setuphead
   [chapter,title]
   [marking=reset]

Agreed. This is a better solution. Any idea why this is not the default?

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
___


Re: [NTG-context] Two questions about color in MetaFun

2020-08-13 Thread Aditya Mahajan
On Thu, 13 Aug 2020, Jairo A. del Rio wrote:

> Hi, list! I have two questions concerning MetaFun:
> 
> 1st:
> 
> What is the correct way to pass a ConTeXt named color (e.g. xwi's "maroon")
> to MetaFun. Using (with \usecolors[xwi] loaded in the preamble):
> 
> withcolor maroon
> 
> does not work. 

You need:

withcolor \MPcolor{maroon}

or (note the quotes)

withcolor "maroon"  

> 2nd:
> 
> I was trying to do some stuff for my girlfriend using ConTeXt and I tried
> to randomize colors in MetaFun using normaldeviate. However, something
> interesting happens. The following:
>
> [snip]
> 
> changes the color of every letter. I don't complain (in fact it does look
> better), but I still have a question: what should I do if I wanted to
> select a random color first and then use it for the entire content? Thanks
> in advance.


newcolor randomcolor; 
randomcolor := (normaldeviate, normaldeviate, normaldeviate);

 withcolor randomcolor;

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] headers again

2020-08-13 Thread Aditya Mahajan
On Thu, 13 Aug 2020, Wolfgang Schuster wrote:

> Aditya Mahajan schrieb am 13.08.2020 um 04:53:
> > On Thu, 13 Aug 2020, jbf wrote:
> > 
> > > Where running heads (headers) are concerned, if I use \chapter I have no
> > > problems, nor should I expect any. But because I am also using \title,
> > > given that I need some unnumbered chapters interspersed  among them, I
> > > run into difficulties with headers. Numbered chapters have the correct
> > > headers, unnumbered ones (with \title) either don't have them, or do not
> > > have the proper chapter header (they pick up the header from the
> > > previous numbered chapter).
> > > 
> > > At the moment the only thing I have in the preamble is the expected set
> > > of commands for the numbered chapters:
> > > 
> > >    [{\hfill\getmarking[chapter]\hfill}][]
> > >     [{\hfill\documentvariable{metadata:title}\hfill}][]
> > > 
> > > I thought that might work for the unnumbered ones (\title), thinking
> > > that maybe \title inherits from \chapter, but it doesn't. But no amount
> > > of variations on the above commands (repeating them but replacing
> > > 'chapter' with 'title'; adding [title] or just title, in the first set
> > > of commands in various positions...) gives me the correct result.
> > > 
> > > I am assuming, of course, that there is a solution to this difficulty,
> > > and that it may be simple. But I haven't found it. Is the problem that I
> > > am using \title in the main body to get my unnumbered chapters? I
> > > wouldn't think so? It produces the correct result, utlimatley, in the
> > > TOC, Is it possible that I may have something else in my preamble that
> > > is causing the problem? If so, I can't expect someone to 'guess' that
> > > from outside! But at the moment I don't think that is the problem.
> > > 
> > > If not a direct solution, are there any clues someone might give me that
> > > will lead me to finding my own solution? It would be much appreciated.
> > 
> > A rose by any other name would smell as sweet ...
> > 
> > \showframe
> > \setupheadertexts[\setups{header}]
> > 
> > \startsetups header
> >\getmarking[chapter]
> > \stopsetups
> > 
> > \starttext
> > \startchapter[title={This is a chapter}]
> >\input knuth
> >\page
> >\input knuth
> > \stopchapter
> > 
> > \startchapter[title={This is a title}, number=no]
> >\input ward
> >\page
> >\input knuth
> > \stopchapter
> > \stoptext
> 
> Don't do this, unnumbered chapter still increase the counter and
> when you add another chapter afterwards you wonder why the number
> is wrong. 

(this reply is in jest )

incrementnumber=no, 

> The correct way here is to reset the marking entries
> at the begin of a new chapter or title with
> 
> \setuphead
>   [chapter,title]
>   [marking=reset]

Agreed. This is a better solution. Any idea why this is not the default?

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
___


[NTG-context] Two questions about color in MetaFun

2020-08-13 Thread Jairo A. del Rio
Hi, list! I have two questions concerning MetaFun:

1st:

What is the correct way to pass a ConTeXt named color (e.g. xwi's "maroon")
to MetaFun. Using (with \usecolors[xwi] loaded in the preamble):

withcolor maroon

does not work. I could copy-paste definitions from ConTeXt sources and do
e.g.

\definecolor [maroon][r=.690196,g=.188235,b=.376471]

but it is unfeasible for complete color schemes. So, is there a better way
to do it?

2nd:

I was trying to do some stuff for my girlfriend using ConTeXt and I tried
to randomize colors in MetaFun using normaldeviate. However, something
interesting happens. The following:

\setuplayout[width=middle]
\setuppagenumbering[state=stop]
\setuppapersize[A10,landscape][A10,landscape]
\starttext
\startuseMPgraphic{cornystuff}
draw outlinetext.f ("\framedtext[frame=off,width=fit,align=middle]{I love
you \\ \CONTEXT}") %\CONTEXT is not my girlfriend, it's just for the example
(withcolor (normaldeviate,normaldeviate,normaldeviate) withpen pencircle
scaled 1/5)
scaled 1 ;
\stopuseMPgraphic
\dorecurse{20}{%
\startplacefigure[location=force,number=no]
\useMPgraphic{cornystuff}
\stopplacefigure
\page[yes]
}
\stoptext

changes the color of every letter. I don't complain (in fact it does look
better), but I still have a question: what should I do if I wanted to
select a random color first and then use it for the entire content? Thanks
in advance.

Jairo :)
___
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] weird issue with xtable

2020-08-13 Thread Pablo Rodriguez
On 8/13/20 10:11 PM, Wolfgang Schuster wrote:
> Wolfgang Schuster schrieb am 13.08.2020 um 20:47:
>> [...]
>> You can use nested frames:
>>
>> \startsetups[...]
>>      \startframed[offset=overlay,frame=off]
>>      \framed[width=.22\textiwdth]{\pinter}
>>      \framed[width=.24\textiwdth]{\latint}
>>      \framed[width=.08\textiwdth]{\pcentr}
>>      \framed[width=.24\textiwdth]{\latext}
>>      \framed[width=.22\textiwdth]{\pexter}
>>      \stopframed
>> \stopsetups
>
> To get the correct width with column change \textwidth
> to \makeupwidth or just use \hsize which is the width
> of the footer.

Many thanks for both replies, Wolfgang.

They have solved the issues I had in this thread and also the other ones
I reported today that involved error 139.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] weird issue with xtable

2020-08-13 Thread Wolfgang Schuster

Wolfgang Schuster schrieb am 13.08.2020 um 20:47:

Pablo Rodriguez schrieb am 13.08.2020 um 20:30:

On 8/13/20 6:06 PM, Wolfgang Schuster wrote:

[...]
What am I doing wrong here? (To avoid an error, I get other errors.)


There are not enough information to help you.


I discovered what was wrong: I had an xtable on the footer to set the
page numbering.

So I replaced it with the following tabulation:

\starttabulate
 [|lw(.22\textwidth)|
   cw(.24\textwidth)|
   cw(.08\textwidth)|
   cw(.24\textwidth)|
   rw(.22\textwidth)|]
 [unit=0pt]
\NC\pinter\NC\latint\NC\pcentr\NC\latext\NC\pexter\NC\NR
\stoptabulate


You can use nested frames:

\startsetups[...]
     \startframed[offset=overlay,frame=off]
     \framed[width=.22\textiwdth]{\pinter}
     \framed[width=.24\textiwdth]{\latint}
     \framed[width=.08\textiwdth]{\pcentr}
     \framed[width=.24\textiwdth]{\latext}
     \framed[width=.22\textiwdth]{\pexter}
     \stopframed
\stopsetups


To get the correct width with column change \textwidth
to \makeupwidth or just use \hsize which is the width
of the footer.

\startsetups[...]
\startframed[offset=overlay,frame=off]
\framed[width=.22\hsize]{...}
\framed[width=.24\hsize]{...}
\framed[width=.08\hsize]{...}
\framed[width=.24\hsize]{...}
\framed[width=.22\hsize]{...}
\stopframed
\stopsetups

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] Help on tweaking alignment, page numbers and ToC

2020-08-13 Thread Nicola
On 2020-08-13, Pablo Rodriguez  wrote:
> On 8/13/20 6:06 PM, Nicola wrote:
>> [...]
>> Thanks. That works with my MWE, but in my document I actually have
>> a chapter, and chapters start on the right page, even if I add page=no
>> to \setuppagenumbering:
>> [...]
>> I have no idea how to allow chapters to start at arbitrary pages when
>> alternative=doublesided.
>
> Use \page[yes, blank] instead of \page[yes, blank, right].
>
> I hope this helps,

Thank you both. I had tried `yes` already, but I had mixed it with other
interfering settings, which got me confused. Now that I have cleand up
my code, everything is as expected.

Nicola

___
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] weird issue with xtable

2020-08-13 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 13.08.2020 um 20:30:

On 8/13/20 6:06 PM, Wolfgang Schuster wrote:

[...]
What am I doing wrong here? (To avoid an error, I get other errors.)


There are not enough information to help you.


I discovered what was wrong: I had an xtable on the footer to set the
page numbering.

So I replaced it with the following tabulation:

\starttabulate
 [|lw(.22\textwidth)|
   cw(.24\textwidth)|
   cw(.08\textwidth)|
   cw(.24\textwidth)|
   rw(.22\textwidth)|]
 [unit=0pt]
\NC\pinter\NC\latint\NC\pcentr\NC\latext\NC\pexter\NC\NR
\stoptabulate


You can use nested frames:

\startsetups[...]
\startframed[offset=overlay,frame=off]
\framed[width=.22\textiwdth]{\pinter}
\framed[width=.24\textiwdth]{\latint}
\framed[width=.08\textiwdth]{\pcentr}
\framed[width=.24\textiwdth]{\latext}
\framed[width=.22\textiwdth]{\pexter}
\stopframed
\stopsetups

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] tabulation and \textwidth

2020-08-13 Thread Pablo Rodriguez
Dear list,

I have this sample:

  \showframe
  \startsetups[footers]
  \starttabulate
[|cw(.5\textwidth)|
 cw(.5\textwidth)|]
[unit=0pt]
  \NC one\NC two\NC\NR
  \stoptabulate
  \stopsetups

  \setupfootertexts[\directsetup{footers}]
  \starttext
  \dorecurse{20}{\input{zapf.tex}\par}
  \startitemize[columns, two]
  \dorecurse{20}
{\startitem\input{zapf.tex}\stopitem}
  \stopitemize
  \startitemize[columns, three]
  \dorecurse{15}
{\startitem\input{zapf.tex}\stopitem}
  \stopitemize
  \startitemize[columns, four]
  \dorecurse{10}
{\startitem\input{zapf.tex}\stopitem}
  \stopitemize
  \stoptext

How can I avoid that tabulation alters the \textwidth so that it remains
constant and item columns doesn’t afect it?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] weird issue with xtable

2020-08-13 Thread Pablo Rodriguez
On 8/13/20 6:06 PM, Wolfgang Schuster wrote:
>> [...]
>> What am I doing wrong here? (To avoid an error, I get other errors.)
>
> There are not enough information to help you.

I discovered what was wrong: I had an xtable on the footer to set the
page numbering.

So I replaced it with the following tabulation:

\starttabulate
[|lw(.22\textwidth)|
  cw(.24\textwidth)|
  cw(.08\textwidth)|
  cw(.24\textwidth)|
  rw(.22\textwidth)|]
[unit=0pt]
\NC\pinter\NC\latint\NC\pcentr\NC\latext\NC\pexter\NC\NR
\stoptabulate

But this gave me error number 139 (the same one as reported at
https://mailman.ntg.nl/pipermail/ntg-context/2020/099113.html):

  pages   > flushing realpage 187, userpage 187, subpage 3
  mtx-context | fatal error: return code: 139
  Compilation failed.

This happened using LMTX previous to latest (2020.08.09, I think). Now I
switched to 2020.08.03 14:25, which seems to have no issues with my
documents.

This needs further investigation, I hope to do that in a not so distant
future.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] headers again

2020-08-13 Thread Wolfgang Schuster

Aditya Mahajan schrieb am 13.08.2020 um 04:53:

On Thu, 13 Aug 2020, jbf wrote:


Where running heads (headers) are concerned, if I use \chapter I have no
problems, nor should I expect any. But because I am also using \title,
given that I need some unnumbered chapters interspersed  among them, I
run into difficulties with headers. Numbered chapters have the correct
headers, unnumbered ones (with \title) either don't have them, or do not
have the proper chapter header (they pick up the header from the
previous numbered chapter).

At the moment the only thing I have in the preamble is the expected set
of commands for the numbered chapters:

   [{\hfill\getmarking[chapter]\hfill}][]
    [{\hfill\documentvariable{metadata:title}\hfill}][]

I thought that might work for the unnumbered ones (\title), thinking
that maybe \title inherits from \chapter, but it doesn't. But no amount
of variations on the above commands (repeating them but replacing
'chapter' with 'title'; adding [title] or just title, in the first set
of commands in various positions...) gives me the correct result.

I am assuming, of course, that there is a solution to this difficulty,
and that it may be simple. But I haven't found it. Is the problem that I
am using \title in the main body to get my unnumbered chapters? I
wouldn't think so? It produces the correct result, utlimatley, in the
TOC, Is it possible that I may have something else in my preamble that
is causing the problem? If so, I can't expect someone to 'guess' that
from outside! But at the moment I don't think that is the problem.

If not a direct solution, are there any clues someone might give me that
will lead me to finding my own solution? It would be much appreciated.


A rose by any other name would smell as sweet ...

\showframe
\setupheadertexts[\setups{header}]

\startsetups header
   \getmarking[chapter]
\stopsetups

\starttext
\startchapter[title={This is a chapter}]
   \input knuth
   \page
   \input knuth
\stopchapter

\startchapter[title={This is a title}, number=no]
   \input ward
   \page
   \input knuth
\stopchapter
\stoptext


Don't do this, unnumbered chapter still increase the counter and
when you add another chapter afterwards you wonder why the number
is wrong. The correct way here is to reset the marking entries
at the begin of a new chapter or title with

\setuphead
  [chapter,title]
  [marking=reset]

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] Help on tweaking alignment, page numbers and ToC

2020-08-13 Thread Wolfgang Schuster

Nicola schrieb am 13.08.2020 um 18:06:

Thanks. That works with my MWE, but in my document I actually have
a chapter, and chapters start on the right page, even if I add page=no
to \setuppagenumbering:


Can you start a new thread when you have a new question. When other
people have the same problem they can see on the subject if this is
the right thread to find a solution for it.


 \setuppagenumbering[alternative=doublesided,page=no]


The page key in \setuppagenumbering is used to add the final page
in a doublesided document to have a even number of pages.


 \definemakeup[ToC][align=middle,pagestate=start,doublesided=no]
 \starttext
 \startfrontmatter
   \startmakeup[ToC]
 \placecontent
   \stopmakeup
   \chapter{Preface}
 \stopfrontmatter
 \startbodymatter
   \dorecurse{10}{\chapter{Foo}}
 \stopbodymatter
 \stoptext

I have no idea how to allow chapters to start at arbitrary pages when
alternative=doublesided.


\setuphead[chapter][page=yes]

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] Help on tweaking alignment, page numbers and ToC

2020-08-13 Thread Pablo Rodriguez
On 8/13/20 6:06 PM, Nicola wrote:
> [...]
> Thanks. That works with my MWE, but in my document I actually have
> a chapter, and chapters start on the right page, even if I add page=no
> to \setuppagenumbering:
> [...]
> I have no idea how to allow chapters to start at arbitrary pages when
> alternative=doublesided.

Use \page[yes, blank] instead of \page[yes, blank, right].

I hope this helps,

Pablo
--
http://www.ousia.tk
___
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] weird issue with xtable

2020-08-13 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 13.08.2020 um 16:18:

On 8/13/20 3:11 PM, Wolfgang Schuster wrote:

[...]
With the options "split=no" and "split=repeat" ConTeXt puts the table in
a \vbox but with "split=yes" this doesn't happen.

To check is this is the problem he can put the table in a float
environment and disable the caption and counter.

\startplacetable[location={force,none}]
    \startembeddedxtable
    ...
    \stopembeddedxtable
\stopplacetable

Many thanks for your reply, Wolfgang.

These are my defaults for tables in the document:

   \setupxtable
 [frame=off,
  option=stretch,
  split=repeat,
  header=repeat]

The following avoids the reported break, but it doesn’t split the table:

\startxmlsetups xml:table:split
 \blank
 \startplacetable[location={force,none}]
 \startembeddedxtable[split=yes]
 \xmlflush{#1}
 \stopembeddedxtable
 \stopplacetable
 \blank
\stopxmlsetups

If I add "split" to \startplacetable, I get the same \prevdepth error in
the second run.

What am I doing wrong here? (To avoid an error, I get other errors.)


There are not enough information to help you.

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] Help on tweaking alignment, page numbers and ToC

2020-08-13 Thread Nicola
On 2020-08-13, Pablo Rodriguez  wrote:
> On 8/13/20 5:17 PM, Nicola wrote:
>> Hi,
>> I still have an issue with blank pages...
>>
 2. Vertically center the ToC (wrt to the text area).
>>>
>>> Use a makeup for the TOC (if and only if it takes a single page).
>>
>> Yes, the ToC takes a single page. The makeup seems to insert a blank
>> page afterwards. MWE:
>
> Hi Nicola,
>
> all makeups do that by default.
>
> "doublesided=no" is what you need.

Thanks. That works with my MWE, but in my document I actually have
a chapter, and chapters start on the right page, even if I add page=no
to \setuppagenumbering:

\setuppagenumbering[alternative=doublesided,page=no]
\definemakeup[ToC][align=middle,pagestate=start,doublesided=no]
\starttext
\startfrontmatter
  \startmakeup[ToC]
\placecontent
  \stopmakeup
  \chapter{Preface}
\stopfrontmatter
\startbodymatter
  \dorecurse{10}{\chapter{Foo}}
\stopbodymatter
\stoptext

I have no idea how to allow chapters to start at arbitrary pages when
alternative=doublesided.

Nicola


___
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] Help on tweaking alignment, page numbers and ToC

2020-08-13 Thread Pablo Rodriguez
On 8/13/20 5:17 PM, Nicola wrote:
> Hi,
> I still have an issue with blank pages...
>
>>> 2. Vertically center the ToC (wrt to the text area).
>>
>> Use a makeup for the TOC (if and only if it takes a single page).
>
> Yes, the ToC takes a single page. The makeup seems to insert a blank
> page afterwards. MWE:

Hi Nicola,

all makeups do that by default.

"doublesided=no" is what you need.

My warning about only taking a page is that makeups don’t split content
in pages.

I hope it helps,

Pablo
--
http://www.ousia.tk
___
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] Help on tweaking alignment, page numbers and ToC

2020-08-13 Thread Nicola
Hi,
I still have an issue with blank pages...

>> 2. Vertically center the ToC (wrt to the text area).
>
> Use a makeup for the TOC (if and only if it takes a single page).

Yes, the ToC takes a single page. The makeup seems to insert a blank
page afterwards. MWE:

\setuppagenumbering[alternative=doublesided]
\definemakeup[ToC][align=middle,pagestate=start]
\starttext
\startfrontmatter
  \startmakeup[ToC]
\placecontent
  \stopmakeup
  \input{knuth}
\stopfrontmatter
\startbodymatter
  \dorecurse{10}{\chapter{Foo}}
\stopbodymatter
\stoptext

How do I suppress the blank page after the ToC?

Nicola

___
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] How can I use ConTeXt from TeXLive2020 ?

2020-08-13 Thread Mojca Miklavec
Dear Otared,

On Thu, 13 Aug 2020 at 11:05, Otared Kavian wrote:
>
> Indeed following your suugestion, I removed the
> /opt/local/etc/texmf/
> directory, as well as all other tex related directories and files in 
> /opt/local/, and then installed again MacTeX2020.

There is usually an easier way: just ensure that path to MacTeX comes
before /opt/local/bin.

What does
port installed 'tex*'
return?

It's usually a somewhat bad idea to randomly delete a subset of files
installed by a package manager.

Mojca
___
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] \scantokens in luametatex

2020-08-13 Thread Hans Hagen

On 8/13/2020 2:31 PM, Marcel Fabian Krüger wrote:


in the current luametatex upload, \scantokens (and also \scantextokens)
behave odd: They seem to act like \detokenize, except that spaces get
catcode other instead of catcode space:

\starttext
\edef\abc{\scantokens{\relax}}
\abc
\edef\abc{\scantextokens{\relax}}
\abc
\stoptext

used to result in an empty output file but with luametatex, it  writes \relax 
\relax to the output.

i'll look at it (i probably forget to set the catcodetable)

here is the generalized case:

\def\foo{!}

\edef\abc{\tokenized catcodetable \catcodetable {a\relax \foo}} \abc
\edef\abc{\tokenized catcodetable -1{a\relax \foo}} \abc

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] weird issue with xtable

2020-08-13 Thread Pablo Rodriguez
On 8/13/20 3:11 PM, Wolfgang Schuster wrote:
> [...]
> With the options "split=no" and "split=repeat" ConTeXt puts the table in
> a \vbox but with "split=yes" this doesn't happen.
>
> To check is this is the problem he can put the table in a float
> environment and disable the caption and counter.
>
> \startplacetable[location={force,none}]
>    \startembeddedxtable
>    ...
>    \stopembeddedxtable
> \stopplacetable

Many thanks for your reply, Wolfgang.

These are my defaults for tables in the document:

  \setupxtable
[frame=off,
 option=stretch,
 split=repeat,
 header=repeat]

The following avoids the reported break, but it doesn’t split the table:

\startxmlsetups xml:table:split
\blank
\startplacetable[location={force,none}]
\startembeddedxtable[split=yes]
\xmlflush{#1}
\stopembeddedxtable
\stopplacetable
\blank
\stopxmlsetups

If I add "split" to \startplacetable, I get the same \prevdepth error in
the second run.

What am I doing wrong here? (To avoid an error, I get other errors.)

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] weird issue with xtable

2020-08-13 Thread Pablo Rodriguez
On 8/13/20 2:33 PM, Taco Hoekwater wrote:
> [...]
> I forgot to answer this. Simple explanation:
>
> * 'restricted horizontal mode' is inside an \hbox{} or something similar like 
> a header/footer,
>   where line breaks are forbidden
> * ‘horizontal mode’ is inside a paragraph, where line breaks are possible
>
> But the ‘restricted’ part is not relevant to your problem, \prevdepth
> is forbidden in horizontal mode  regardless of restrictions; it is
> only allowed in vertical mode.
Manny thanks for your explanation, Taco.

> Somehow your table ends up being typeset in a horizontal context,
> based on the error message (at least, if we assume that the error
> message was triggered by a table).
I think it is easy to trigger the error:

  \setupxtable[split=yes]
  \starttext
\ifvmode yes\else no\fi
\startxtable[align={middle,lohi},columndistance=0em]
  \startxrow
\startxcell
  \dontleavehmode
  \externalfigure[cow.pdf]
[scale=500]
\stopxcell
  \stopxrow
\stopxtable
  \stoptext

> But why that is? I do not have any other good ideas. And
> unfortunately lots of different things in ConTeXt can trigger an
> implicit horizontal context.>
> For debugging, you could try adding this to the preamble (or grouped
> around each xtable, for slightly less damage to the vertical
> spacing):>
>   \let\prevdepth\relax
>   \newdimen\prevdepth
>
> that should at least remove the error report.  The vertical spacing
> in the pdf output will be wrong (!!!), but perhaps the output can
> provide a clue about what triggered the problem.
No idea of what is going wrong here.

My setups are even simplistic:

\setupxtable
[frame=off,
 option=stretch,
 split=repeat,
 header=repeat]

\setupxtable
[split-table]
[split=yes]

\startxmlsetups xml:table:split
\blank
\startembeddedxtable[split-table]
\xmlflush{#1}
\stopembeddedxtable
\blank
\stopxmlsetups

But it seems that this cannot be fixed without investing much time.

I’m afraid I don’t have this time now.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] weird issue with xtable

2020-08-13 Thread Wolfgang Schuster

Taco Hoekwater schrieb am 13.08.2020 um 14:33:

On 13 Aug 2020, at 14:15, Pablo Rodriguez  wrote:


My questions are: what is the restricted horizontal mode (as different
from the horizontal mode)?

I forgot to answer this. Simple explanation:

* 'restricted horizontal mode' is inside an \hbox{} or something similar like a 
header/footer,
   where line breaks are forbidden
* ‘horizontal mode’ is inside a paragraph, where line breaks are possible

But the ‘restricted’ part is not relevant to your problem, \prevdepth is 
forbidden in horizontal mode  regardless of restrictions; it is only allowed in 
vertical mode.


Somehow your table ends up being typeset in a horizontal context, based on the 
error message (at least, if we assume that the error message was triggered by a 
table).

But why that is? I do not have any other good ideas. And unfortunately lots of 
different things in ConTeXt can trigger an implicit horizontal context.


With the options "split=no" and "split=repeat" ConTeXt puts the table in 
a \vbox but with "split=yes" this doesn't happen.


To check is this is the problem he can put the table in a float 
environment and disable the caption and counter.


\startplacetable[location={force,none}]
  \startembeddedxtable
  ...
  \stopembeddedxtable
\stopplacetable

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] weird issue with xtable

2020-08-13 Thread Taco Hoekwater

> On 13 Aug 2020, at 14:15, Pablo Rodriguez  wrote:
> 
>>> My questions are: what is the restricted horizontal mode (as different
>>> from the horizontal mode)?

I forgot to answer this. Simple explanation:

* 'restricted horizontal mode' is inside an \hbox{} or something similar like a 
header/footer, 
  where line breaks are forbidden
* ‘horizontal mode’ is inside a paragraph, where line breaks are possible

But the ‘restricted’ part is not relevant to your problem, \prevdepth is 
forbidden in horizontal mode  regardless of restrictions; it is only allowed in 
vertical mode.


Somehow your table ends up being typeset in a horizontal context, based on the 
error message (at least, if we assume that the error message was triggered by a 
table). 

But why that is? I do not have any other good ideas. And unfortunately lots of 
different things in ConTeXt can trigger an implicit horizontal context. 

For debugging, you could try adding this to the preamble (or grouped around 
each xtable, for slightly less damage to the vertical spacing):

  \let\prevdepth\relax
  \newdimen\prevdepth 

that should at least remove the error report.  The vertical spacing in the pdf 
output will be wrong (!!!), but perhaps the output can provide a clue about 
what triggered the problem.

Best wishes,
Taco

___
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] \scantokens in luametatex

2020-08-13 Thread Marcel Fabian Krüger
Hi,

in the current luametatex upload, \scantokens (and also \scantextokens)
behave odd: They seem to act like \detokenize, except that spaces get
catcode other instead of catcode space:

\starttext
\edef\abc{\scantokens{\relax}}
\abc
\edef\abc{\scantextokens{\relax}}
\abc
\stoptext

used to result in an empty output file but with luametatex, it  writes \relax 
\relax to the output.

\starttext
\def\showsecond#1{\show}
\edef\abc{\scantokens{a b}}
\expandafter\showsecond\abc
\edef\abc{\detokenize{a b}}
\expandafter\showsecond\abc
\stoptext

prints

> the character  
> blank space  

Best regard,
Marcel Krüger
___
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] weird issue with xtable

2020-08-13 Thread Pablo Rodriguez
On 8/13/20 1:16 PM, Taco Hoekwater wrote:
>> On 13 Aug 2020, at 13:07, Pablo Rodriguez  wrote:
>> [...]
>> I get the following error message (that breaks compilation) when I add
>> \setupxtable[split=yes]:
>>
>>   You can't use '\prevdepth' in restricted horizontal mode
>> [...]
>> My questions are: what is the restricted horizontal mode (as different
>> from the horizontal mode)? Why might it be triggered with
>> \startxtable[split=yes] in the huge source, but not in the single file?
>
> At a wild guess, as I had a similar problem in my XML: try using 
> \startembeddedxtable
> instead of \startxtable. In my case, what happened was that a row of the 
> xtable
> ended up in the header/footer, generating the same error message you got.
>
> Not sure if it is actually the same problem, but switching is worth a shot.
> The \startxtable does not like to be wrapped into other environments,
> so \startembeddedxtable is much better for that.

Many thanks for your reply, Taco.

Sorry for not realizing that I was missing it: I already use
\startembeddedxtable to deal with XML.

The first time I tried to add table support to my environment for XML, I
cound’t make \startxtable work.

I wonder what triggers the error with a huge file.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] weird issue with xtable

2020-08-13 Thread Taco Hoekwater


> On 13 Aug 2020, at 13:07, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> in order to avoid a problem already reported
> (https://mailman.ntg.nl/pipermail/dev-context/2020/003694.html), I added
> to an indiviual table \startxtable[split=yes] (being the default in the
> document \setupxtable[split=repeat, header=repeat]).
> 
> But I’m experiencing a weird issue with that approach.
> 
> I get the following error message (that breaks compilation) when I add
> \setupxtable[split=yes]:
> 
>   You can't use '\prevdepth' in restricted horizontal mode
> 
> The single document (actually, an XML file) compiles just fine, but when
> combined together to generate a PDF document over 1000 pages, I get the
> error above.
> 
> My questions are: what is the restricted horizontal mode (as different
> from the horizontal mode)? Why might it be triggered with
> \startxtable[split=yes] in the huge source, but not in the single file?

At a wild guess, as I had a similar problem in my XML: try using 
\startembeddedxtable
instead of \startxtable. In my case, what happened was that a row of the xtable
ended up in the header/footer, generating the same error message you got. 

Not sure if it is actually the same problem, but switching is worth a shot.
The \startxtable does not like to be wrapped into other environments, 
so \startembeddedxtable is much better for that.


Best wishes,
Taco


___
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] Same counter for figures as theorems

2020-08-13 Thread Taco Hoekwater


> On 13 Aug 2020, at 10:06, Tim Steenvoorden  wrote:
> 
> Hi all,
> 
> Anybody some pointers?

Next time, prepare a minimal (non)working example. Because the attachment works 
for me.

Best wishes,
Taco


tryme.tex
Description: Binary data



___
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] weird issue with xtable

2020-08-13 Thread Pablo Rodriguez
Dear list,

in order to avoid a problem already reported
(https://mailman.ntg.nl/pipermail/dev-context/2020/003694.html), I added
to an indiviual table \startxtable[split=yes] (being the default in the
document \setupxtable[split=repeat, header=repeat]).

But I’m experiencing a weird issue with that approach.

I get the following error message (that breaks compilation) when I add
\setupxtable[split=yes]:

   You can't use '\prevdepth' in restricted horizontal mode

The single document (actually, an XML file) compiles just fine, but when
combined together to generate a PDF document over 1000 pages, I get the
error above.

My questions are: what is the restricted horizontal mode (as different
from the horizontal mode)? Why might it be triggered with
\startxtable[split=yes] in the huge source, but not in the single file?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] compilation error in LMTX

2020-08-13 Thread Pablo Rodriguez
Dear list,

compiling a huge XML document (output PDF > 1200 pages), I get the
following error with latest current (2020.08.11 15:59):

  pages   > flushing realpage 187, userpage 187, subpage 3
  mtx-context | fatal error: return code: 139
  Compilation failed.

Some hints about what I cannot avoid considering a cryptic error message:

1. There is no previous warning when compiling previous pages.
1. The compulation error appears on the third run.
1. ConTeXt latest from 2020.08.07 23:37 compiles this just fine.

Sorry, there is no minimal sample here. Any ideas about this? Or at
least, any chances for the source that is breaking compilation?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] How can I use ConTeXt from TeXLive2020 ?

2020-08-13 Thread Axel Kielhorn
Hello Otared,

> Thank you very much for your attention and your hints, which solved my 
> problems with ConTeXt from TeXLive2020.
> 
> Indeed following your suugestion, I removed the 
>   /opt/local/etc/texmf/
> directory, as well as all other tex related directories and files in 
> /opt/local/, and then installed again MacTeX2020. 
> In oder to be on the safe side, I rebuilt also the locate database, then 
> rebooted my machine: after that I could  run
>   luatools --generate
> and now with
>   context --version
> I have current version: 2020.03.10 14:44.
> 
> However I don't know why I had tex related files in /opt/local/, which is 
> used by MacPorts…

Some programs have dependencies on texlive.
These are usually programs that create pdf via TeX.

Glad I could help you.

Greetings
Axel
___
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] How can I use ConTeXt from TeXLive2020 ?

2020-08-13 Thread Otared Kavian
Dear Axel,

Thank you very much for your attention and your hints, which solved my problems 
with ConTeXt from TeXLive2020.

Indeed following your suugestion, I removed the 
/opt/local/etc/texmf/
directory, as well as all other tex related directories and files in 
/opt/local/, and then installed again MacTeX2020. 
In oder to be on the safe side, I rebuilt also the locate database, then 
rebooted my machine: after that I could  run
luatools --generate
and now with
context --version
 I have current version: 2020.03.10 14:44.

However I don't know why I had tex related files in /opt/local/, which is used 
by MacPorts…

I hope to be able to explain to my colleague how to run ConTeXt (LuaTeX) within 
TeXShop from MacTeX2020.

Thanks to eveyone!

Best regards: Otared

> On 12 Aug 2020, at 08:26, Axel Kielhorn  wrote:
> 
> 
> 
>> Am 11.08.2020 um 16:57 schrieb Otared Kavian :
>> 
>> I don't have these files at this place, but in
>>  /opt/local/etc/texmf/
>> I do have 
>>  /opt/local/etc/texmf/texmf.cnf
>>  /opt/local/etc/texmf/texmfcnf.lua
>> the first one being created automatically when I tried to do mtxrun 
>> --generate after installing TeXLive2020. Ir says its content should not be 
>> modified directly and that its content is based on of the file
>>  /opt/local/etc/texmf/texmf.cnf.d
>> The content of the above directory dates from 2019, and maybe that is why my 
>> logfile reports things being done with TeXLive2019. 
>> 
>> The content of the file 
>>  /opt/local/etc/texmf/texmfcnf.lua
>> is written by Hans in date = "2012-05-24" time = "12-12-12".
>> 
>> Replacing /opt/local/etc/texmf/texmf.cnf with some other texmf.cnf does not 
>> help, since it is overwritten when one does 
>>  mtxrun --generate
>> 
>> So the problem remains… Maybe I have to contact people who prepare 
>> MacTeX2020 and ask for help with them.
> 
> This looks like a Macports installation.
> 
> When I call the Macports version of context I get:
> 
> context --help
> resolvers   | caches | path '/Users/axel/.texlive2020/texmf-var' created
> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
> 
> If you want to use the Macports version of ConTeXt please install
> 
> port install textlive-context
> 
> after installing that I get:
> 
> context --help
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | basic options:
> mtx-context |
> mtx-context | --run  process (one or more) files (default 
> action)
> mtx-context | --make create context formats
> mtx-context |
> mtx-context | --ctx=name use ctx file (process management 
> specification)
> mtx-context | --noctxignore ctx directives and flags
> mtx-context | --interfaceuse specified user interface 
> (default: en)
> mtx-context |
> mtx-context | --autopdf  close pdf file in viewer and start 
> pdf viewer afterwards
> mtx-context | --purgepurge files either or not after a 
> run (--pattern=...)
> mtx-context | --purgeall purge all files either or not after 
> a run (--pattern=...)
> mtx-context |
> mtx-context | --usemodule=list   load the given module or style, 
> normally part of the distribution
> mtx-context | --environment=list load the given environment file 
> first (document styles)
> mtx-context | --mode=listenable given the modes (conditional 
> processing in styles)
> mtx-context | --path=listalso consult the given paths when 
> files are looked for
> mtx-context | --arguments=list   set variables that can be consulted 
> during a run (key/value pairs)
> mtx-context | --randomseed=numberset the randomseed
> mtx-context | --result=name  rename the resulting output to the 
> given name
> mtx-context | --trackers=listset tracker variables (show list 
> with --showtrackers)
> mtx-context | --directives=list  set directive variables (show list 
> with --showdirectives)
> mtx-context | --silent=list  disable logcatgories (show list with 
> --showlogcategories)
> mtx-context | --stripstrip Lua code (only meant for 
> production where no errors are expected)
> mtx-context | --errors=list  show errors at the end of a run, 
> quit when in list (also when --silent)
> mtx-context | --htmlerrorpagegenerate html error page instead 
> (optional: =scite)
> mtx-context | --noconsoledisable logging to the console 
> (logfile only)
> mtx-context | --purgeresult  purge result file before run
> mtx-context |
> mtx-context | --forcexml force xml stub
> mtx-context | --forcecld force cld (context lua document) stub
> mtx-context | --forcelua force lua stub (like texlua)
> mtx-context | --forcemp 

Re: [NTG-context] Same counter for figures as theorems

2020-08-13 Thread Tim Steenvoorden
Hi all,

Anybody some pointers?

Cheers,
Tim
On 11 Aug 2020, 11:41 +0200, Tim Steenvoorden , 
wrote:
> Hi all,
>
> I’ve a text where chapters are numbered 1, 2, 3, … and sections 1.1, 1.2, 
> 1.3, …
> Now I’d like all elements (figures, tables, examples, definitions, theorems, 
> …) to be numbered consecutively prefixed by the chapter and section number, 
> so 1.1.1, 1.1.2, 1.2.1, ...
>
> I’ve managed to change figure/table captions to do this by:
>
> \setupcaptions[
>   way=bysection,
>   prefixsegments=chapter:section,
> ]
>
> And I’ve setup my enumerations by:
>
> \setupenumerations[
>   way=bysection,
>   prefix=yes,
>   prefixsegments=chapter:section,
> ]
>
> But how do I use the same counter for figures, tables, and all enumerations?
> Trying to share a counter with:
>
> \definecounter[object][
>   way=bysection,
>   prefix=yes,
>   prefixsegments=chapter:section,
> ]
> \setupenumerations[
>   counter=object,
> ]
> \setupcaptions[
>   counter=object,
> ]
>
> Results in enumerations numbered 1, 2, 3, ... instead of 1.1.1, 1.1.2, 1.1.3, 
> … And figures and tables are still numbered in the default way.
>
> Cheers,
> Tim
___
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
___