Re: [NTG-context] Math align not working

2021-01-01 Thread Aditya Mahajan
On Fri, 1 Jan 2021, Hans Hagen wrote:

> On 1/1/2021 8:21 AM, Aditya Mahajan wrote:
> > \startformula \startalign[m=2,distance=8em,n=5,
> > align={right,middle,middle,middle,left, right,middle,middle,middle,left}]
> > \NC 0 \NC < \NC 2x + 5y \NC < \NC 10
> > \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR
> > \NC 3 \NC < \NC 2y + 3z \NC < \NC 15
> > \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR
> > \stopalign \stopformula
> > 
> > \stoptext
> 
> 
> Aditya:
> 
> can you check this?
> 
> \def\math_build_eqalign
>   {\scratchtoks\emptytoks
>\d_math_eqalign_distance\mathalignmentparameter\c!distance\relax
>\scratchcounterone\mathalignmentparameter\c!m
>\scratchcountertwo\mathalignmentparameter\c!n
>\etoksapp\scratchtoks{\the\t_math_align_a}%
>\scratchcounter\plusone
>\dorecurse{\numexpr\scratchcounterone*\scratchcountertwo-\plusone\relax}
>  {\ifnum\scratchcounter=\scratchcountertwo
> \scratchcounter\plusone
> \etoksapp\scratchtoks{\math_eqalign_distance}%
> \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%
>   \else
> \advance\scratchcounter\plusone
>   \fi
>   \etoksapp\scratchtoks{\the\t_math_align_b}}%
>\etoksapp\scratchtoks{\the\t_math_align_c}}
> 
> 
> I added:
> 
> \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%
> 

This works nicely. Thanks.

I'll also go back to the mathalign document and try to update it for the 
current LMTX to catch other regressions which might have happened.

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] blank pages bug [pagecolumns]

2021-01-01 Thread Johann Birnick
Hi there,

I noticed a bug when using pagecolumns. If there is a title on the right column,
a blank page gets added at the end of the document. For example

\starttext
\startpagecolumns[n=2]
   
\title{lorem}
\title{ipsum}

\stoppagecolumns
\stoptext

gives an additional blank page. If you remove the second title (ipsum) then not.

Best regards,
Johann

___
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] About \includeMPgraphic and local presets

2021-01-01 Thread Jairo A. del Rio
Hi, list!
I've read elsewhere \MPrawvar allows a preset to be applied outside
\start...\stopuseMPgraphic.

\startuseMPgraphic{hi}
draw fullcircle scaled \MPrawvar{hi}{u};
\stopuseMPgraphic

\setupMPvariables[hi][u=1cm]

\startMPcode
\includeMPgraphic{hi}
\stopMPcode

However, \includeMPgraphic{...} only accepts one argument. I've come up
with a somewhat ugly solution to pass a different value:

\begingroup %\start
\setupMPvariables[hi][u=2cm]
\startMPcode
\includeMPgraphic{hi}
\stopMPcode
\endgroup %\stop
%Outside \MPrawvar{hi}{u} will be 1cm

What should I do to keep redefinitions local or pass settings only for
certain instances of \IncludeMPgraphic{...}? Is there a better solution?
Thank you in advance.

Best regards and best wishes for this New Year!

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] xrightarrow specific size issue

2021-01-01 Thread Johann Birnick
Hi Aditya,

I know the syntax, my problem is about the options for the length of the arrow.

For example

\xrightarrow[big]{abc}

gives a longer arrow than

\xrightarrow{abc}

According to different manuals also specific lengths should be possible. But
they don't work. I think it's a bug. (because the example from a documentation
doesn't work)

Best regards,
Johann


On Fri, 2021-01-01 at 01:50 -0500, Aditya Mahajan wrote:
> On Thu, 31 Dec 2020, Johann Birnick wrote:
> 
> > Hi there,
> > 
> > \starttext
> > $\xrightarrow[50pt]$
> > \stoptext
> > 
> > doesn't work. But it should, right? In the manual
> > 
> > \starttext
> > $\xrightarrow[50]$
> > \stoptext
> > 
> > is shown, but that doesn't work either.
> 
> The syntax is:
> 
> \xrightarrow{top}
> 
> or 
> 
> \xrightarrow{top}{bottom}
> 
> 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] underbrace spacing

2021-01-01 Thread Johann Birnick
Thanks!!

