[NTG-context] Re: Very strange error:

2023-08-14 Thread Wolfgang Schuster

Xavier B. schrieb am 15.08.2023 um 00:03:

Now


      - \startexercici[]{}  -->
\startexercici[reference=...,title=...]


with LMTX this

\startitemize
\sym{\in[REFERENCE]}
\stopitemize

does not work.


You have to provide a example for the error because it works for me.

\starttext

\startsection [reference=foo,title=Foo]

\startitemize
\sym{\in[foo]} xxx
\stopitemize

\stopsection

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Very strange error:

2023-08-14 Thread Hans Hagen via ntg-context

On 8/14/2023 11:24 PM, Xavier B. wrote:

Thanks, Rik, for the comment. You're right.
Note that I've never been aware of such requirement because always in MKIV I 
use \head without \par.

@all, please comment it out this behaviour in somewhere. The weak point of 
context is documentation: wiki is too bit not updated and reference manual are 
outdated. As a simple user, it could cause nightmares, overall in transition to 
one major version to another.

the only things that really changed are

- input encodings, still supported but we assume utf8
- font encodings, font features etc that make for different specifications
- some fuzzy argument handling that made sense 25 years ago but not today
- some low level fatures that were never to be used at the user level
- improvements to mechanism that are now possible
- more was added than removed (and believe me: i'd like to remove some)
- if something fails also keep in mind that maybe it was never supossed 
to work but tex is just rather tolerant


take for instance math: we adapt to possibilities, unicode developments 
etc. but overall interfaces are kept (we eventually dropped $$ mkiv 
because it is hard to get spacing right otherwise, een with some nasty 
tricks)


\head is one of these "best use arguments" and les sknown is that we 
also dropped par delimited \section and such (the head one currently can 
be enabled with \autoparagraphmode4)


the main drive is 'better rendering' and 'less complicated coding'

you use for for instance \bigskip which is never going to guarantee good 
spacing as it doesn't cooperate with \blank and friends (it is sort of 
dangerous to mix what oen sees outside context with context commands 
like like loading that lua module, which actually is in none of the 
manuals)


if one wants to get an idea of coding context documents the 'source sof 
manuals' can show some


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Very strange error:

2023-08-14 Thread Xavier B.
Now 

> 
>      - \startexercici[]{}  --> 
> \startexercici[reference=...,title=...]
> 

with LMTX this

\startitemize
\sym{\in[REFERENCE]}
\stopitemize

does not work.

Some change here too?

Thanks,



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Very strange error:

2023-08-14 Thread Xavier B.
Thanks, Wolfgang, for pointing this replacements.
I will try to change that but it's a lot of work.

Appreciate
Xavier

On Mon, 14 Aug 2023 19:07:09 +0200
Wolfgang Schuster  ha escrit:
> >
> 
> You're correct, \head is the cause of the error and it's better to 
> replace it with
> 
>      \starthead {...}
>          ...
>      \stophead
> 
> but there are more things which can be changed to use modern syntax (in 
> many cases part of ConTeXt since nearly a decade).
> 
> 
> A few examples:
> 
>      - \startexercici[]{}  --> 
> \startexercici[reference=...,title=...]
> 
>      - \placetable[][]{}{...} -->  
> \startplacetable[reference=...,location=...,title=...] ... \stopplacetable
> 
>      - Llimones \hfill 6  -->  Llimones \filler[symbol] 6
> 
>      - \bigskip  -->  \blank[big]
> 
> 
> Wolfgang
> 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Very strange error:

2023-08-14 Thread Xavier B.
On Mon, 14 Aug 2023 17:49:48 +0200
Wolfgang Schuster  ha escrit:

> Xavier B. schrieb am 14.08.2023 um 17:41:
> > After I run context (LMTX version) to my document (attached) I get this 
> > error:
> >
> > tex error   > tex error on line 540 in file ./dev.tex: The file ended 
> > when scanning an argument.
> >
> > I don't know how to start...
> > Can anyone help me?
> >
> > Thanks,
> > Xavier
> >
> > PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV 
> > I get no errors.
> 
> Can you show the text (and commands) which appears on line 540 (plus a 
> few lines before/after line 540) of your document.
> 
> Wolfgang
> 

