Help/Simple Equations: Difference between revisions

From CIRPwiki
Jump to navigation Jump to search
mNo edit summary
Line 51: Line 51:
Some advanced equations have multiple lines, and it may be desired for each line to be aligned at a certain character on each line.
Some advanced equations have multiple lines, and it may be desired for each line to be aligned at a certain character on each line.
These advanced equations are described on the next page.
These advanced equations are described on the next page.
[[Help\Adv._Equations|Adv. Equations]]
[[Help/Adv._Equations|Adv. Equations]]

Revision as of 22:12, 2 October 2011

Typically numbered equations are centered in documents. Due to the appearance of the wiki, however, all numbered equations shown on this wiki are left justified with a small indent and the equation number is right justified.

AutoNumbered Equation

To produce a numbered equation in a wiki document, simply surround the LaTeX for the equations by the following: \ begin{equation} \label{}...\ end{equation) (Note: no space between the '\' and the 'begin' or 'end). The equation number will be automatically incremented, but will not be shown unless desired.

For example, this equation: \begin{equation} \label{} \left( {{\rho }_{s}}-\rho \right)g\frac{\pi }{6}{{d}^{3}}={{C}_{D}}\frac{\pi }{8}\rho W_{s}^{2}{{d}^{2}} \end{equation}

was typed as follows:
\ begin{equation} \label{}
   \left( {{\rho }_{s}}-\rho \right)g\frac{\pi }{6}{{d}^{3}}={{C}_{D}}\frac{\pi }{8}\rho W_{s}^{2}{{d}^{2}}
\ end{equation}

Equation Not Numbered

If for some reason it is desired to have an equation set aside but turn off display of the equation number, just leave off the delimiter \label{}. Be aware that the numbering for this equation is still incremented, just the number is not displayed.

For example, the above equation again: \begin{equation} \left( {{\rho }_{s}}-\rho \right)g\frac{\pi }{6}{{d}^{3}}={{C}_{D}}\frac{\pi }{8}\rho W_{s}^{2}{{d}^{2}} \end{equation}

was typed as follows:
\ begin{equation}
   \left( {{\rho }_{s}}-\rho \right)g\frac{\pi }{6}{{d}^{3}}={{C}_{D}}\frac{\pi }{8}\rho W_{s}^{2}{{d}^{2}}
\ end{equation}

Force Different Number From the Automatically Assigned

The automatic numbering is for all equations on a given page. But on a wiki, pages can be very long and it is deemed appropriate to separate material onto different pages (ie. by Chapters or Sections). In these cases, the user wishes to continue numbering from a previous value, but the automatic numbering will start over at 1 since material is on a new page. There is a way to force a different number as needed using the \tag{} delimiter.

In the actual document that the above equation came from, the number for that equation was 4. If I just used the \ begin{equation} \label to start this equation at this point on the page, the automatic number would give a 3. To change this, switch the \label{} with \tag{4} and the equation will appear with the desired number. (Note: 4 could be any alphanumeric label of any number of characters).

To demonstrate, the equation below forced with the equation number of 4: \begin{equation} \tag{4} \left( {{\rho }_{s}}-\rho \right)g\frac{\pi }{6}{{d}^{3}}={{C}_{D}}\frac{\pi }{8}\rho W_{s}^{2}{{d}^{2}} \end{equation}

was typed as follows:
\ begin{equation} \tag{4}
   \left( {{\rho }_{s}}-\rho \right)g\frac{\pi }{6}{{d}^{3}}={{C}_{D}}\frac{\pi }{8}\rho W_{s}^{2}{{d}^{2}}
\ end{equation}

It may be easiest to always force a tag number that is known, rather than relying on the automatic numbering.



Some advanced equations have multiple lines, and it may be desired for each line to be aligned at a certain character on each line. These advanced equations are described on the next page. Adv. Equations