Difference between revisions of "LaTeX:LaTeX on AoPS"

(LaTeX on the AoPSWiki and the AoPS Community)
(LaTeX on the AoPSWiki and the AoPS Community)
Line 11: Line 11:
 
</nowiki></pre>
 
</nowiki></pre>
  
The resulting post will read  
+
The resulting post will read:
  
<pre><wiki>The solution to <math>\sqrt{x} = 5</math> is <math>x=25</math>.</wiki></pre>
+
The solution to <math>\sqrt{x} = 5</math> is <math>x=25</math>.
 +
 
 +
As we saw above, when using <nowiki>$</nowiki>math stuff here<nowiki>$</nowiki> to typeset math, the resulting math expression appears right in the text at the location of the <nowiki>$</nowiki>...<nowiki>$</nowiki>. Sometimes we want to break some of the math out of the text and give it its own special line. To do so, we use <nowiki>\[</nowiki>math stuff here<nowiki>\]</nowiki> or <nowiki>$$math stuff here$$</nowiki> to put the math text in display math mode:
 +
<pre><nowiki>
 +
The solution to \[\sqrt{x} = 5\] is \[x=25.\]
 +
</nowiki></pre>
 +
The output of this is:
 +
 
 +
The solution to <cmath>\sqrt{x} = 5</cmath> is <cmath>x=25.</cmath>

Revision as of 13:41, 16 April 2010

LaTeX
About - Getting Started - Diagrams - Symbols - Downloads - Basics - Math - Examples - Pictures - Layout - Commands - Packages - Help

This article explains how to use LaTeX in the AoPSWiki, the AoPS Community, and the AoPS Classroom.

LaTeX on the AoPSWiki and the AoPS Community

LaTeX uses a special math mode to display mathematics. To place something written in TeX in math mode, use $ signs to enclose the math you want to display. For example, suppose you type the following in a Community post or in the AoPSWiki:

The solution to $\sqrt{x} = 5$ is $x=25$.

The resulting post will read:

The solution to $\sqrt{x} = 5$ is $x=25$.

As we saw above, when using $math stuff here$ to typeset math, the resulting math expression appears right in the text at the location of the $...$. Sometimes we want to break some of the math out of the text and give it its own special line. To do so, we use \[math stuff here\] or $$math stuff here$$ to put the math text in display math mode:

The solution to \[\sqrt{x} = 5\] is \[x=25.\]

The output of this is:

The solution to \[\sqrt{x} = 5\] is \[x=25.\]