On Fri, 2021-01-01 at 01:48 -0500, Aditya Mahajan wrote:
> On Thu, 31 Dec 2020, Johann Birnick wrote:
> 
> > Hi there,
> > 
> > if I do
> > 
> > \starttext
> > $4 \underbrace{+ 3}_{\text{because of lorem} + 2}$
> > \stoptext
> > 
> > then the spacing gets really big because of the long. How can I prevent
> > this?
> > 
> > (in LaTeX one can use \mathcal or so and that works)
> 
> Do you mean \mathclap? If so, then in Context, \clap works correctly in both
> text and math mode. So, you can just use:
> 
>     \starttext
>     $4 \underbrace{+ 3}_{\clap{\text{because of lorem} + 2}}$
>     \stoptext
> 
> 
> 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] prevent error page

2021-01-01 Thread Johann Birnick
context --nodummy

works fine with my viewer, thanks!!

On Fri, 2021-01-01 at 11:10 +0100, Hans Hagen wrote:
> On 12/31/2020 8:31 PM, Johann Birnick wrote:
> > Hi there,
> > 
> > in my setup I constantly have a pdf viewer open showing the output of
> > context.
> > When I recompile the viewer updates.
> > 
> > Now if there is an error, the document fails to compile, of course.
> > Previously
> > the pdf file just remainded untouched, nice. But now with LMTX, the pdf will
> > be
> > overwritten with a pdf just saying "error". This makes my pdf viewer crash!
> > I can't work like this.
> > 
> > So how to prevent this "error" page and just let context remain the pdf
> > untouched if there is an error?
> Actually the remaining file is not untouched when there is an error 
> halfway, so maybe your viewer didn't do anything when the xref etc was 
> missing and fonts were unresolved ... all depends on the viewer i guess
> (after a pdf update the viewer has to reread the xref at least and then 
> all objects it has cached).
> 
> Long ago I played with a temp file and renaming but that also was not 
> stable (at least not here).
> 
> (for ways around: see other mails)
> 
> 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] Math align not working

2021-01-01 Thread Hans Hagen

On 1/1/2021 8:21 AM, Aditya Mahajan wrote:

\startformula \startalign[m=2,distance=8em,n=5,
align={right,middle,middle,middle,left, right,middle,middle,middle,left}]
\NC 0 \NC < \NC 2x + 5y \NC < \NC 10
\NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR
\NC 3 \NC < \NC 2y + 3z \NC < \NC 15
\NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR
\stopalign \stopformula

\stoptext



Aditya:

can you check this?

\def\math_build_eqalign
  {\scratchtoks\emptytoks
   \d_math_eqalign_distance\mathalignmentparameter\c!distance\relax
   \scratchcounterone\mathalignmentparameter\c!m
   \scratchcountertwo\mathalignmentparameter\c!n
   \etoksapp\scratchtoks{\the\t_math_align_a}%
   \scratchcounter\plusone
   \dorecurse{\numexpr\scratchcounterone*\scratchcountertwo-\plusone\relax}
 {\ifnum\scratchcounter=\scratchcountertwo
\scratchcounter\plusone
\etoksapp\scratchtoks{\math_eqalign_distance}%
\etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%
  \else
\advance\scratchcounter\plusone
  \fi
  \etoksapp\scratchtoks{\the\t_math_align_b}}%
   \etoksapp\scratchtoks{\the\t_math_align_c}}


I added:

\etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%

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] fatal error: return code: 256

2021-01-01 Thread Saša Janiška
Hello,

tried to install lmtx (Debian Sid) from scratch, did:


* wipe the texmf-cache directory
* mtx-install |   - run: mtxrun --generate
* mtx-install |   - run: context --make

but still getting:

[...]
languages   > language 'en' is active
runtime error : input file './t.tex' is not found, quitting
mtx-context | fatal error: return code: 256


Any hint?


Sincerely,
Gour

-- 
Just try to learn the truth by approaching a spiritual master.
Inquire from him submissively and render service unto him.
The self-realized souls can impart knowledge unto you because
they have seen the truth.


___
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] prevent error page

2021-01-01 Thread Hans Hagen

On 12/31/2020 8:31 PM, Johann Birnick wrote:

Hi there,

in my setup I constantly have a pdf viewer open showing the output of context.
When I recompile the viewer updates.

Now if there is an error, the document fails to compile, of course. Previously
the pdf file just remainded untouched, nice. But now with LMTX, the pdf will be
overwritten with a pdf just saying "error". This makes my pdf viewer crash!
I can't work like this.

So how to prevent this "error" page and just let context remain the pdf
untouched if there is an error?
Actually the remaining file is not untouched when there is an error 
halfway, so maybe your viewer didn't do anything when the xref etc was 
missing and fonts were unresolved ... all depends on the viewer i guess
(after a pdf update the viewer has to reread the xref at least and then 
all objects it has cached).


Long ago I played with a temp file and renaming but that also was not 
stable (at least not here).


(for ways around: see other mails)

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
___