ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* t-amsl and t-nath
@ 2003-12-02 21:35 Boris Hollas
  2003-12-06 22:22 ` Giuseppe Bilotta
  2003-12-06 23:38 ` Giuseppe Bilotta
  0 siblings, 2 replies; 15+ messages in thread
From: Boris Hollas @ 2003-12-02 21:35 UTC (permalink / raw)


Hello!

I tried the modules t-amsl and t-nath. This is what I noticed or have 
questions about:

1. The bracket for \cases{} is too small when t-nath is used, as in 
this example:

\usemodule[amsl]
\usemodule[nath]

\starttext

We denote by
\startformula
1_{ij} = \cases{ 1 & if $(i,j) \in \cal E$\cr
                      0 & else}
\stopformula
the {\em indicator function} of event $(i,j) \in \cal E$.

\stoptext

Without modules amsl and nath the brackets have correct size, but \cal 
has no effect.

2. Without module amsl, the above example produces an error message.

3. Module amsl uses \mathBbd{} for the blackboard fonts. I'm not sure 
if this is used in AMS-Latex, however neither amsmath nor amssymb 
introduce this command. Instead, there's a command \mathbb{} in 
amssymb for the blackboard fonts.

4. $\mathBbd{N}_0$ doesn't produce ${\mb N}_0$.

Boris Hollas

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: t-amsl and t-nath
  2003-12-02 21:35 t-amsl and t-nath Boris Hollas
@ 2003-12-06 22:22 ` Giuseppe Bilotta
  2003-12-07 20:14   ` Gathered equations with " David Munger
  2003-12-06 23:38 ` Giuseppe Bilotta
  1 sibling, 1 reply; 15+ messages in thread
From: Giuseppe Bilotta @ 2003-12-06 22:22 UTC (permalink / raw)


Tuesday, December 2, 2003 Boris Hollas wrote:

> Hello!

> I tried the modules t-amsl and t-nath.

Thank you very much :)


> This is what I noticed or have questions about:

> 1. The bracket for \cases{} is too small when t-nath is used, as in
> this example:

> \usemodule[amsl]
> \usemodule[nath]

> \starttext

> We denote by
> \startformula
> 1_{ij} = \cases{ 1 & if $(i,j) \in \cal E$\cr
>                       0 & else}
> \stopformula
> the {\em indicator function} of event $(i,j) \in \cal E$.

> \stoptext

> Without modules amsl and nath the brackets have correct size, but \cal
> has no effect.

I'll look into this bug.

> 2. Without module amsl, the above example produces an error message.

It's not supposed to work ;)

> 3. Module amsl uses \mathBbd{} for the blackboard fonts. I'm not sure
> if this is used in AMS-Latex, however neither amsmath nor amssymb
> introduce this command. Instead, there's a command \mathbb{} in
> amssymb for the blackboard fonts.

> 4. $\mathBbd{N}_0$ doesn't produce ${\mb N}_0$.

To fix these, please change the lines from line 165 in
t-amsl.tex (to the line with \enablemathcollection excluded)
into the following:

\def\!mathcal {\fam\purefamily{calligraphic}}
\def\!mathBbd {\fam\purefamily{blackboard}}
\def\!mathfrak{\fam\purefamily{fraktur}}

\def\mathcal #1{{\!mathcal #1}}
\def\mathbb  #1{{\!mathBbd #1}}
\def\mathfrak#1{{\!mathfrak#1}}

\appendtoks
  \let\cal \!mathcal
  \let\Bbd \!mathBbd
  \let\frak\!mathfrak
\to\everymath

\appendtoks
  \let\cal \!mathcal
  \let\Bbd \!mathBbd
  \let\frak\!mathfrak
\to\everydisplay

and let me know if it works fine.

This way (in math mode) \cal, \Bbd and \frak should change the
font for all following stuff (within local group) and \mathcal,
\mathbb, \mathfrak should work only on the following token. Am
I correct in remembering this is "the LaTeX way"?

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: t-amsl and t-nath
  2003-12-02 21:35 t-amsl and t-nath Boris Hollas
  2003-12-06 22:22 ` Giuseppe Bilotta
