How to Type Math


  • ADMIN M0★ M1 M5

    Latex code looks like a bunch of unintelligible gibberish when you look at it, but over time, you might grow to love it! Latex allows you to write math seamlessly into your English text without leaving your keyboard! Plus, it's \(\textcolor{purple}{\text{ pretty}}.\) And it's powerful. Learn to write Latex, and you'll be a happier math person!


    How to get into math mode:

    Typing the double backslash "\\", typing the double dollar-sign " $$ " and clicking the arrow-X in the menu above all put you into math mode. Just remember that whichever you choose to open your math with should be the same thing that you use to close your math with.

    The "%" math mode

    Clicking on the "%" icon above the post editor will automatically give you the math mode wrapper of "'''"s.

    forum-math-mode.png
    The wrapper comes with a very fancy sophisticated code example, highlighted in \(\textcolor{blue}{\text{ blue }}.\) Go ahead and delete this, because you are about to put in your own fancy sophisticated code. 😉

    forum-apostrophe-math-mode-preset-code.png

    Type your code directly inside this wrapper. Please keep in mind that to make a new line, typing "enter" won't automatically do it for you. You will have to type two backslashes at the end of each line.

    3 \times 4 \\
    x \times y \times y \\
    0.5 \times 1.\overline{111} 
    

    forum-apostrophe-math-mode.png

    The backslash method

    I personally like to use the backslashes because I find it easier to keep my hands on the keyboard without having to go for the mouse. With this method, you must type in the "wrapper" yourself. This is two backslashes, followed by an open parentheses / close parentheses. If you use curvy brackets, you get inline Latex that can sit inside your sentence.

    There are random math \\(x^2\\) symbols \\(2^2\\) appearing \\(\frac{1}{2}\\) in this \\(x^y\\) sentence. 
    

    forum-inline-latex.png

    If you use square brackets, you get Latex on its own line.

    There are random math \[x^2\] symbols \[2^2\] appearing \[frac{1}{2}\] in this \[x^y\] sentence. 
    

    forum-square-brackets.png

    The Dollar-Sign Approach

    Typing two dollar signs will also open and close your Latex code. However, it gives e x t r a h u g e spacing, and will set the math on its own line.

    3 \times 4 
    x \times 4 \times y
    0.5 \times 1.\overline{1111} 
    

    forum-dollar-sign-math-mode.png


    Latex Examples

    3 \times 4 
    x \times 4 \times y 
    0.5 \times 1.\overline{1111}  
    

    With wrapper:
    screenshot-forum-times2.png

    3 + 2 = 5 
    3 + 2 \neq 4 
    3 + 2 > 5 
    3 + 2 \geq 4 
    2 + 2 \leq 5 
    
    2 + 2 = 4 
    3 + 2 > 4 
    

    With wrapper:
    Screenshot-forum-inequalities2.png

    When typing fractions, it helps to first type the empty braces, like this:

    \frac{}{}
    

    before you enter the values into the braces.

    \frac{123456}{7890}
    

    This way, you're less likely to make a typo!

     \frac{1}{2} 
     \frac{1}{2 + x} 
     \frac{\frac{1}{2}}{x} 
     \frac{1}{2} \times \frac{x}{3} 
     \frac{1}{2} = x 
    

    With wrapper:
    screenshot-forum-fractions2.png

    Superscripts, subscripts and degree notation. Remember that if the superscript or subscript is more than one digit, you need braces { } around it.

    x^2 
    x^{30}
    360^{\circ} 
    x_1, x_2, x_3, ldots 
    x_{20} 
    
    

    With wrapper:
    screenshot-forum-superscripts2.png

    Geometric symbols:

     \angle ABC 
     \bigtriangleup ABC 
     \overline{AB} = 3 
     x \approx 3 
     \angle A = 30^{\circ} 
     \frac{ \overline{AB}}{\overline{BC}} = 2 
    

    With wrapper:
    screenshot-forum-geometry2.png

    Aligned equation blocks:

    \begin{aligned}
    3x + 2 &= 7 \\
    6x + 4 &= 14 \\
    x &= \frac{5}{3} 
    \end{aligned}
    

    With wrapper:
    screenshot-forum-aligned-equations2.png


  • ADMIN M0★ M1 M5

    This post is deleted!

  • ADMIN M0★ M1 M5

    When you want to type a $ or % symbol in Latex, you must put two backslashes before it:

    \\$ 40
    50 \\% 
    \\# 5 
    

    forum-math-guide-percents.png


  • ADMIN M0★ M1 M5

    Additionally, to make colored text, you can use the "color{colorname}" command within math mode. Everything you enter until the end of the math mode will render in the color name entered as colorname.

    ````math
    \color{red} \text{Latex does not regard spaces:} 1 2 3 4 5 6 
    \color{blue} Text written without the \text{ \text{command} } formatting looks squished like this 
    \color{green} \text{ A green equation: } \frac{a + b}{c} + 2.5 - x^2 
    \color{purple} \text{ Purple text using the command 'text'} \\) 
    
    

    forum-math-guide-colored-text1.png

    forum-math-guide-colored-text2.png


  • M5

    \( \color{gray}\text{This post is deleted!} \)
    Close enough.


  • M0 M2 M3

    \( \color{red} \text{This} \) \( \color{orange} \text{is} \) \( \color{yellow} \text{one} \) \( \color{lightgreen} \text{colour} \) \( \color{darkgreen} \text{changing} \) \( \color{cyan} \text{post} \) \( \color{blue} \text{(inspired} \) \( \color{purple} \text{by} \) \( \color{pink} \text{Bob} \) \( \color{gray} \text{the} \) \( \color{black} \text{cat} \) 🐱 \()\)
    That took some work.


  • M2 M3 M4

    @RZ923 woah, nice job!!! lol


  • M0 M2 M3

    @sqwishy Thanks 😊


  • M0 M2 M3

    @debbie How do you type a square root?


  • ADMIN M0★ M1 M5

    Thanks for asking! I forgot to put this in earlier. 🙂

    forum-how-to-type-math-sqrt.png


  • M2 M3 M4 M5

    @debbie Are there other ways to type math like clicking on certain symbols to add them to your post? A toolbar that would allow you to highlight and change font size, colour, and boldness like the one in google docs would really help. I already know a few programming languages but it would still take quite some time and effort to learn latex especially for people who don't code. I doubt that lots of people would like to learn it.


  • ADMIN M0★ M1 M5

    @CoherentMango That's a good question! At the moment I don't know of any other way besides typing in the commands manually. However, you may find that as you start to memorize commands, this ends up being faster. You won't have to take your hands off your keyboard! 🙂


  • M2 M3 M4 M5

    @debbie I find the commands much easier now, but I still have trouble trying to use many different commands together. Anyways, I'll probably get used to them in a while.


  • ADMIN M0★ M1 M5

    @CoherentMango In the old days of Daily Challenge, we didn't have the forum, and instead used a Discussions feature on the course website which didn't support Latex. We had to make .png images of Latex and paste them in. It was quite a bit more onerous. So I really love the built-in Latex feature of this forum! 🙂


  • M2 M3 M4 M5

    @debbie Haha that must have been really hard to do. I'm thankful that at least there was a forum when I joined 🙂


  • M0★ M1★ M2 M3 M4 M5 M6

    Latex seems really hard/confusing/complicated...


  • ADMIN M0★ M1 M5

    @divinedolphin Don't worry, it seems hard at first, but you'll soon learn enough to write little bits here and there. And making a little bit of code is really rewarding, however small the code may be! 🙂

    It might be easier to click on the "%" button above. Then, you don't need to type the backslash and parentheses.

    forum-math-mode.png

    You can type directly some code like this, without worrying about the "wrapper" of the \ \ ( and \ \)

    x^2 + x + 4 = 5
    

    forum-math-mode-quotes.png

    🙂


  • M0 M2 M3

    @debbie When you press the % symbol, it does this:

    $$G_{\mu \nu }+\Lambda g_{\mu \nu }={8\pi G \over c^{4}}T_{\mu \nu } $$

    ???


  • ADMIN M0★ M1 M5

    @RZ923 Yes, that's an example text that they always put in. Just delete that and type your own code. 🙂


  • M0 M2 M3

    @debbie thanks 🙂


Log in to reply