## e.mccormick Group Title Basic LaTeX Tutorial. NOTE: Replies will be deleted to keep the load speed fast. 9 months ago 9 months ago

• This Question is Open
1. e.mccormick

NOTE: Replies will be deleted to keep the load speed fast. While there are some wonderful, detailed tutorials here, the goal of this one is to be a fast loading, simple set of the basics, and more an explanation of the principals and rage of things you can do. For more specifics, there are going to be links in the last post. That will make it easier to edit links by replacing that post if needed. First, $$\LaTeX$$ is a markup language designed to make $$\TeX$$ easy to use so that you can prepare documents that need precision in formatting. This was all designed to make book formatting cheap and easy in the early days of computers and has been wildly popular with the academic parts of the sciences and mathematics. As such, it has become a standard for presenting math on the web. However, just because it is popular for doing math does not mean that it all it can do! In fact, many people use it on this site for the more decorative aspects it offers. Now for learning a little $$\LaTeX$$. I am typing in $$\LaTeX$$ to get that formatted text. There is an $$\textbf{easy}$$ way to learn. $$\color{red}{\text{Copy!}}$$ To see any of the commands, right click what you want to know about, go to Show Math As, and select Tex Commands. A window will pop up that lets you see the code that was used to make something. You can take that and reuse it. Inputting commands: Inline uses $$ to start a set of commands and $$ to end it. Inline means it is in the same line, and reformatted to be smaller. Block uses $ to start the block of commands and $ to end it. Blocks are automatically offset from your normal typing. The equation editor uses block mode. Here are two examples. They will use the same line, but one with inline and one with block. Give me $$\frac{1}{2}$$ of it. Give me $\frac{1}{2}$ of it. The code I used inside both of these is \frac{1}{2}. The $$\frac{1}{2}$$ is automatically sized to text size and the $\frac{1}{2}$ to display size. If you need a display size fraction inside inline, you must use $$\dfrac{1}{2}$$ . For a text sized fraction in a block you must use $\tfrac{1}{2}$ Whole we are on the topic of size, there is also \tiny, \scriptsize, \small, \normalsize, \large, \Large, \LARGE, \huge, and \Huge. These cover from $$\tiny\text{very, very small}$$ to $$\Huge\text{pretty big!}$$ You saw me do a fraction. You can also do more complex math, like fractions inside of fractions, integrals, and the like. The math editor is a good place to see many of those, but here is are some examples: $$f(x)=\begin{cases} x^2 & \text{ if } x<0\\ \frac{1}{x}& \text{ if } x= 0 \\ -x^{2}& \text{ if } x >0 \end{cases}$$ $\LARGE\int\limits_a^bf(x)\text{dx}=\lim_{i\rightarrow\infty}\sum_{i=1}^n(f(c_a)\Delta x_i$ Another popular topic is $$\color{red}{c}\color{blue}{o}\color{green}{l}\color{orange}{o}\color{cyan}{r}$$. Many of the basic colors have names, but the hex codes for colors also work. The basic code is this: $$\color{green}{stuff to be in green}$$ Now, if I just try out this, you will see a problem with the text: $$\color{green}{stuff to be in green}$$ The spaces are gone! The system used here is designed for math and does math spacing. That means everything is jammed together unless you use one of the space markers. $$\color{green}{stuff~ to\, be\: in\; green}$$ Right click that to see the code I used to add some spaces. Note the different widths made by different characters. You may also notice it did some odd, cursive font. that is also a math effect to the fonts. For more traditional fonts you can use the old commends of \sf, \tt, \it, \bf, and \rm. Note that in desktop use, these are deprecated. But they work nice here. $$\sf SansSerif$$ $$\tt TrueType$$ $$\it Italics$$ $$\bf BoldFace$$ $$\rm Roman$$ OR: you can use \text{} to deal with both issues at once. $$\text{This is some text}$$ $$\color{green}{\text{stuff to be in green}}$$ $\Large\text{And that is the basics...}$ Next is a repost of some note I made on use of $$\LaTeX$$ in a more traditional way, and then finally will be the links post. Remember, this posting is only meant to be the basics! There is a ton more that can be done.

2. e.mccormick

Using $$\LaTeX$$ in a class can be a great way to do papers in physics, chemistry, math, and so on. However, it can take a bit of work to use it! Here are a few options for people: The Codecogs Solution: Use your favorite word processor to do most of the work. Then, go to this web site for equations: http://www.codecogs.com/latex/eqneditor.php Codecogs' equation editor lets you produce a number of graphics formats, sizes, and so on. It also has an interactive editor so if you do not know a $$\LaTeX$$ code it helps you. Once you have the image made, save it to your computer, name it something you will remember, and then use the insert images ability of your program to add it to your document. Presto! You are done and have a nice looking document to hand in for grading. But what if you want to work with $$\LaTeX$$ completely? Here is an example: On this page: http://myweb.lmu.edu/dondi/fall2012/cmsi370/ Right under Assignment 1030: it has LaTeX paper template: LaTeX source PDF result included image That LaTeX source file and the image are used to make the PDF result. If you look at just the PDF file, it shows what $$\LaTeX$$was really meant for. And with a real editor you can get TikZ and PGF support for doing graphics! Here are a ton of detailed examples in a wide range of fields: http://www.texample.net/tikz/examples/ So what if you want to try doing this? Here are a couple options for that case... The Online Editor Solution: There are a number of web sites that let you edit $$\LaTeX$$ without installing anything. https://www.writelatex.com/ http://www.scribtex.com/ https://www.sharelatex.com/ I have used writelatex.com to test it and it worked very well. It supports many of the advanced features. Here is their sample page: https://www.writelatex.com/223488sqhnzt The down side of the free services are two fold. First, they generally only allow security when you use their fee based services. Second, they may not support all the features and formats you want to use. In those cases, it may be better to install your own, free copy of $$\LaTeX$$! For LATEX I use the following: There are very few engines. They are open source projects and you just need the right one for your operating system. MiKTEX is the engine that makes my $$\LaTeX$$ work on Windows. http://miktex.org/ It comes with an editor and to be honest you could do things with a text editor. However, I have found an editor I like a lot better: Texmaker. It has lot of features to make the editing and production of a PDF for printing or electronic distribution a lot easier. http://www.xm1math.net/texmaker/

3. e.mccormick

Links! thomaster's Legendary LaTeX Turorial! that has more detail on using it on OpenStudy. http://openstudy.com/study#/updates/51fbcbade4b0cc46c14a461d Some math examples: http://www.artofproblemsolving.com/Wiki/index.php/LaTeX:Commands Mathcat's list of $$\LaTeX$$ commands: http://www.onemathematicalcat.org/MathJaxDocumentation/TeXSyntax.htm The Mathjax list of TeX command they support, but only some of these are enabled here: http://docs.mathjax.org/en/latest/tex.html And remember, replies to this post will be deleted to keep the speed high. Instead of testing things here, make your own question. Then you can have this and your question open on separate pages or tabs and will easily be able to go back and forth to test things without slowing this post down for others.

4. e.mccormick

And ignore the typos! There are a few. I will eventually fix them. I have already fixed some but won't repost until I need the bump counter to be reset.