Difference between revisions of "Command/startformula"

From ConTeXt wiki
Jump to navigationJump to search
m (cleanup)
Line 29: Line 29:
  
 
This is the first mathematical formula
 
This is the first mathematical formula
\placeformula[First]
+
\placeformula[First]
\startformula
+
\startformula
  \sin^2(t)^2 + \cos^2(t) = 1.
+
  \sin^2(t)^2 + \cos^2(t) = 1.
\stopformula
+
\stopformula
  
 
This is another formula
 
This is another formula
\placeformula[eqn:tangent]
+
\placeformula[eqn:tangent]
\startformula
+
\startformula
  \cos^2(t) = \frac{1}{1+\tan^2(t)}.
+
  \cos^2(t) = \frac{1}{1+\tan^2(t)}.
\stopformula
+
\stopformula
 
As one may see from relation~(\in[eqn:tangent]), $\cos(t)$ and  
 
As one may see from relation~(\in[eqn:tangent]), $\cos(t)$ and  
 
$\sin(t)$ can be determined by $\tan(t)$\dots  
 
$\sin(t)$ can be determined by $\tan(t)$\dots  
  
 
This is the third formula
 
This is the third formula
\placeformula[Pythagora]
+
\placeformula[Pythagora]
\startformula
+
\startformula
  |a+b|^2 = |a|^2 + |b|^2
+
    |a+b|^2 = |a|^2 + |b|^2
\stopformula
+
\stopformula
 
Clearly equality (\in[Pythagora]) holds for $a,b \in {\Bbb R}^n$
 
Clearly equality (\in[Pythagora]) holds for $a,b \in {\Bbb R}^n$
 
if and only if $(a|b) =0$, where the scalar product  
 
if and only if $(a|b) =0$, where the scalar product  
 
$(\cdot|\cdot)$ on ${\Bbb R}^n$ is defined to be  
 
$(\cdot|\cdot)$ on ${\Bbb R}^n$ is defined to be  
\startformula
+
\startformula
  (a|b) := a\cdot b =\sum_{j=1}^{n}a_jb_j, \qquad |a|^2 := (a|a).
+
  (a|b) := a\cdot b =\sum_{j=1}^{n}a_jb_j, \qquad |a|^2 := (a|a).
\stopformula
+
\stopformula
 
(Note that the above equation is {\it not\/} numbered).
 
(Note that the above equation is {\it not\/} numbered).
 
\stoptext
 
\stoptext
 
</code>
 
</code>
 
  
 
== See also ==
 
== See also ==

Revision as of 10:32, 30 September 2010

\startformula

Syntax

\startformula ... \stopformula

Description

comment

Note: these are defined by the following lines in core-mat.tex:

 \setvalue{\e!start\v!formula}{\dostartformula{}}
 \setvalue{\e!stop \v!formula}{\dostopformula}


Example

\starttext

This is the first mathematical formula

\placeformula[First]
\startformula
  \sin^2(t)^2 + \cos^2(t) = 1.
\stopformula

This is another formula

\placeformula[eqn:tangent]
\startformula
  \cos^2(t) = \frac{1}{1+\tan^2(t)}.
\stopformula

As one may see from relation~(\in[eqn:tangent]), $\cos(t)$ and $\sin(t)$ can be determined by $\tan(t)$\dots

This is the third formula

\placeformula[Pythagora]
\startformula
   |a+b|^2 = |a|^2 + |b|^2
\stopformula

Clearly equality (\in[Pythagora]) holds for $a,b \in {\Bbb R}^n$ if and only if $(a|b) =0$, where the scalar product $(\cdot|\cdot)$ on ${\Bbb R}^n$ is defined to be

\startformula
  (a|b) := a\cdot b =\sum_{j=1}^{n}a_jb_j, \qquad |a|^2 := (a|a).
\stopformula

(Note that the above equation is {\it not\/} numbered). \stoptext

See also