ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Manually scaling math fences
@ 2017-03-06 19:57 Aditya Mahajan
  2017-03-07  6:35 ` Otared Kavian
  0 siblings, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2017-03-06 19:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mathias Schickel

Hi Hans,

There are instances where the automatic scaling provided by \left and 
\right is not ideal and one has to use manual scaling. For example:

\starttext
\startTEXpage \startformula
   \left\langle \sum_{i=1}^n A_i x_i \right\rangle
   \hbox{ vs. }
   \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle
\stopformula \stopTEXpage
\stoptext

Currently, math fences always default to using \left and \right, which can 
lead to undesirable results. For example:

\definemathfence [MEAN] [angle] [command=yes, color=blue]

\starttext
\startTEXpage \startformula
   \MEAN{ \sum_{i = 1}^n A_i x_i }
   \hbox{ vs. }
   \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle
\stopformula \stopTEXpage
\stoptext

Could we add an option to \definefence that allows the user to select the 
delimiter scaling using a key (say, `delimiter`) so that

\MEAN[delimiter=auto] expands to \left\langle .. \right\langle
\MEAN[delimiter=]     expands to \langle .. \rangle
\MEAN[delimiter=big]  expands to \big\langle  ... \big\rangle
\MEAN[delimiter=Big]  expands to \Big\langle  ... \Big\rangle
\MEAN[delimiter=bigg] expands to \bigg\langle ... \bigg\rangle
\MEAN[delimiter=Bigg] expands to \Bigg\langle ... \Bigg\rangle

I am not sure whether `delimiter` is the best key. I think that `scale` 
may be better, but using `scale` for specifying the scaling of math 
delimiters will be inconsistent with how `scale` is used everywhere else. 
Another option is to use `alternative` key.

Thanks,
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
___________________________________________________________________________________

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

end of thread, other threads:[~2017-03-24  9:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-06 19:57 Manually scaling math fences Aditya Mahajan
2017-03-07  6:35 ` Otared Kavian
2017-03-07  9:49   ` Hans Hagen
2017-03-08  1:45     ` Aditya Mahajan
2017-03-23 16:10       ` Hans Hagen
2017-03-24  7:24         ` Aditya Mahajan
2017-03-24  9:09           ` Hans Hagen
2017-03-24  9:56           ` Otared Kavian
2017-03-24  9:59             ` Otared Kavian

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).