Help/Adv. Equations: Difference between revisions
m (moved Help\Adv. Equations to Help/Adv. Equations) |
mNo edit summary |
||
Line 1: | Line 1: | ||
==Multiple Lines in Equations== | ==Multiple Lines in Equations== | ||
Multiple lines in equations are handled between the delimiters ''' | 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 '&' on each line. | ||
For example, that the equation: | For example, that the equation: | ||
<math> | |||
& \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) \\ | ||
</math> | |||
was typed as follows:<br> | was typed as follows:<br> | ||
''' | '''<nowiki><math></nowiki><br>''' | ||
''' & \text{if} \quad r\le 1.57\quad {{f}_{w}}=0.3 \\ <br>''' | ''' & \text{if} \quad r\le 1.57\quad {{f}_{w}}=0.3 \\ <br>''' | ||
''' & \text{if} \quad r>1.57\quad {{f}_{w}}=0.00251\ \exp \left( 5.21\ {{r}^{-0.19}} \right) \\ <br>''' | ''' & \text{if} \quad r>1.57\quad {{f}_{w}}=0.00251\ \exp \left( 5.21\ {{r}^{-0.19}} \right) \\ <br>''' | ||
''' | '''<nowiki></math></nowiki><br>''' | ||
The same multi-line equation can be numbered, by enclosing the whole of the "align" inside a "equation" class, as shown below: | The same multi-line equation can be numbered, by enclosing the whole of the "align" inside a "equation" class, as shown below: |
Revision as of 13:55, 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, that the equation: Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle & \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) \\ }
was typed as follows:
<math>
& \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) \\
</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}