@ 2003-12-06 23:38 ` Giuseppe Bilotta
  2003-12-07  0:03   ` Gathered equations with " David Munger
  2003-12-07 11:21   ` Re[2]: " Giuseppe Bilotta
  1 sibling, 2 replies; 15+ messages in thread
From: Giuseppe Bilotta @ 2003-12-06 23:38 UTC (permalink / raw)


Tuesday, December 2, 2003 Boris Hollas wrote:

> Hello!

> I tried the modules t-amsl and t-nath. This is what I noticed or have
> questions about:

> 1. The bracket for \cases{} is too small when t-nath is used, as in
> this example:

> \usemodule[amsl]
> \usemodule[nath]

> \starttext

> We denote by
> \startformula
> 1_{ij} = \cases{ 1 & if $(i,j) \in \cal E$\cr
>                       0 & else}
> \stopformula
> the {\em indicator function} of event $(i,j) \in \cal E$.

> \stoptext

> Without modules amsl and nath the brackets have correct size, but \cal
> has no effect.

Ok, I gave a look at this one. I had forgotten to tell you that
I wanted to consider the \cases{...} construct obsolete!
The 'proper' (i.e. AMS-style) way to do it would be

\startcases
1 & \text{if etc } \cr
0 & \text{otherwise}
\stopcases

This will work, with or without nath (but of course with amsl).

Anyway, since I know how hard it is to get over one's habits :)
I updated both the amsl and nath module in such a way that they
will now support old-style \cases{...} constructs. There are
some minor spacing issues involved in the solution I came up
with, but that's the best I can do.

I uploaded a new ctx-math.zip to CTAN, containing the updated
files. If you want to grab the new modules before they get
distributed properly, see if you can get it from the UK node.

Also note that now nath will automatically load amsl,so you
don't need to \usemodule both :)

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Gathered equations with t-amsl and t-nath
  2003-12-06 23:38 ` Giuseppe Bilotta
@ 2003-12-07  0:03   ` David Munger
  2003-12-07 11:21   ` Re[2]: " Giuseppe Bilotta
  1 sibling, 0 replies; 15+ messages in thread
From: David Munger @ 2003-12-07  0:03 UTC (permalink / raw)


Hello Giuseppe, you've done a great work with amsl an nath modules!

Seems that there is a little bug when you try to gather more than two  
formulas:

\placeformula
\startgather
  f(x) = x   \\
  g(x) = x^2 \\
  h(x) = x^3
\stopgather


When doing so, I end up with the last two equations on the same line, with the  
same equation number.

Thanks!


David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re[2]: t-amsl and t-nath
  2003-12-06 23:38 ` Giuseppe Bilotta
  2003-12-07  0:03   ` Gathered equations with " David Munger
@ 2003-12-07 11:21   ` Giuseppe Bilotta
  1 sibling, 0 replies; 15+ messages in thread
From: Giuseppe Bilotta @ 2003-12-07 11:21 UTC (permalink / raw)


Sunday, December 7, 2003 Giuseppe Bilotta wrote:

> I uploaded a new ctx-math.zip to CTAN, containing the updated
> files. If you want to grab the new modules before they get
> distributed properly, see if you can get it from the UK node.

> Also note that now nath will automatically load amsl,so you
> don't need to \usemodule both :)

Ok, it's there:
===
Giuseppe Bilotta writes:

>    + what you've uploaded : ctx-math.zip
> 
>    + which CTAN node you've uploaded to : UK (ftp.tex.ac.uk)
> 
>    + where you want the files to go :
>    the two files contained in the .zip file should
>    be unpacked to
>    tex-archive/macros/context/contrib/maths
>    replacing the previous files.
>    
>    + what licensing conditions you apply to your software:
>    GNU GPL licence
> 
>    + a brief summary of what your upload is intended to do.
> 
>    The .zip archive contains two ConTeXt modules (t-nath.tex
>    and t-amsl.tex) that complement the math features in
>    ConTeXt. t-amsl provides some environments and commands that
>    most (AMS-)LaTeX users expect. t-nath provides for ConTeXt
>    the same functionality as provided by the Nath package for
>    LaTeX.
> 
>    This new upload fixes a couple of bugs concerning 'cases'
>    constructs and some font-related issues. Also, the nath
>    module now automatically loads the amsl module so there's no
>    need to manually load both if you need to use nath.

i've installed the files as requested.  thanks for the upload.

Robin Fairbairns

For the CTAN team
===

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Gathered equations with t-amsl and t-nath
  2003-12-06 22:22 ` Giuseppe Bilotta
