<id>https://artofproblemsolving.com/wiki/index.php?title=LaTeX:LaTeX_on_AoPS&diff=51675</id>
<title>LaTeX:LaTeX on AoPS</title>
<link rel="alternate" type="text/html" href="https://artofproblemsolving.com/wiki/index.php?title=LaTeX:LaTeX_on_AoPS&diff=51675"/>
<updated>2013-03-07T18:12:24Z</updated>
<summary type="html"><p>MeFigaYoma: /* LaTeX on the AoPSWiki and the AoPS Community */</p>
<hr />
<div>{{Latex}}<br />
<br />
This article explains how to use LaTeX in the AoPSWiki, the AoPS Community, and the AoPS Classroom.<br />
<br />
<br />
----<br />
== LaTeX on the AoPSWiki and the AoPS Community ==<br />
<br />
LaTeX uses a special math mode to display mathematics. To place something written in LaTeX in '''math mode''', use <nowiki>$</nowiki> signs to enclose the math you want to display. For example, suppose you type the following in a Community post or in the AoPSWiki:<br />
<br />
<pre><nowiki><br />
The solution to $\sqrt{x} = 5$ is $x=25$.<br />
</nowiki></pre><br />
<br />
The resulting post will read: <br />
<br />
The solution to <math>\sqrt{x} = 5</math> is <math>x=25</math>.<br />
<br />
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:<br />
<pre><nowiki><br />
The solution to \[\sqrt{x} = 5\] is \[x=25.\]<br />
</nowiki></pre><br />
The output of this is:<br />
<br />
The solution to <cmath>\sqrt{x} = 5</cmath> is <cmath>x=25.</cmath><br />
<br />
That's all there is to invoking LaTeX on the AoPS site. Of course, you'll want to do more than square roots! You can read through the [[LaTeX:Symbols|Symbols]] and [[LaTeX:Commands|Commands]] pages to learn how to render other symbols with LaTeX.<br />
<br />
== LaTeX in the AoPS Classroom ==<br />
<br />
LaTeX in the Classroom works almost exactly the same way it works in the AoPSWiki and Community (described above), with one small difference.<br />
To render a post in the AoPS Classroom with LaTeX, all you have to do is start your post with a semicolon. So, you'd write<br />
<br />
<pre><nowiki><br />
;The solution to $\sqrt{x} = 5$ is $x=25$.<br />
</nowiki></pre><br />
<br />
The resulting output will be:<br />
<br />
[[Image:Mathsamp1.gif]]<br />
<br />
Notice that you only place the mathematics portion of the post in dollar signs. You do not write <nowiki>";$The solution to $\sqrt{x} = 5$ is x=25.$"</nowiki> The result of that will be <math>The solution to </math>\sqrt{x} = 5<math> is x=25.</math> <br />
<br />
If you leave out the leading semicolon, your post will not be rendered as LaTeX. So, the post "<nowiki>The solution to $\sqrt{x} = 5$ is $x=25$</nowiki>" would be rendered exactly as-is: "<nowiki>The solution to $\sqrt{x} = 5$ is $x=25$</nowiki>".<br />
<br />
'''Please note''': You should only use LaTeX in the classroom if you are rendering mathematics. Do not use LaTeX to make plain text posts. For example, you should not write ";Wow, you're a great teacher" since you don't need to render anything in that sentence with LaTeX. Instead, you should just write, "Wow, you're a great teacher." You don't need LaTeX to tell your teacher how awesome the class is.</div></summary>