<Typing Math in Doenet/>

A brief tutorial on \(\LaTeX\)

Learning \(\LaTeX\)

\(\LaTeX\) is a free software system used for formatting math and text.

1.

2.

Overleaf has comprehensive documentation for writing documents in \(\LaTeX\) proper.

3.

Dr. Trefor Bazett has excellent tutorials for \(\LaTeX\) on YouTube.

# INTRO
<p>
  Any math that is inline, or part of a paragraph, can be put inside <m></m>.
</p>

<p>
  Example: <m>y=3x-1</m>. 
</p> 
# INLINE MATH
<p>
  Example: <m>y=3x-1</m>. 
</p> 
# INLINE MATH
<p>
  Add some text before the equation.
</p>

<p>
  Example: The slope of the line, <m>y=2x+4</m>, is <m>2</m>. 
</p> 
# TEXT
<p>
  Example: The slope of the line, <m>y=2x+4</m>, is <m>2</m>. 
</p> 
# TEXT
<p>
  New paragraphs can be written within <p></p>.
</p>

<p>
  Example:
</p>
  
<p>The first equation is <m>y=2x+4</m>.</p>
<p>The second equation is <m>y=3x-5</m>.</p>
# PARAGRAPH
<p>
  Example:
</p>

<p>The first equation is <m>y=2x+4</m>.</p>
<p>The second equation is <m>y=3x-5</m>.</p>
# PARAGRAPH
<p>
  We can use <m>\frac{}{}</m> to write fractions with the numerator in the first {} and the denominator in the second.
</p>

<p>
  Example: The first equation is <m>y=\frac{2}{5}x+4</m>.
</p>
# FRACTIONS
<p>
  Example: The first equation is <m>y=\frac{2}{5}x+4</m>.
</p>
# FRACTIONS
<p>
  We can distinguish between equations by using subscripts like <m>y_1</m> and <m>y_2</m>.
</p> 

<p>
  We do this using the underscore symbol (shift and -).
</p>

<p>
  Example:
</p>
  
<p>The first equation is <m>y_1=2x+4</m>.</p>
<p>The second equation is <m>y_2=3x-5</m>.</p>
# SUBSCRIPTS
<p>
  Example:
</p>
  
<p>The first equation is <m>y_1=2x+4</m>.</p>
<p>The second equation is <m>y_2=3x-5</m>.</p>
# SUBSCRIPTS
<p>
  We can write radicals by using <m>\sqrt{x}</m> to write square roots and <m>\sqrt[n]{x}</m> to write n^{th} roots.
</p> 

<p>
  We do this using the underscore symbol (shift and -).
</p>

<p>
  Example: The third equation is <m>y_3=\sqrt{x}+\sqrt[3]{4}</m>.
</p>
  
# RADICALS
<p>
  Example: The third equation is <m>y_3=\sqrt{x}+\sqrt[3]{4}</m>.
</p>
# RADICALS
<p>
  Sometimes, we may wish to write equations or expressions on their own, centered on the page.
</p> 

<p>
  We do this by writing math between <me></me>, instead of <m></m>.
</p>

<p>
  Example: <me>y_1=\frac{2}{5}x+4</me>.
</p>
  
# DISPLAY MATH
<p>
  Example: <me>y_1=\frac{2}{5}x+4</me>.
</p>
# RADICALS
<p>
  Try to write the quadratic formula in two lines. Include the formula inline with the first setence and show it in display style in the second.
</p>

<hint>
</hint>
# PUZZLE
<p>
  Try to write the quadratic formula in two lines. Include the formula inline with the first setence and show it in display style in the second.
</p>

<hint>
	Try entering: 
  <p>
  	The quadratic formula is <m>x=\frac{-b \pm \sqrt{b^2-4 a c}}{2 a}</m>.
  </p>
  <p>
    The quadratic formula is <me>x=\frac{-b \pm \sqrt{b^2-4 a c}}{2 a}.</me>
  </p>
</hint>
# PUZZLE
# COMMON COMMANDS

(Tutorial) Typing Math in Doenet

By Anurag Katyal

(Tutorial) Typing Math in Doenet

  • 127