@ 2003-12-07 20:14   ` David Munger
  2003-12-08  0:30     ` Giuseppe Bilotta
  0 siblings, 1 reply; 15+ messages in thread
From: David Munger @ 2003-12-07 20:14 UTC (permalink / raw)


[Sorry if this is a repost. The first time, I posted from the wrong email  
account.]

-----------------------

Hello Giuseppe, you've done a great work with amsl an nath modules!

Seems that there is a little bug when you try to gather more than two
formulas:

\placeformula
\startgather
 f(x) = x   \\
 g(x) = x^2 \\
 h(x) = x^3
\stopgather


When doing so, I end up with the last two equations on the same line, with the
same equation number.

Thanks!


David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gathered equations with t-amsl and t-nath
  2003-12-07 20:14   ` Gathered equations with " David Munger
@ 2003-12-08  0:30     ` Giuseppe Bilotta
  2003-12-08  0:56       ` Re : [NTG-context] " David Munger
  2003-12-08  0:59       ` David Munger
  0 siblings, 2 replies; 15+ messages in thread
From: Giuseppe Bilotta @ 2003-12-08  0:30 UTC (permalink / raw)


Sunday, December 7, 2003 David Munger wrote:

> [Sorry if this is a repost. The first time, I posted from the wrong email
> account.]

> -----------------------

> Hello Giuseppe, you've done a great work with amsl an nath modules!

> Seems that there is a little bug when you try to gather more than two
> formulas:

> \placeformula
> \startgather
>  f(x) = x   \\
>  g(x) = x^2 \\
>  h(x) = x^3
> \stopgather


> When doing so, I end up with the last two equations on the same line, with the
> same equation number.


I will look into this. Are you using amsl only or nath too?

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re : [NTG-context] Gathered equations with t-amsl and t-nath
  2003-12-08  0:30     ` Giuseppe Bilotta
@ 2003-12-08  0:56       ` David Munger
  2003-12-08  0:59       ` David Munger
  1 sibling, 0 replies; 15+ messages in thread
From: David Munger @ 2003-12-08  0:56 UTC (permalink / raw)


> > \placeformula
> > \startgather
> >  f(x) = x   \\
> >  g(x) = x^2 \\
> >  h(x) = x^3
> > \stopgather

> I will look into this. Are you using amsl only or nath too?

It works well with amsl only. Though it would be nice to have an option to  
chose between individual numbering or one number for all equations.

The bug happens when using nath too.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re : [NTG-context] Gathered equations with t-amsl and t-nath
  2003-12-08  0:30     ` Giuseppe Bilotta
  2003-12-08  0:56       ` Re : [NTG-context] " David Munger
@ 2003-12-08  0:59       ` David Munger
  2003-12-08 13:02         ` [NTG-context] " Giuseppe Bilotta
  1 sibling, 1 reply; 15+ messages in thread
From: David Munger @ 2003-12-08  0:59 UTC (permalink / raw)


> > \placeformula
> > \startgather
> >  f(x) = x   \\
> >  g(x) = x^2 \\
> >  h(x) = x^3
> > \stopgather


> I will look into this. Are you using amsl only or nath too?


It works well with amsl only. Though it would be nice to have an option to
chose between individual numbering or one number for all equations.

The bug happens when using nath too.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [NTG-context] Re : [NTG-context] Gathered equations with t-amsl and t-nath
  2003-12-08  0:59       ` David Munger
