Equations: Difference between revisions

From ICAR Wiki
No edit summary
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category: SOP]]
[[Category: SOP]]
__TOC__
__TOC__
Equations in Mediawiki are rendered using the very powerful markup language in [https://www.latex-project.org/ LaTex]. Authors may create equations in the free LaTex editor [[https://www.lyx.org/ LyX]]. The equation markup can then be copied/pasted into a wiki article using the source editor ("Edit source" tab upper right)Alternatively, most modern equation editors including MSWord, will convert equations to LaTex, and this conversion can be copied/pasted.
Equations in Mediawiki are rendered using the very powerful markup language in [https://www.latex-project.org/ LaTex].     Standardizing on LaTex provides for a uniformly supported protocol by many software platformsThis facilitates the collaboration between multiple authors of the same page by eliminating translation errors and providing consistent procedures with minimal impact on markup software choices between authors.


This link is to a video showing how to [https://www.youtube.com/watch?v=szEGHayWLtw convert equations in MSWord to LaTex].
Many modern equation editors, including MS Word, will convert equations to LaTex, and this conversion can be copied/pasted into the wiki page using the source editor ('''Edit source''' tab upper right). Here is a link to a video showing how to [https://www.youtube.com/watch?v=szEGHayWLtw convert equations in MS Word to LaTex].


== <nowiki><Math></math></nowiki> tags ==
Alternatively, authors can create LaTeX equation markup in the free LaTex editor [https://www.lyx.org/ LyX]. The equation markup can then be copied/pasted into a wiki page using the source editor ('''Edit source''' tab upper right).
The equation markup in LaTex must appear in between <nowiki><Math></nowiki> and <nowiki></math></nowiki> tags.  For example,
 
For LibreOffice users there are LaTex "addons".  Search for  "LibreOffice LaTex addons" for options.
 
The visual editor ("'''Edit'''" tab upper right) has a relatively simple equation editor that can be accessed by '''Insert->More->Math Formula'''. However, more complex equations such as those involving matrix algebra will be more successfully marked up using tools such as MS Word or LyX, and copied/pasted.
 
= <nowiki><Math></math></nowiki> tags =
The equation markup in LaTex must appear in between the <nowiki><Math></nowiki> and <nowiki></math></nowiki> tags in the Wikitext markup source accessed by the '''Edit source''' tab in the upper right of the page.  For example,
<center>
<center>
<math>
<math>
R_W = \frac{W_t - W_B}{A_t}\times200 + W_B
R_W = \frac{W_t - W_B}{A_t}\times 200 + W_B
</math>
</math>
</center>
</center>
was rendered with,
was rendered with,  
<pre>
<pre>
<math>
<math>
R_W = \frac{W_t - W_B}{A_t}\times200 + W_B
R_W = \frac{W_t - W_B}{A_t}\times 200 + W_B
</math>
</math>
</pre>
</pre>
==Inline equations==
==Inline math==
Equations can be rendered in a line of text simply by beginning the part of the sentence with the equation with <nowiki><math></nowiki> and ending the equation part with <nowiki></math></nowiki>.  For example,  
Equations can be rendered in a line of text simply by beginning the part of the sentence with the equation with <nowiki><math></nowiki> and ending the equation part with <nowiki></math></nowiki>.  For example, <blockquote>Let <math>A_t</math> be the age at weighing in days; let <math>W_t</math> be the weight in kilograms; let <math>W_B</math> be the recorded birth weight or a breed standard, </blockquote>was rendered by adding the following to the page in the '''Edit source''' editor,
*let <math>A_t</math> be the age at weighing in days
*let <math>W_t</math> be the weight in kilograms
*let <math>W_B</math> be the recorded birth weight or a breed standard,  
was rendered by,
<pre>
<pre>
*let <math>A_t</math> be the age at weighing in days
Let <math>A_t</math> be the age at weighing in days; let <math>W_t</math> be the weight in kilograms; <math>W_B</math> be the recorded birth weight or a breed standard,
*let <math>W_t</math> be the weight in kilograms
</pre>This type of simple inline math can be easily input using the '''Insert->More->Math formula''' in the visual editor ('''Edit''' in the upper right of the page).
*let <math>W_B</math> be the recorded birth weight or a breed standard,
 
</pre>
=Labeling equations=
=Labeling equations=
Equations should be numbered and labeled in italics.<br>
Equations should be numbered and labeled in italics. A stand-alone description of the equation should be given.<br>


''Equation 1. Age adjust weaning weight.''
''Equation 1. Age-adjusted weaning weight.''
<center>
<center>
<math>
<math>
R_W = \frac{W_t - W_B}{A_t}\times200 + W_B
R_W = \frac{W_t - W_B}{A_t}\times 200 + W_B
</math>
</math>
</center>
</center>
== Equation references ==
A reference must be given for the sources of any equations using the <nowiki><ref></ref></nowiki> tag.

Latest revision as of 19:08, 21 December 2024

Equations in Mediawiki are rendered using the very powerful markup language in LaTex. Standardizing on LaTex provides for a uniformly supported protocol by many software platforms. This facilitates the collaboration between multiple authors of the same page by eliminating translation errors and providing consistent procedures with minimal impact on markup software choices between authors.

Many modern equation editors, including MS Word, will convert equations to LaTex, and this conversion can be copied/pasted into the wiki page using the source editor (Edit source tab upper right). Here is a link to a video showing how to convert equations in MS Word to LaTex.

Alternatively, authors can create LaTeX equation markup in the free LaTex editor LyX. The equation markup can then be copied/pasted into a wiki page using the source editor (Edit source tab upper right).

For LibreOffice users there are LaTex "addons". Search for "LibreOffice LaTex addons" for options.

The visual editor ("Edit" tab upper right) has a relatively simple equation editor that can be accessed by Insert->More->Math Formula. However, more complex equations such as those involving matrix algebra will be more successfully marked up using tools such as MS Word or LyX, and copied/pasted.

<Math></math> tags

The equation markup in LaTex must appear in between the <Math> and </math> tags in the Wikitext markup source accessed by the Edit source tab in the upper right of the page. For example,

was rendered with,

<math>
R_W = \frac{W_t - W_B}{A_t}\times 200 + W_B
</math>

Inline math

Equations can be rendered in a line of text simply by beginning the part of the sentence with the equation with <math> and ending the equation part with </math>. For example,

Let be the age at weighing in days; let be the weight in kilograms; let be the recorded birth weight or a breed standard,

was rendered by adding the following to the page in the Edit source editor,

Let <math>A_t</math> be the age at weighing in days; let <math>W_t</math> be the weight in kilograms; <math>W_B</math> be the recorded birth weight or a breed standard,

This type of simple inline math can be easily input using the Insert->More->Math formula in the visual editor (Edit in the upper right of the page).

Labeling equations

Equations should be numbered and labeled in italics. A stand-alone description of the equation should be given.

Equation 1. Age-adjusted weaning weight.

Equation references

A reference must be given for the sources of any equations using the <ref></ref> tag.