I attach the dev.log and dev-error.log. Is it enough?

Xavier
system  > 
system  > ConTeXt  ver: 2023.08.10 02:59 LMTX  fmt: 2023.8.14  int: 
english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/home/xan/bin/context-current/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'/home/xan/bin/context-current/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './dev', input './dev.tex', result './dev'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './dev.tex'
modules > 'pgfrcs' is not found
modules > 'pgfmat' is not found
modules > 'tikz' is loaded
open source > level 2, order 3, name 
'/home/xan/bin/context-current/tex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl'
open source > level 3, order 4, name 'pgfutil-common.tex'
close source> level 3, order 4, name 'pgfutil-common.tex'
open source > level 3, order 5, name 'pgfutil-context.def'
close source> level 3, order 5, name 'pgfutil-context.def'
open source > level 3, order 6, name 'pgfrcs.code.tex'
open source > level 4, order 7, name 'pgf.revision.tex'
close source> level 4, order 7, name 'pgf.revision.tex'
close source> level 3, order 7, name 'pgfrcs.code.tex'
open source > level 3, order 8, name 'pgfsys.code.tex'
open source > level 4, order 9, name 'pgfkeys.code.tex'
open source > level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex'
close source> level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex'
close source> level 4, order 10, name 'pgfkeys.code.tex'
cld > stack > 
cld > stack > use : slot = context.functions.register(f)
cld > stack > and : context.functions.unregister(slot)
cld > stack > 
open source > level 4, order 11, name 'pgf.cfg'
close source> level 4, order 11, name 'pgf.cfg'
Driver file for pgf: pgfsys-luatex.def

open source > level 4, order 12, name 'pgfsys-luatex.def'
open source > level 5, order 13, name 'pgfsys-common-pdf.def'
close source> level 5, order 13, name 'pgfsys-common-pdf.def'
close source> level 4, order 13, name 'pgfsys-luatex.def'
open source > level 4, order 14, name 'dev.pgf'
close source> level 4, order 14, name 'dev.pgf'
close source> level 3, order 14, name 'pgfsys.code.tex'
open source > level 3, order 15, name 'pgfkeys.code.tex'
close source> level 3, order 15, name 'pgfkeys.code.tex'
open source > level 3, order 16, name 'pgfsyssoftpath.code.tex'
close source> level 3, order 16, name 'pgfsyssoftpath.code.tex'
open source > level 3, order 17, name 'pgfsysprotocol.code.tex'
close source> level 3, order 17, name 'pgfsysprotocol.code.tex'
open source > level 3, order 18, name 'pgfcore.code.tex'
open source > level 4, order 19, name 'pgfmath.code.tex'
open source > level 5, order 20, name 'pgfmathutil.code.tex'
close source> level 5, order 20, name 'pgfmathutil.code.tex'
open source > level 5, order 21, name 'pgfmathparser.code.tex'
close source> level 5, order 21, name 'pgfmathparser.code.tex'
open source > level 5, order 22, name 'pgfmathfunctions.code.tex'
close source> level 5, order 22, name 'pgfmathfunctions.code.tex'
open source > level 5, order 23, name 'pgfmathfunctions.basic.code.tex'
close source> level 5, order 23, name 'pgfmathfunctions.basic.code.tex'
open source > level 5, order 24, name 
'pgfmathfunctions.trigonometric.code.tex'
close source> level 5, order 24, name 
'pgfmathfunctions.trigonometric.code.tex'
open source > level 5, order 25, name 'pgfmathfunctions.random.code.tex'
close source> level 5, order 25, name 'pgfmathfunctions.random.code.tex'
open source > level 5, order 26, name 'pgfmathfunctions.comparison.code.tex'
close source> level 5, order 26, name 'pgfmathfunctions.comparison.code.tex'
open source > level 5, order 27, name 'pgfmathfunctions.base.code.tex'
close source> level 5, order 27, name 'pgfmathfunctions.base.code.tex'
open source > level 5, order 28, 

