ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
Subject: Re: Reg. fonts and math
Date: Fri, 13 Jan 2006 20:48:56 -0500 (EST)	[thread overview]
Message-ID: <Pine.WNT.4.63.0601131951280.732@nqvgln> (raw)
In-Reply-To: <43C7EA79.5020606@wxs.nl>

<--- On Jan 13, Hans Hagen wrote --->

> Aditya Mahajan wrote:
>
>> No, I mean the complicated math is much harder in context. Consider
>> 
>> \begin{align}
>>  a &= b \\
>>  c &= d \notag \\
>>    &= f \notag \\
>>    &= g
>> \end{align}
>> 
>> which will typeset as
>>
>>  a = b        (1)
>>  c = d
>>    = f
>>    = g        (2)
>> 
>> \begin{subequations}
>> \begin{align}
>>  a &= b \\
>>  c &= d
>> \end{align}
>> \end{subequations}
>> 
>> Compare this from how to do this in context (see the wiki). You have to 
>> *manually* set the number of the subequation. Actually, for equation 
>> numbering and refering, the context way is rather limited. Consider 
>> something like an align environment
>> 
>> a &= b\\
>> c &= d\\
>> e &= f
>> 
>> Suppose, I want to refer to the second equation.  In latex, I can simply 
>> add \label{eq:2} and the end of c&= d and then \ref{eq:2}. For context, the 
>> reference label goes at the top, with \placeformula[eqs]. But I am not 
>> sure, how to give individual labels to each equations.
>
> this 'loose label' is one of the ugliest concept i can think of -)

If you come up with any other way, I will be glad to use it. Frankly, 
I do not think that the latex syntax is the best, but plain tex looks 
too indimidating and context does not have anything yet.

> btw, defaulting to numbers and then using \notag is messy; i prefer readable 
> code, even if it takes more  bytes;  inventing a formula takes more time than 
> keying it in.  Also, more structure,  means more hooks for configurability

Fine by me. Your method is perfectly acceptable.

> much if this 'complicated' math is not that complicated to support,see 
> attached file

Wonderful. I did not know that something like this can be done so 
easily in context.

> i'm willing to implement anything reasonable but since i  hardly use such 
> math i only act on 'i want to achieve this' kind of specs (i have no time to 
> read tons of tex documents)

Here are features that I would want context math to have. I do not 
care about the input syntax (whether it is same as latex or not) as 
long as the features are there.

1. Have align support with variable number of columns.
  a &= b
    &= c &+ d
    &    &+ e

should be typeset as

  a = b
    = c + d
        + e

2. Have a mechanism to individually number/not-number an equation.

3. Have a gather environment. Depending on the user option should 
either center, left justify or right justify all equations. Useful 
when you have a bunch of equation together and do not want to have 
startforumla and stopformula after each of them.

4. In align you should be able to specify the separation between 
columns. There should be some input syntax that allows you to typeset 
an output like

   a = b                 c = d
   e = f                 g = h


It will be great if you can number each equation (i.e. four number in 
the above example). There should be an option to  only number each 
line.


5. have a splitformula environment that allows

  a =& b
     & + c \\
     & + d

to come out as

   a = b
       + c
       + e        (1)

with only one formula number. The formula number should be at the last 
line or the center of the whole formula, configurable by an option.

6. Allow, someway of typesetting

   a = b + c
Using some result
     = d + e

that is, you should be able to come out of the align mode temporarily 
and then go back. Latex calls this intertext. Have some means to 
adjust the before and after skips of intertext. Something like

\setupintertextskip[small or medium or big]

7. Allow some way of typesetting multilined formula where

first line is left aligned
   second line after some hskip
   third line after some hskip
   ...
   last line right alinged


This should have only one formula number, either on the last line or 
in the center of the display.

8. Have a version of align, gather and  multiline that can be used 
inside a formula. So one should be able to type

\startformula
  \left.\startaligned
   \NC a \NC= b \NR
   \NC c \NC= d \NR
   \stopaligned\right\}
   \implies
   \startaligned
   \NC b \NC= a \NR
   \NC d \NC= c \NR
   \stopaligned
\stopformula

to get

   a = b } =>  b = a
   c = d }     d = c

where the implies is centered between the two lined.

Have an option to make these environments come at the top, middle or 
bottom of the baseline.

9. Allow easy input of multiline subscripts. Suppose I want

   \sum
   a < b
   c < d
   e < f


10. Allow the big subscripts of math operators to be smashed to the 
left or right. Suppse, I have

  a \times \lim_{a very long equation} b_n

There should be a command, say \smashoperator such that

  a \times \smashoperator\lim_{a very long equation} b_n

comes as
   a lim b_n
a very long eq

where (a very long equation) in centered beneath the center of lim but 
the "bounding box" is the bb of lim not the bb of the subscript
Also

  a \times \smashoperator[r]\lim_{a very long equation} b_n

should come as

  a      lim b_n
    a very lone eq

where the "bounding box" of a lim on the right is the bb of the lim, 
on the left is the bb of the subscript.

Similarly of \smashoperator[l]

11. Have commands like \medop and \bigop which typeset the following 
operator slightly smaller or slightly larger.

12. Have a command say \novheight (or whatever) so that while typing

\left\{\novheight \sum_{i=0}^n a_n \right\}

the braces do not take the size of the sum into account while scaling.


13. Have a command say \tag so that

\startformula
  a = b \tag{*}
\stopformula

comes out as

  a = b (*)

14. Allow a framed command that works with align and aligned. So that


  a \implies\mframed{ \startaligned
   \NC b \NC= c \NR
   \NC e \NC= f \NR
   \NC g \NC= h \NR
  \stopaligned}

Comes as
       +---------+
       | b  = c  |
  a => | e  = f  |
       | g  = h  |
       +---------+

15. Automatic numbering in subequations. In the attachment that you 
sent, one has to number the subequations by hand. The trouble with 
this is that if you rearrange the equations at a later stage, you 
need to keep track of equation subnumbering.

These are all that I can think of right now. All these features are 
available in latex. It will be great if context can support these 
features (or a subset of thereof). I promise to document them if they 
get incorporated :-)

Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

  reply	other threads:[~2006-01-14  1:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-12  0:55 Kumar Appaiah
2006-01-12  8:20 ` Hans Hagen
2006-01-12 16:06   ` Aditya Mahajan
2006-01-12 17:47     ` Hans Hagen
2006-01-12 21:29       ` Aditya Mahajan
2006-01-13 17:59         ` Hans Hagen
2006-01-14  1:48           ` Aditya Mahajan [this message]
2006-01-14  8:36             ` Aditya Mahajan
2006-01-14 16:58             ` Adam Duck
2006-01-14 17:04               ` Aditya Mahajan
2006-01-14  9:47           ` Tobias Burnus
2006-01-15 17:27             ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.WNT.4.63.0601131951280.732@nqvgln \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).