285 lines
9.2 KiB
HTML
285 lines
9.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>Linuxdoc Reference: Mathematical Formulas</TITLE>
|
|
<LINK HREF="Linuxdoc-Reference-10.html" REL=next>
|
|
<LINK HREF="Linuxdoc-Reference-8.html" REL=previous>
|
|
<LINK HREF="Linuxdoc-Reference.html#toc9" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="Linuxdoc-Reference-10.html">Next</A>
|
|
<A HREF="Linuxdoc-Reference-8.html">Previous</A>
|
|
<A HREF="Linuxdoc-Reference.html#toc9">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="formula"></A> <A NAME="s9">9. Mathematical Formulas</A></H2>
|
|
|
|
<P>They can appear with in the tags listed in table
|
|
<A HREF="#tmformula">Places of Mathematical Formulas</A><P>
|
|
<CENTER><TABLE BORDER><TR><TD>
|
|
<BR>
|
|
tag</TD><TD>description</TD><TD>see</TD></TR><TR><TD>
|
|
</TD></TR><TR><TD>
|
|
f</TD><TD>inline formula</TD><TD>
|
|
<A HREF="Linuxdoc-Reference-8.html#f">The Formula Tag</A></TD></TR><TR><TD>
|
|
dm</TD><TD>displayed formula</TD><TD>
|
|
<A HREF="Linuxdoc-Reference-7.html#mathpar">Mathematical Paragraph</A></TD></TR><TR><TD>
|
|
eq</TD><TD>equation</TD><TD>
|
|
<A HREF="Linuxdoc-Reference-7.html#mathpar">Mathematical Paragraph</A>
|
|
<CAPTION>Places of Mathematical Formulas
|
|
<A NAME="tmformula"></A> </CAPTION>
|
|
</TD></TR></TABLE></CENTER>
|
|
<P>If you view this document mapped to html you will notice that html has no
|
|
nice way of displaying mathematical formulas.
|
|
<P>After a little hand parsing the contents of a <EM>mathematical</EM> tag looks like:
|
|
<HR>
|
|
<PRE>
|
|
<!element xx - -
|
|
(((fr|lim|ar|root) |
|
|
(pr|in|sum) |
|
|
(#pcdata|mc|(tu|phr)) |
|
|
(rf|v|fi) |
|
|
(unl|ovl|sup|inf))*)>
|
|
</PRE>
|
|
<HR>
|
|
|
|
The <CODE>xx</CODE> stands for <CODE>f</CODE>, <CODE>dm</CODE> or <CODE>eq</CODE>. All of them are the same.
|
|
<P>
|
|
<P>
|
|
<DL>
|
|
<DT><B>Note:</B><DD><P>Because neither Netscape nor Microsoft has seen any need
|
|
to add mathematical mappings to their browsers (like demanded and defined by
|
|
<EM>w3c</EM>), there is no nice way of mapping, or at least displaying the math
|
|
stuff in html. So if you view the online version, feel free to wonder what
|
|
nonsense this man is telling here. Might be you should take a glance at the
|
|
postscript version.
|
|
</DL>
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="fr"></A> <A NAME="ss9.1">9.1 Fraction Tag</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<HR>
|
|
<PRE>
|
|
<!element fr - - (nu,de) >
|
|
<!element nu o o ((%fbutxt;)*) >
|
|
<!element de o o ((%fbutxt;)*) >
|
|
</PRE>
|
|
<HR>
|
|
<P>So what we see from it is, that a <EM>fraction</EM> consits of a <EM>numerator</EM>
|
|
and a <EM>denumerator</EM> tag, wich again each one can hold a
|
|
<EM>mathematical formula</EM>.
|
|
<P>I think an example will tell you more:
|
|
<PRE>
|
|
<dm><fr><nu/7/<de/13/</fr></dm>
|
|
</PRE>
|
|
<P>results to:
|
|
<P>
|
|
<DM>
|
|
<FR><NU>7</NU><DE>13</DE></FR>
|
|
</DM>
|
|
<P>In case we want to to place 1/2 instead of the numerator without cleaning it
|
|
up, we'll type:
|
|
<P>
|
|
<PRE>
|
|
<dm><fr><nu><fr><nu/1/<de/2/</fr></nu><de/13/</fr></dm>
|
|
</PRE>
|
|
<P>Which results to:
|
|
<P>
|
|
<DM>
|
|
<FR><NU><FR><NU>1</NU><DE>2</DE></FR></NU><DE>13</DE></FR>
|
|
</DM>
|
|
<P>
|
|
<H2><A NAME="prinsum"></A> <A NAME="ss9.2">9.2 Product, Integral and Summation Tag</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<HR>
|
|
<PRE>
|
|
<!element pr - - (ll,ul,opd?) >
|
|
<!element in - - (ll,ul,opd?) >
|
|
<!element sum - - (ll,ul,opd?) >
|
|
</PRE>
|
|
<HR>
|
|
<P>Each of them has a <EM>lower limit</EM> (<CODE>ll</CODE> tag),
|
|
a <EM>upper limit</EM> (<CODE>ul</CODE> tag) and a optional <EM>operand</EM>,
|
|
where each of them again may consist of a formula.
|
|
The tags are same in syntax like shown in table
|
|
<A HREF="#tulllop">Tags with upper-, lower limit and operator</A>.
|
|
<P>
|
|
<CENTER><TABLE BORDER><TR><TD>
|
|
<BR>
|
|
name</TD><TD>example</TD><TD>result</TD></TR><TR><TD>
|
|
</TD></TR><TR><TD>
|
|
Product</TD><TD><CODE><f>y=<pr><ll>i=1<ul>n<opd>x<inf/i/</pr></f></CODE></TD><TD>y=<PR><LL>i=1</LL><UL>n</UL><OPD>x<SUB>i</SUB></OPD></PR></TD></TR><TR><TD>
|
|
Integral</TD><TD><CODE><f>y=<in><ll>a<ul>b<opd>x<sup/2/</in></f></CODE></TD><TD>y=<INT><LL>a</LL><UL>b</UL><OPD>x<SUP>2</SUP></OPD></INT></TD></TR><TR><TD>
|
|
Summation</TD><TD><CODE><f>y=<sum><ll>i=1<ul>n<opd>x<inf/i/</sum></f></CODE></TD><TD>y=<SUM><LL>i=1</LL><UL>n</UL><OPD>x<SUB>i</SUB></OPD></SUM></TD></TR><TR><TD>
|
|
|
|
<CAPTION>Tags with upper-, lower limit and operator
|
|
<A NAME="tulllop"></A> </CAPTION>
|
|
</TD></TR></TABLE></CENTER>
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="lim"></A> <A NAME="ss9.3">9.3 Limited Tag</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<HR>
|
|
<PRE>
|
|
<!element lim - - (op,ll,ul,opd?) >
|
|
<!element op o o (%fcstxt;|rf|%fph;) -(tu) >
|
|
<!element ll o o ((%fbutxt;)*) >
|
|
<!element ul o o ((%fbutxt;)*) >
|
|
<!element opd - o ((%fbutxt;)*) >
|
|
</PRE>
|
|
<HR>
|
|
<P>You can use that one for operators with upper and lower limits other than
|
|
products, sums or integrals. The for the other types defined <EM>operator</EM> is
|
|
destinied by the <CODE>op</CODE>tag, wich can contain again a mathematical formula.
|
|
<P>
|
|
<DM>
|
|
<LIM><OP>B</OP><LL>i=0</LL><UL>n</UL><OPD>x<SUB>i</SUB></OPD></LIM>
|
|
</DM>
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="ar"></A> <A NAME="ss9.4">9.4 Array Tag</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<HR>
|
|
<PRE>
|
|
<!element ar - - (row, (arr, row)*) >
|
|
<!attlist ar
|
|
ca cdata #required >
|
|
<!element arr - o empty >
|
|
<!element arc - o empty >
|
|
<!entity arr "<arr>" >
|
|
<!entity arc "<arc>" >
|
|
</PRE>
|
|
<HR>
|
|
|
|
Of course a reasonable mathematical document needs a way to describe arrays
|
|
and matrices.
|
|
The <EM>array</EM> (<CODE>ar</CODE>) is noted down equivalent to a <EM>tabular</EM> (see
|
|
section
|
|
<A HREF="Linuxdoc-Reference-7.html#tabular">The Tabular Tag</A>).
|
|
The differences in handling are:
|
|
<UL>
|
|
<LI>No <CODE><hline></CODE> tag.</LI>
|
|
<LI>The <CODE>ca</CODE> attribute character <CODE>|</CODE> is not allowd.</LI>
|
|
<LI>Columns are not separated by <CODE>colsep</CODE> tag but with the <CODE>arc</CODE> tag
|
|
(<EM>array collumn</EM>).</LI>
|
|
<LI>Rows are not separated by <CODE>rowsep</CODE> tag but with the <CODE>arr</CODE> tag
|
|
(<EM>array row</EM>).</LI>
|
|
</UL>
|
|
|
|
Again the characters <CODE>|</CODE> and <CODE>@</CODE> are mapped to the adequate separator
|
|
tag, so you really can note a array same way as a tabular.
|
|
<P>
|
|
<PRE>
|
|
<dm><ar ca="clcr">
|
|
a+b+c | uv <arc> x-y | 27 @
|
|
a+b | u+v | z | 134 <arr>
|
|
a | 3u+vw | xyz | 2,978
|
|
</ar></dm>
|
|
</PRE>
|
|
<P>Is mapped to:
|
|
<P>
|
|
<DM>
|
|
<AR>a+b+c <ARC>uv <ARC>x-y <ARC>27 <ARR>a+b <ARC>u+v <ARC>z <ARC>134 <ARR>a <ARC>3u+vw <ARC>xyz <ARC>2,978 </AR>
|
|
</DM>
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="root"></A> <A NAME="ss9.5">9.5 Root Tag</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<HR>
|
|
<PRE>
|
|
<!element root - - ((%fbutxt;)*) >
|
|
<!attlist root
|
|
n cdata "">
|
|
</PRE>
|
|
<HR>
|
|
|
|
The <EM>root</EM> is noted down by the <CODE>root</CODE> tag, wich contains a <CODE>n</CODE>
|
|
attribute, holding the value for the "n'th" root.
|
|
<P>
|
|
<PRE>
|
|
<dm><root n="3"/x+y/</dm>
|
|
</PRE>
|
|
<P>is mapped to:
|
|
<P>
|
|
<DM>
|
|
<ROOT>x+y</ROOT>
|
|
</DM>
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="fi"></A> <A NAME="ss9.6">9.6 Figure Tag</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<HR>
|
|
<PRE>
|
|
<!element fi - o (#pcdata) >
|
|
</PRE>
|
|
<HR>
|
|
<P>With the figure tag you can place mathematical figures. The tagged characters
|
|
are directly mapped to a mathematical figure. Which character is mapped to which
|
|
figure you'll find in
|
|
<A HREF="Linuxdoc-Reference-15.html#mflist">Mathematical Figures</A>.
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="rf"></A> <A NAME="ss9.7">9.7 Realfont Tag</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<HR>
|
|
<PRE>
|
|
<!element rf - o (#pcdata) >
|
|
</PRE>
|
|
<HR>
|
|
|
|
This tag is placing a real font within a mathematical formula.
|
|
<BLOCKQUOTE>I'm really not sure about <CODE>rf</CODE>. What should it be?</BLOCKQUOTE>
|
|
|
|
No formula is allowed within that tag.
|
|
<P>
|
|
<PRE>
|
|
<dm><rf/Binom:/ (a+b)<sup/2/=a<sup/2/+2ab+b<sup/2/</dm>
|
|
</PRE>
|
|
<P>is mapped to:
|
|
<P>
|
|
<DM>
|
|
<RF>Binom:</RF> (a+b)<SUP>2</SUP>=a<SUP>2</SUP>+2ab+b<SUP>2</SUP>
|
|
</DM>
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="omt"></A> <A NAME="ss9.8">9.8 Other Mathematical Tags</A>
|
|
</H2>
|
|
|
|
<P>The remaining tags simply modify the tagged formula, without implying any
|
|
other tag. The effect is shown in table
|
|
<A HREF="#tomt">Mathematical tags without included tags</A><P>
|
|
<CENTER><TABLE BORDER><TR><TD>
|
|
<BR>
|
|
name</TD><TD>tag</TD><TD>example</TD><TD> </TD><TD>result</TD></TR><TR><TD>
|
|
</TD></TR><TR><TD>
|
|
<EM>vector</EM></TD><TD><CODE>v</CODE></TD><TD><CODE><f><v/a/&times;<v/b/=<v/0/</f></CODE></TD><TD>-></TD><TD><V>a</V>×<V>b</V>=<V>0</V> </TD></TR><TR><TD>
|
|
<EM>overline</EM></TD><TD><CODE>ovl</CODE></TD><TD><CODE><f><ovl/1+1/=<ovl/2/</f></CODE></TD><TD>-></TD><TD><OVL>1+1</OVL>=<OVL>2</OVL></TD></TR><TR><TD>
|
|
<EM>underline</EM></TD><TD><CODE>unl</CODE></TD><TD><CODE><f><unl/1+1/=<unl/2/</f></CODE></TD><TD>-></TD><TD><UNL>1+1</UNL>=<UNL>2</UNL></TD></TR><TR><TD>
|
|
<EM>superior</EM></TD><TD><CODE>sup</CODE></TD><TD><CODE><f>e=m&times;c<sup/2/</f></CODE></TD><TD>-></TD><TD>e=m×c<SUP>2</SUP></TD></TR><TR><TD>
|
|
<EM>inferior</EM></TD><TD><CODE>inf</CODE></TD><TD><CODE><f>x<inf/i/:=2x<inf/i-1/+3</f></CODE></TD><TD>-></TD><TD>x<SUB>i</SUB>:=2x<SUB>i-1</SUB>+3</TD></TR><TR><TD>
|
|
|
|
<CAPTION>Mathematical tags without included tags
|
|
<A NAME="tomt"></A> </CAPTION>
|
|
</TD></TR></TABLE></CENTER>
|
|
<P>
|
|
<HR>
|
|
<A HREF="Linuxdoc-Reference-10.html">Next</A>
|
|
<A HREF="Linuxdoc-Reference-8.html">Previous</A>
|
|
<A HREF="Linuxdoc-Reference.html#toc9">Contents</A>
|
|
</BODY>
|
|
</HTML>
|