Help/Adv. Equations: Difference between revisions

From CIRPwiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Multiple Lines in Equations==
==Multiple Lines in Equations==
Multiple lines in equations are handled between the delimiters '''\ begin{align}''' and '''\ end{align}''' 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.
Multiple lines in equations are handled between the delimiters '''\begin{align}''' and '''\end{align}''' 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, that the equation:
For example, the equation:
 
<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>
 
was typed as follows:<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>1.57\quad {{f}_{w}}=0.00251\ \exp \left( 5.21\ {{r}^{-0.19}} \right) \\ <br>'''
'''\end{align}'''<br>
'''<nowiki></math></nowiki><br>'''
 
The same multi-line equation can be numbered, by enclosing the whole of the "align" inside an Equation template, as shown below:
{{Equation|<math>
\begin{align}
\begin{align}
& \text{if}\quad r\le 1.57\quad {{f}_{w}}=0.3 \\
& \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) \\
& \text{if} \quad r>1.57\quad {{f}_{w}}=0.00251\ \exp \left( 5.21\ {{r}^{-0.19}} \right) \\
\end{align}
\end{align}
</math>|25}}


was typed as follows:<br>
was typed as follows:<br>
'''\begin{align}<br>'''
'''<nowiki>{{Equation|<math></nowiki><br>'''
'''& \text{if}\quad r\le 1.57\quad {{f}_{w}}=0.3 \\ <br>'''
'''\begin{align}'''<br>
'''& \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\le 1.57\quad {{f}_{w}}=0.3 \\ <br>'''
'''\end{align}<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>|25}}</nowiki><br>'''
 
 
---------
[[Help/LaTeX_Symbols|LaTeX Symbols]]

Latest revision as of 15:12, 13 December 2022

Multiple Lines in Equations

Multiple lines in equations are handled between the delimiters \begin{align} and \end{align} 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 an Equation template, as shown below:

  (25)

was typed as follows:
{{Equation|<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>|25}}



LaTeX Symbols