* Period at the end of a "alignment block".
@ 2012-09-10 23:50 Andre Caldas
2012-09-10 23:59 ` Aditya Mahajan
0 siblings, 1 reply; 3+ messages in thread
From: Andre Caldas @ 2012-09-10 23:50 UTC (permalink / raw)
To: ConTeXt users
I have a macro to typeset function definitions:
\define[5]\functionarray
{
\startalign[n=4, align={left,right,center,left}]
\NC #1: \NC #2 \NC \to \NC #3 \NR
\NC \NC #4 \NC \mapsto \NC #5
\stopalign
}
I use it like this: (notice the period at the end)
\startformula
\functionarray{f}{X}{Y}{x}{f(x)}.
\stopformula
I get the following error:
Display math should end with \Ustopdisplaymath ...
If I remove the ".", the error does not happen.
How should I implement my "functionarray"?
Thanks,
André Caldas.
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Period at the end of a "alignment block".
2012-09-10 23:50 Period at the end of a "alignment block" Andre Caldas
@ 2012-09-10 23:59 ` Aditya Mahajan
2012-09-11 12:39 ` Andre Caldas
0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2012-09-10 23:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, 10 Sep 2012, Andre Caldas wrote:
> I have a macro to typeset function definitions:
>
> \define[5]\functionarray
> {
> \startalign[n=4, align={left,right,center,left}]
> \NC #1: \NC #2 \NC \to \NC #3 \NR
> \NC \NC #4 \NC \mapsto \NC #5
> \stopalign
> }
>
>
> I use it like this: (notice the period at the end)
> \startformula
> \functionarray{f}{X}{Y}{x}{f(x)}.
> \stopformula
>
> I get the following error:
> Display math should end with \Ustopdisplaymath ...
>
> If I remove the ".", the error does not happen.
>
> How should I implement my "functionarray"?
Use mathmatrix.
\definemathmatrix[functionarray][n=4, align={left,right,middle,left}, distance=0.2em]
\define[5]\functionarray
{\startfunctionarray
\NC #1: \NC #2 \NC \to \NC #3 \NR
\NC \NC #4 \NC \mapsto \NC #5 \NR
\stopfunctionarray}
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-11 12:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-10 23:50 Period at the end of a "alignment block" Andre Caldas
2012-09-10 23:59 ` Aditya Mahajan
2012-09-11 12:39 ` Andre Caldas
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).