[NTG-context] Re: Very strange error:

2023-08-14 Thread Xavier B.
Thanks, Rik, for the comment. You're right.
Note that I've never been aware of such requirement because always in MKIV I 
use \head without \par.

@all, please comment it out this behaviour in somewhere. The weak point of 
context is documentation: wiki is too bit not updated and reference manual are 
outdated. As a simple user, it could cause nightmares, overall in transition to 
one major version to another.

Thanks another time,
Xavier

On Mon, 14 Aug 2023 12:42:59 -0400
Rik Kabel  ha escrit:

> 
> On 8/14/2023 11:41 AM, Xavier B. wrote:
> > After I run context (LMTX version) to my document (attached) I get this 
> > error:
> >
> > tex error   > tex error on line 540 in file ./dev.tex: The file ended 
> > when scanning an argument.
> >
> > I don't know how to start...
> > Can anyone help me?
> >
> > Thanks,
> > Xavier
> >
> > PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV 
> > I get no errors.
> >
> I suspect that LMTX is a bit more strict about parsing. You have omitted 
> the required \par for each \head.
> 
> -- 
> Rik
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: split align in formulas

2023-08-14 Thread Mikael Sundqvist
Hi,

On Mon, Aug 14, 2023 at 5:13 PM Xavier B.  wrote:
>
> I have this text and the end of the paragraph:
>
> Definitivament és el mètode més senzill. L'atribució més antiga que conec 
> d'aquest mètode és de James Tanton \cite{canvi-variable-equacio-segon-grau, 
> james-tanton-web}.
> \placeformula[eq:james-tanton-canvi-de-variables]
> \startformula
> \startalign
> \NC ax^2 + bx + c = 0 \NC \NR
> \NC ax^2 + bx = -c \NC \quad \text{transposem } c\NR
> \NC x^2 + \frac{b}{a} x = - \frac{c}{a} \NC \quad \text{dividim per }a\NR
> \NC x \left( x + \frac{b}{a} \right) = - \frac{c}{a} \NC \quad 
> \text{factoritzam} \NR
> \NC (k-D)(k+D) = - \frac{c}{a} \NC \quad \text{canvi de variable} \NR
> \NC k^2 - D^2 = - \frac{c}{a} \NC \quad \text{suma per diferència} \NR
> \NC k = \pm\sqrt{ D^2 - \frac{c}{a}} \NC \quad \text{resolem l'equació} \NR
> \NC x = k - D = \NC \pm \sqrt{ D^2 - \frac{c}{a}} - D\quad \text{desfeim el 
> canvi} \NR
> \stopalign
> \stopformula
> on $D = (\frac{b}{2a})$ i $x = k-D$.
>
>
> and then the formula goes to next page. Is there any way to split align 
> environment? In wiki I could not find nothing.

No, align does not split over pages. But ordinary formulas do. You can
play with \alignhere and \breakhere, and add text with
\texthere[right]{some text} or \texthere[left]{some other text}.

/Mikael

(I think I would write sentences and a few formulas instead of
stacking them all like this)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Very strange error:

2023-08-14 Thread Wolfgang Schuster

Rik Kabel schrieb am 14.08.2023 um 18:42:



On 8/14/2023 11:41 AM, Xavier B. wrote:

After I run context (LMTX version) to my document (attached) I get this error:

tex error   > tex error on line 540 in file ./dev.tex: The file ended when 
scanning an argument.

I don't know how to start...
Can anyone help me?

Thanks,
Xavier

PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I 
get no errors.


I suspect that LMTX is a bit more strict about parsing. You have 
omitted the required \par for each \head.




You're correct, \head is the cause of the error and it's better to 
replace it with


    \starthead {...}
        ...
    \stophead

but there are more things which can be changed to use modern syntax (in 
many cases part of ConTeXt since nearly a decade).



A few examples:

    - \startexercici[]{}  --> 
\startexercici[reference=...,title=...]


    - \placetable[][]{}{...} -->  
\startplacetable[reference=...,location=...,title=...] ... \stopplacetable


    - Llimones \hfill 6  -->  Llimones \filler[symbol] 6

    - \bigskip  -->  \blank[big]


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Very strange error:

2023-08-14 Thread Rik Kabel


On 8/14/2023 12:42 PM, Rik Kabel wrote:



On 8/14/2023 11:41 AM, Xavier B. wrote:

After I run context (LMTX version) to my document (attached) I get this error:

tex error   > tex error on line 540 in file ./dev.tex: The file ended when 
scanning an argument.

I don't know how to start...
Can anyone help me?

Thanks,
Xavier

PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I 
get no errors.

I suspect that LMTX is a bit more strict about parsing. You have 
omitted the required \par for each \head.




Perhaps the mtxrun check script (https://wiki.contextgarden.net/Mtxrun) 
could be enhanced to pick this up.


--
Rik
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Very strange error:

2023-08-14 Thread Rik Kabel


On 8/14/2023 11:41 AM, Xavier B. wrote:

After I run context (LMTX version) to my document (attached) I get this error:

tex error   > tex error on line 540 in file ./dev.tex: The file ended when 
scanning an argument.

I don't know how to start...
Can anyone help me?

Thanks,
Xavier

PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I 
get no errors.

I suspect that LMTX is a bit more strict about parsing. You have omitted 
the required \par for each \head.


--
Rik
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Very strange error:

2023-08-14 Thread Wolfgang Schuster

Xavier B. schrieb am 14.08.2023 um 17:41:

After I run context (LMTX version) to my document (attached) I get this error:

tex error   > tex error on line 540 in file ./dev.tex: The file ended when 
scanning an argument.

I don't know how to start...
Can anyone help me?

Thanks,
Xavier

PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I 
get no errors.


Can you show the text (and commands) which appears on line 540 (plus a 
few lines before/after line 540) of your document.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Very strange error:

2023-08-14 Thread Xavier B.
After I run context (LMTX version) to my document (attached) I get this error:

tex error   > tex error on line 540 in file ./dev.tex: The file ended when 
scanning an argument.

I don't know how to start...
Can anyone help me?

Thanks,
Xavier

PS: I receive this error after upgrading to MKIV to LMTX. Before with MKIV I 
get no errors.


dev.tex
Description: TeX document
return {
 ["errortype"]=6,
 ["filename"]="./dev.tex",
 ["lastcontext"]="\n200 persones en total \\par \\startitemize [a, packed] 
\\item 2 de 5 persones estan a $A$ \\item a cada 4 persones de $A$ li 
corresponen 3 persones de $B$ \\item 20\\% són de $C$ \\item 2/8 són de $D$ 
\\stopitemize \\par \\head 420 persones en total \\par \\startitemize [a, 
packed] \\item $3/4$ de persones estan a $A$ \\item hi ha una correspondència: 
3 de $A$ $\\leftrightarrow $ 2 de $B$ \\item 40\\% és de $C$ \\item de 5 
persones, 4 són de $D$ \\stopitemize \\par \\head 245 persones \\par 
\\startitemize [a, packed] \\item $1/5$ de persones són de $A$ \\item $20\\%$ 
de persones són de $B$ \\item per cada 7 persones de $A$, n'hi ha 4 de $C$ 
\\item per cada 49 persones, n'hi ha 1 de $D$ \\stopitemize \\par \\head 1800 
persones \\par \\startitemize [a, packed] \\item Un $30\\%$ és de $A$ \\item 
30 de cada 50 són de $B$ \\item cada 5 persones de $B$ li corresponen 2 
persones de $C$ \\item $D$ té un 150\\% que les persones de $C$ \\stopitemize 
\\par \\stopitemize \\par En tots els casos, digueu quantes persones hi hauria 
en el subgrup més nombrós si en total hi hagués 1000 persones. 
\\stopexercici \\par \\startexercici 
[exercici:proporcionalitat-directa-8]{relacionar diagrames} Relacioneu en cada 
cas els diagrames amb la proporció indicada \\par \\startitemize [A] \\par 
\\head Proporcions \\par \\startitemize [a, packed, columns] \\item 2 de 5 
\\item 20\\% \\item $3/5$ \\item 5 a 10 \\stopitemize \\par \\head Diagrames 
\\par \\startitemize [a, packed, columns] \\item \\starttikzpicture \\draw 
(0,0) -- (5,0); \\foreach \\x in {0, 1, 2,..., 5} { \\draw (\\x , -0.2) -- (\\x 
, 0.2); \\draw (\\x ,-0.2) node[anchor=north] {\\x }; } \\draw [color=blue!50, 
line width=2pt] (0,0) -- (1,0); \\stoptikzpicture \\par \\item 
\\starttikzpicture \\draw (0,0) -- (5,0); \\foreach \\x in {0, 1, 2,..., 5} { 
\\draw (\\x , -0.2) -- (\\x , 0.2); \\draw (\\x ,-0.2) node[anchor=north] {\\x 
}; } \\draw [color=red!50, line width=2pt] (0,0) -- (2,0); \\stoptikzpicture 
\\par \\item \\starttikzpicture \\draw (0,0) -- (5,0); \\foreach \\x in {0, 1, 
2,..., 5} { \\draw (\\x , -0.2) -- (\\x , 0.2); \\draw (\\x ,-0.2) 
node[anchor=north] {\\x }; } \\draw [color=green!50, line width=2pt] (0,0) -- 
(3,0); \\stoptikzpicture \\par \\item \\starttikzpicture \\draw (0,0) -- (5,0); 
\\foreach \\x in {0, 1, 2,..., 5} { \\draw (\\x , -0.2) -- (\\x , 0.2); \\draw 
(\\x ,-0.2) node[anchor=north] {\\x }; } \\draw [color=orange!50, line 
width=2pt] (0,0) -- (1.6,0); \\stoptikzpicture \\par \\stopitemize \\par 
\\stopitemize \\par Per a cada proporció, dibuixeu nous diagrames que tengui 
longitud 100. \\stopexercici \\par \\par \\startexercici 
[exercici:proporcionalitat-directa-9]{representar a diagrames}Usant el diagrama 
$5 \\times 10$ següent (vegeu la figura~\\in [figura:diagrama-punts-5x10]) 
representeu la informació donada en cada cas. \\par \\placefigure [force] 
[figura:diagrama-punts-5x10] {Diagrama de punts $5 \\times 10$} { \\bTABLE 
[frame=off,align={middle,lohi},width=fit, offset=2mm] \\bTR \\bTD 
\\starttikzpicture \\foreach \\x in {0,...,9} \\foreach \\y in {0,...,4} { 
\\draw [fill=gray!50] (\\x ,\\y ) circle (0.25); } \\par \\stoptikzpicture 
\\eTD \\eTR \\eTABLE } \\par \\startitemize [a, columns, packed, four] \\item 
40\\% \\item 4 de 5 \\item $3/4$ \\item 4 a 1 \\item 22\\% \\item $1/8$ \\item 
5 a 3 \\item 3 de 8 \\stopitemize \\par Si aquestes informacions 
corresponguessin a mostres de peixos ferits a la mar, calculeu quants peixos 
malalts hi hauria en una mostra de 3000 peixos en total. \\stopexercici \\par 
\\startexercici [exercici:proporcionalitat-directa-antic-1]{sou} Na Marta fa 
feina per hores. Si fent 25 hores de feina, na Marta cobra 625 euros, quant 
cobrarà fent 40 hores? Quantes hores hauria de fer na Marta per cobrar 
exactament 2300 euros? \\stopexercici \\par \\par \\startexercici 
[exercici:proporcionalitat-directa-antic-2]{astronautes} Aquest és la bità
cola d'un projecte espacial: \\startitemize [4] \\item S'enlairen 5 
astronautes, amb 200 kg de menjar a una estació espacial \\item Al cap de 3 
dies, hi ha un relleu: se'n van 2 i en vénen 3 \\item La tripulació resultant 
es queda durant 5 dies més \\item Tots els astronautes tornen. L'estació 
espacial queda buida \\stopitemize \\par Els bastarà el menjar que s'enduen al 
principi si sabem que quatre astronautes mengen en promig 20 kg per dia? 
\\stopexercici \\par \\startexercici 
[exercici:proporcionalitat-directa-antic-3]{consum de benzina} El meu cotxe 

[NTG-context] split align in formulas

2023-08-14 Thread Xavier B.
I have this text and the end of the paragraph:

Definitivament és el mètode més senzill. L'atribució més antiga que conec 
d'aquest mètode és de James Tanton \cite{canvi-variable-equacio-segon-grau, 
james-tanton-web}.
\placeformula[eq:james-tanton-canvi-de-variables]
\startformula
\startalign
\NC ax^2 + bx + c = 0 \NC \NR
\NC ax^2 + bx = -c \NC \quad \text{transposem } c\NR
\NC x^2 + \frac{b}{a} x = - \frac{c}{a} \NC \quad \text{dividim per }a\NR
\NC x \left( x + \frac{b}{a} \right) = - \frac{c}{a} \NC \quad 
\text{factoritzam} \NR
\NC (k-D)(k+D) = - \frac{c}{a} \NC \quad \text{canvi de variable} \NR
\NC k^2 - D^2 = - \frac{c}{a} \NC \quad \text{suma per diferència} \NR
\NC k = \pm\sqrt{ D^2 - \frac{c}{a}} \NC \quad \text{resolem l'equació} \NR
\NC x = k - D = \NC \pm \sqrt{ D^2 - \frac{c}{a}} - D\quad \text{desfeim el 
canvi} \NR
\stopalign
\stopformula
on $D = (\frac{b}{2a})$ i $x = k-D$.


and then the formula goes to next page. Is there any way to split align 
environment? In wiki I could not find nothing.

Thanks in advance,
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-14 Thread Xavier B.
Yes. It works without lualibs-os
Thanks
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Nested aligns in formulasjj

2023-08-14 Thread Gerion Entrup
Am Montag, 14. August 2023, 13:44:44 CEST schrieb Mikael Sundqvist:
> Hi,
> 
> I do not understand what you want to have, so here is just something
> weird, but probably you look for simplealign.
> 
> \definemathsimplealign
> [whatever]
> 
> \starttext
> \startformula
> \startalign
> \NC a = \NC (b, c) \quad \mtext{with}\NR
> \NC \NC \startwhatever
> \NC b \NC = something \NR
> \NC c \NC = someother \NR
> \stopwhatever \NR
> \NC somelong = \NC bla \NR
> \stopalign
> \stopformula
> \stoptext

Thanks, this looks exactly like that what I want. However, this does not
really nest aligns, but defines a new alignment group/environment (if I
interpret it correctly). But after all, it is a viable workaround.

Gerion


signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Nested aligns in formulasjj

2023-08-14 Thread Gerion Entrup
Am Montag, 14. August 2023, 13:33:33 CEST schrieb Hans Hagen:
> On 8/14/2023 1:16 PM, Gerion Entrup wrote:
> > Hi,
> > 
> > I try to typeset a nested align in a formula. However, the results looks
> > really wrong. Here is a MWE:
> > 
> > ```
> > \starttext
> > \startformula
> > \startalign
> > \NC a = \NC (b, c) \quad \text{with}\NR
> > \NC   \NC \startalign
> > \NC b \NC = something \NR
> > \NC c \NC = someother \NR
> >   \stopalign \NR
> > \NC somelong = \NC bla \NR
> > \stopalign
> > \stopformula
> > \stoptext
> > ```
> > Am I doing something wrong or are nested aligns not possible?
> it will work if you configure the inner align to be tight (i delegate 
> that answer)
> 
> \startformula
> a   = \alignhere (b, c) \quad \text{with}
>\breakhere b = \text{something}
>\breakhere c = \text{someother}
>\breakhere
> \text{somelong} = \alignhere bla
> \stopformula
> 
> might be okay for your purpose

Thanks, but unfortunately not. I guess, I simplified the MWE too much.
This does not align the b and c. It should become clear here:

```
\startformula
a   = \alignhere (b, thisislonger) \quad \text{with}
   \breakhere b = \text{something}
   \breakhere thisislonger = \text{someother}
   \breakhere
\text{somelong} = \alignhere bla
\stopformula
```


Gerion


signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Nested aligns in formulasjj

2023-08-14 Thread Mikael Sundqvist
Hi,

I do not understand what you want to have, so here is just something
weird, but probably you look for simplealign.

\definemathsimplealign
[whatever]

\starttext
\startformula
\startalign
\NC a = \NC (b, c) \quad \mtext{with}\NR
\NC \NC \startwhatever
\NC b \NC = something \NR
\NC c \NC = someother \NR
\stopwhatever \NR
\NC somelong = \NC bla \NR
\stopalign
\stopformula
\stoptext

/Mikael

On Mon, Aug 14, 2023 at 1:20 PM Gerion Entrup  wrote:
>
> Hi,
>
> I try to typeset a nested align in a formula. However, the results looks
> really wrong. Here is a MWE:
>
> ```
> \starttext
> \startformula
> \startalign
> \NC a = \NC (b, c) \quad \text{with}\NR
> \NC   \NC \startalign
> \NC b \NC = something \NR
> \NC c \NC = someother \NR
>   \stopalign \NR
> \NC somelong = \NC bla \NR
> \stopalign
> \stopformula
> \stoptext
> ```
> Am I doing something wrong or are nested aligns not possible?
>
>
> Best,
> Gerion
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Nested aligns in formulasjj

2023-08-14 Thread Hans Hagen

On 8/14/2023 1:16 PM, Gerion Entrup wrote:

Hi,

I try to typeset a nested align in a formula. However, the results looks
really wrong. Here is a MWE:

```
\starttext
\startformula
\startalign
\NC a = \NC (b, c) \quad \text{with}\NR
\NC   \NC \startalign
\NC b \NC = something \NR
\NC c \NC = someother \NR
  \stopalign \NR
\NC somelong = \NC bla \NR
\stopalign
\stopformula
\stoptext
```
Am I doing something wrong or are nested aligns not possible?
it will work if you configure the inner align to be tight (i delegate 
that answer)


\startformula
a   = \alignhere (b, c) \quad \text{with}
  \breakhere b = \text{something}
  \breakhere c = \text{someother}
  \breakhere
\text{somelong} = \alignhere bla
\stopformula

might be okay for your purpose

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Nested aligns in formulasjj

2023-08-14 Thread Gerion Entrup
Hi,

I try to typeset a nested align in a formula. However, the results looks
really wrong. Here is a MWE:

```
\starttext
\startformula
\startalign
\NC a = \NC (b, c) \quad \text{with}\NR
\NC   \NC \startalign
\NC b \NC = something \NR
\NC c \NC = someother \NR
  \stopalign \NR
\NC somelong = \NC bla \NR
\stopalign
\stopformula
\stoptext
```
Am I doing something wrong or are nested aligns not possible?


Best,
Gerion


test.pdf
Description: Adobe PDF document


signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Why overbar is so big

2023-08-14 Thread Hans Hagen via ntg-context

On 8/14/2023 9:13 AM, Xavier B. wrote:

It does not work:

\directlua{
34require "lualibs-os"
35 >> tex.sprint(math.floor(os.resultof("git log --pretty=oneline | wc 
-l")+1))}

What do you run directlua in LMTX?
in this case, what does does lualibs-os provide? os.resultof is built 
into context so that should just work


ok, i did as search on ctan and it looks like that lua file is just the 
context l-os one renamed so no need to load anything, in fact, loading 
it might even break the built in when it does overloads


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Why overbar is so big

2023-08-14 Thread Xavier B.
It does not work:

\directlua{
34require "lualibs-os"
35 >> tex.sprint(math.floor(os.resultof("git log --pretty=oneline | wc 
-l")+1))}

What do you run directlua in LMTX?
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___