Outils pour utilisateurs

Outils du site


issue175:latex

Ceci est une ancienne révision du document !


Open Gummi and we can re-use the “code” from part 6, why waste? The package we will be using is amsmath, which stands for American Maths Standards or something, I am just using and don’t really care about the details, don’t judge. Add it, I am not going to tell you how or spoonfeed you, the great thing about Gummi is that if you make a boo-boo, the PDF preview on the right will go dark. Unlike TexStudio, it does not auto-complete, so you get to learn what to type. This can be a positive and a negative, depending on your point of view. If we need to add something simple in the line we are writing in, simply enclose your formula in dollar signs, $a=b+c$ , otherwise we use math mode. (https://www1.cmc.edu/pages/faculty/aaksoy/latex/latexthree.html). Just like sections, we simply add one. See if you can make head or tails from this “code”:

See? The more we practice, the easier it becomes! Inside the equation section, please please replace the contents with: \sum_{i=1}^{D}(x_i-y_i)^2 See what you got. We use the escape character before the summation, ‘sum’, or else LaTeX treats it as a word. (In the screenshots, you may see mine was slightly different, but I want to keep it simple, so we can get it and move along). You will notice that i=1 is wrapped in curly braces. Rule of thumb, always wrap equations, or it will be treated as plain text. Go on, take them out and see what happens. We can also reference our equations like we did in text, just add a label before your formula and you can reference it from anywhere in the text. Spacing is important when working with formulas, etc. See my mistake, pressing enter after the last line. This (shown above) will get no output in Gummi.

And removing the new line makes it all work. I will not be covering all the ways to do mathematics in LaTeX, as this is for beginners only – to understand common mistakes and to have an idea of what LaTeX is capable of. Here is a link so you can see more: https://www1.cmc.edu/pages/faculty/aaksoy/latex/latexthree.html That should be short and sweet, with just enough information to get you going without being boring. Want more? Next issue, my good man! As always, mistakes happen, help us help you: misc@fullcirclemagazine.org

issue175/latex.1638294672.txt.gz · Dernière modification : 2021/11/30 18:51 de d52fr