@ 2003-12-08 13:02         ` Giuseppe Bilotta
  2003-12-08 17:19           ` [NTG-context] " Giuseppe Bilotta
  2003-12-08 17:32           ` Re : [NTG-context] " David Munger
  0 siblings, 2 replies; 15+ messages in thread
From: Giuseppe Bilotta @ 2003-12-08 13:02 UTC (permalink / raw)


Monday, December 8, 2003 David Munger wrote:

>> > \placeformula
>> > \startgather
>> >  f(x) = x   \\
>> >  g(x) = x^2 \\
>> >  h(x) = x^3
>> > \stopgather

>> I will look into this. Are you using amsl only or nath too?

> It works well with amsl only. Though it would be nice to have an option to
> chose between individual numbering or one number for all equations.

> The bug happens when using nath too.

What version of ConTeXt are you using?

With the one I have here, there seems to have been some change
in the core that made your example bomb out ... gather and
align couldn't be used after \placeformula at all. I made a
quick fix to amsl for that. Now at least they work both with
and without nath.

Regarding your problem(s):

* with the ConTeXt version I have (2003.09.26), all lines in
the gather are separate. The whole block has a single number,
though. This is both with, and without nath.

* formula (sub)numbering needs a good cleanup in ConTeXt (just
like math support in general ...). I need to discuss the thing
with Hans before being able to fix the thing in amsl and/or
nath.

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [NTG-context] Re: [NTG-context] Re : [NTG-context] Gathered equations with t-amsl and t-nath
  2003-12-08 13:02         ` [NTG-context] " Giuseppe Bilotta
@ 2003-12-08 17:19           ` Giuseppe Bilotta
  2003-12-08 17:46             ` Re : [NTG-context] " David Munger
  2003-12-08 17:32           ` Re : [NTG-context] " David Munger
  1 sibling, 1 reply; 15+ messages in thread
From: Giuseppe Bilotta @ 2003-12-08 17:19 UTC (permalink / raw)


Monday, December 8, 2003 Giuseppe Bilotta wrote:

> Regarding your problem(s):

> * with the ConTeXt version I have (2003.09.26), all lines in
> the gather are separate. The whole block has a single number,
> though. This is both with, and without nath.

> * formula (sub)numbering needs a good cleanup in ConTeXt (just
> like math support in general ...). I need to discuss the thing
> with Hans before being able to fix the thing in amsl and/or
> nath.

Ok, I think I found what's going wrong.

David, please download the updated t-amsl.tex and t-nath.tex
from CTAN; then edit t-nath.tex and look for the line

\usemodule[amsl]

move it to the top of the file (after the "%D updated ..."
line). Secondly, look for the definition of \gather@cr and
replace it with

\def\gather@cr{
        \dmathoff@
      \egroup
    \stopnatheq
  \stopformula
  \stop
  \ifnumberedgather
    \expandafter\plaatsformule
  \fi
  \start
  \def\curr@cr{\gather@cr}%
  \let\\\curr@cr
  \dostartformula{nathgather}
    \startnatheq
      \hbox\bgroup
        \dmathon@
        \mathopen{}%
}

And have another go :)

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Re : [NTG-context] Gathered equations with t-amsl and t-nath
  2003-12-08 13:02         ` [NTG-context] " Giuseppe Bilotta
  2003-12-08 17:19           ` [NTG-context] " Giuseppe Bilotta
@ 2003-12-08 17:32           ` David Munger
  2003-12-08 18:42             ` Re[2]: [NTG-context] " Giuseppe Bilotta
  1 sibling, 1 reply; 15+ messages in thread
From: David Munger @ 2003-12-08 17:32 UTC (permalink / raw)


> What version of ConTeXt are you using?

texexec says:
ConTeXt  ver: 2003.1.31  fmt: 2003.10.4  int: english  mes: english

I'm using the version included in debian unstable's tetex package.


> * formula (sub)numbering needs a good cleanup in ConTeXt (just
> like math support in general ...). I need to discuss the thing
> with Hans before being able to fix the thing in amsl and/or
> nath.

I just started using ConTeXt for writing scientific papers. Before I was aware  
of the nath module, writing math was tedious. But now, in my opinion, your  
nath module does the trick pretty well.

Thanks for helping,

David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re : [NTG-context] Re: [NTG-context] Re: [NTG-context] Re : [NTG-context] Gathered equations with t-amsl and t-nath
  2003-12-08 17:19           ` [NTG-context] " Giuseppe Bilotta
@ 2003-12-08 17:46             ` David Munger
  2003-12-08 18:46               ` Giuseppe Bilotta
  0 siblings, 1 reply; 15+ messages in thread
From: David Munger @ 2003-12-08 17:46 UTC (permalink / raw)


