Help/Adv. Equations: Difference between revisions

From CIRPwiki
Jump to navigation Jump to search
Line 2: Line 2:
Multiple lines in equations are handled between the delimiters '''<nowiki><math></nowiki>''' and '''<nowiki></math></nowiki>''' with each line separated from the next with the use of '\\' at the end.  Each line can be aligned at a location designated by '&amp;' on each line.   
Multiple lines in equations are handled between the delimiters '''<nowiki><math></nowiki>''' and '''<nowiki></math></nowiki>''' with each line separated from the next with the use of '\\' at the end.  Each line can be aligned at a location designated by '&amp;' on each line.   


For example, the equation:<br>
For example, the equation:
 
<math>
<math>
\begin{align}
\begin{align}
Line 12: Line 13:
was typed as follows:<br>
was typed as follows:<br>
'''<nowiki><math></nowiki><br>'''
'''<nowiki><math></nowiki><br>'''
'''\begin{align}'''<br>
'''&nbsp;&nbsp;&nbsp;&amp; \text{if} \quad r\le 1.57\quad {{f}_{w}}=0.3 \\ <br>'''
'''&nbsp;&nbsp;&nbsp;&amp; \text{if} \quad r\le 1.57\quad {{f}_{w}}=0.3 \\ <br>'''
'''&nbsp;&nbsp;&nbsp;&amp; \text{if} \quad r>1.57\quad {{f}_{w}}=0.00251\ \exp \left( 5.21\ {{r}^{-0.19}} \right) \\ <br>'''
'''&nbsp;&nbsp;&nbsp;&amp; \text{if} \quad r>1.57\quad {{f}_{w}}=0.00251\ \exp \left( 5.21\ {{r}^{-0.19}} \right) \\ <br>'''
'''\end{align}'''<br>
'''<nowiki></math></nowiki><br>'''
'''<nowiki></math></nowiki><br>'''



Revision as of 13:57, 23 October 2012

Multiple Lines in Equations

Multiple lines in equations are handled between the delimiters <math> and </math> with each line separated from the next with the use of '\\' at the end. Each line can be aligned at a location designated by '&' on each line.

For example, the equation:

was typed as follows:
<math>
\begin{align}
   & \text{if} \quad r\le 1.57\quad {{f}_{w}}=0.3 \\
   & \text{if} \quad r>1.57\quad {{f}_{w}}=0.00251\ \exp \left( 5.21\ {{r}^{-0.19}} \right) \\
\end{align}
</math>

The same multi-line equation can be numbered, by enclosing the whole of the "align" inside a "equation" class, as shown below: \begin{equation} \tag{25} \begin{align} & \text{if} \quad r\le 1.57\quad {{f}_{w}}=0.3 \\ & \text{if} \quad r>1.57\quad {{f}_{w}}=0.00251\ \exp \left( 5.21\ {{r}^{-0.19}} \right) \\ \end{align} \end{equation}

was typed as follows:
\ begin{equation} \tag{25}
\ begin{align}
   & \text{if} \quad r\le 1.57\quad {{f}_{w}}=0.3 \\
   & \text{if} \quad r>1.57\quad {{f}_{w}}=0.00251\ \exp \left( 5.21\ {{r}^{-0.19}} \right) \\
\ end{align}
\ end{equation}