> Monday, December 8, 2003 Giuseppe Bilotta wrote:
> 
> > Regarding your problem(s):
> 
> > * with the ConTeXt version I have (2003.09.26), all lines in
> > the gather are separate. The whole block has a single number,
> > though. This is both with, and without nath.
> 
> > * formula (sub)numbering needs a good cleanup in ConTeXt (just
> > like math support in general ...). I need to discuss the thing
> > with Hans before being able to fix the thing in amsl and/or
> > nath.
> 
> Ok, I think I found what's going wrong.

Actually you did! :) One number per line, great! Thank you.

David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re[2]: [NTG-context] Re : [NTG-context] Gathered equations with t-amsl and t-nath
  2003-12-08 17:32           ` Re : [NTG-context] " David Munger
@ 2003-12-08 18:42             ` Giuseppe Bilotta
  0 siblings, 0 replies; 15+ messages in thread
From: Giuseppe Bilotta @ 2003-12-08 18:42 UTC (permalink / raw)


Monday, December 8, 2003 David Munger wrote:

>> What version of ConTeXt are you using?

> texexec says:
> ConTeXt  ver: 2003.1.31  fmt: 2003.10.4  int: english  mes: english

> I'm using the version included in debian unstable's tetex package.

That's pretty old. May I suggest an upgrade? (It wouldn't have
fixed the problem, and actually created a couple of new ones,
but at least we would have been using the same versions ;))

>> * formula (sub)numbering needs a good cleanup in ConTeXt (just
>> like math support in general ...). I need to discuss the thing
>> with Hans before being able to fix the thing in amsl and/or
>> nath.

> I just started using ConTeXt for writing scientific papers. Before I was aware
> of the nath module, writing math was tedious. But now, in my opinion, your
> nath module does the trick pretty well.

> Thanks for helping,

Thank you too :)

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gathered equations with t-amsl and t-nath
  2003-12-08 17:46             ` Re : [NTG-context] " David Munger
@ 2003-12-08 18:46               ` Giuseppe Bilotta
  0 siblings, 0 replies; 15+ messages in thread
From: Giuseppe Bilotta @ 2003-12-08 18:46 UTC (permalink / raw)


Monday, December 8, 2003 David Munger wrote:

>> Monday, December 8, 2003 Giuseppe Bilotta wrote:
>> 
>> > Regarding your problem(s):
>> 
>> > * with the ConTeXt version I have (2003.09.26), all lines in
>> > the gather are separate. The whole block has a single number,
>> > though. This is both with, and without nath.
>> 
>> > * formula (sub)numbering needs a good cleanup in ConTeXt (just
>> > like math support in general ...). I need to discuss the thing
>> > with Hans before being able to fix the thing in amsl and/or
>> > nath.
>> 
>> Ok, I think I found what's going wrong.

> Actually you did! :) One number per line, great! Thank you.

It is true that each of them is numbered, but there's a problem
with referencing (i.e. you cannot reference the equations past
the first in the group). I have to implement LaTeX-style \label and \tag
commands for this. But that's something quite complex, and it's
going to need a bunch of hooks in the core, so it'll have to
wait. And of course subnumbering has to be implemented yet.

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-12-08 18:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-02 21:35 t-amsl and t-nath Boris Hollas
2003-12-06 22:22 ` Giuseppe Bilotta
2003-12-07 20:14   ` Gathered equations with " David Munger
2003-12-08  0:30     ` Giuseppe Bilotta
2003-12-08  0:56       ` Re : [NTG-context] " David Munger
2003-12-08  0:59       ` David Munger
2003-12-08 13:02         ` [NTG-context] " Giuseppe Bilotta
2003-12-08 17:19           ` [NTG-context] " Giuseppe Bilotta
2003-12-08 17:46             ` Re : [NTG-context] " David Munger
2003-12-08 18:46               ` Giuseppe Bilotta
2003-12-08 17:32           ` Re : [NTG-context] " David Munger
2003-12-08 18:42             ` Re[2]: [NTG-context] " Giuseppe Bilotta
2003-12-06 23:38 ` Giuseppe Bilotta
2003-12-07  0:03   ` Gathered equations with " David Munger
2003-12-07 11:21   ` Re[2]: " Giuseppe Bilotta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).