## AccessDenied 3 years ago Note: This is NOT a Question! I am just joining the cool new trend of having a tutorial for something, and it gives me a good excuse to make a question. This Tutorial is for LaTeX formatting (mainly without Equation Editor). There are three sections in total, and I'll post them individually, along with the introduction for a total of four posts. Enjoy!

1. AccessDenied

$$\color{gold}{\star \ \star} \quad \large{ \mathbb{\text{Doing That } \LaTeX \text{Thing}} } % Because knowing is half the battle! % % I hope you enjoy the tutorial as much as I did writing it. It's been fun! % % - Written by: AccessDenied, master of using an excessive amount of work in things %$$ LaTeX is a very powerful and versatile tool for writing Mathematics. The Equation Editor gives you only a small glimpse into the true power of the language. My goal is to give you the power to write this LaTeX on your own and tap into that potential! Prepare to delve into the wonderful world of LaTeX! $$\color{orange}{\cdot} \quad \small{ \text{Experience will best supplement this tutorial. Try things out!} }$$

2. AccessDenied

$$\color{goldenrod}{\star} \quad \mathbb{\LaTeX \text{ Syntax; Formatting, Commands, and Environments}}$$ $$\color{orange}{\cdot} \quad \text{Adding LaTeX to your Posts}$$ Creating fine posts that will coexist with the LaTeX content requires that you know how to declare it in the posts correctly and effectively. There are two ways to declare it: block content and in-line content (sometimes referred to as "displayed" and "text," respectively). $$\cdot \quad$$ Block content is inserted into the post as its own stand-alone element. The LaTeX is put on its own line. This type of LaTeX is applied by wrapping the code between the delimiters: $$\backslash [ \cdots \backslash ]$$. $$\cdot \quad$$ In-line content is inserted into the post with respect to its surroundings. This allows LaTeX to be inserted directly into paragraph explanations. This type is applied by using the delimiters: $$\backslash ( \cdots \backslash )$$. Which method you use is largely based on your purposes. Just remember that in-line is treated a tad differently from block content in that, it is made smaller and more compact than the block content by nature. This often affects placement of things like the stuff usually under the limit $$\lim$$ where the in-line method places it to the side, as so: $$\lim_{x \to 4}$$. This is fixed using a command (If you're interested, it is called $$\textbf{\limits}$$ -- I won't go over it here). Another note (it is a minor point), in-line text will not wrap around the text-space unless it is preceded by something. Block content will always wrap around, however. One of the staples for LaTeX is the backslash $$\backslash$$ symbol. It comes in on the declaration and the commands. It is also used to start a new line (double-backslash). That should help conserving the need for many individual LaTeX spaces. Okay, we got that out of the way! So, what can we do? You can type some basic equations in the LaTeX for the pretty, italicized font, but you'll quickly notice the limitations -- no spaces and no fancy font things... where is the fancy?! Well, we're getting there.

3. AccessDenied

$$\color{orange}{\cdot} \quad \text{Commands -- Adding in that functionality}$$ Commands are the masters of the functionality you really want in the posts. They're very simple, too. The basic syntax of a command is as follows: $$\quad \boxed{ \quad \color{green}{\star} \quad \backslash \underline {\textit{name}} \{ \textit{argument}_1 \} \{ \textit{argument}_2 \} \ ... \qquad }$$ It is most common for the command to have from zero to two arguments. These arguments are usually either switches for how the command works or the target of the command. There are many, many commands for LaTeX, more than I can even discuss honestly. We'll touch on the important / awesome ones, though. I leave it to you to search for the rest as you please. $$% Just AccessDenied adding some random comments to make sure you can't reuse it! %$$ The first commands we should learn is for inserting text into the LaTeX correctly. You could try writing a message like "I love LaTeX!" directly, but it doesn't turn out right, as I shall present: $$\quad \boxed{ \quad \color{green}{\Rightarrow} \quad \text{I love LaTeX!} \qquad }$$ $$\quad \boxed{ \quad \color{lime}{\Leftarrow} \quad I love LaTeX! \qquad }$$ I'll use this kind of representation a lot for this tutorial. Just internalize that this is "input =>" "output <=" and you'll be good. On a more relevant note, however, we can see there is a serious lack of spacing. It's nowhere near as pretty as just typing it out... well, let's try out a command. $$\textbf{\text} \{ ... \}$$ Well, it sounds aptly named. Let's try it out. $$\quad \boxed{ \quad \color{green}{\Rightarrow} \quad \text{\text{I love LaTeX!}} \qquad }$$ $$\quad \boxed{ \quad \color{lime}{\Leftarrow} \quad \text{I love LaTeX!} \qquad }$$ We have our spaces in and everything! Just for novelty, let's also use the \LaTeX command, which adds a nice label for the LaTeX name. $$\quad \boxed{ \quad \color{green}{\Rightarrow} \quad \text{\text{I love } \LaTeX !} \qquad }$$ $$\quad \boxed{ \quad \color{lime}{\Leftarrow} \quad \text{I love } \LaTeX !} \qquad$$ Notice that some commands are written with specific capitalized letters. Command names are case-sensitive, so be wary that some functions will not work without addressing that capital letter. Also notice that we have an extra space after "love." That space carries even outside of the command. Just keep those things in mind! The text command creates an environment apart from the Math space, which omits the spaces. However, spacing is still possible even without the text command. In fact, there are a lot of commands for spacing in the Math space. I'll just list them here. $\quad \begin{array}{|c|c|} \hline \textbf{Command} & \textbf{Effect} \\ \hline \backslash & \text{ Single space equivalent } \\ \backslash quad & \text{ Creates large horizontal space } \\ \backslash qquad & \text{ Two \quad } \\ \backslash , & \text{ Equals 3/18 a \quad } \\ \backslash : & \text{ Equals 4/18 a \quad } \\ \backslash ; & \text{ Equals 5/18 a \quad } \\ \backslash ! & \text{ Equals -3/18 a \quad } \\ \hline \end{array}$ What? An antispace!? Well, I guess antispaces may have uses somewhere. I never particularly found one, though. I guess if you wanted to create a 1/18 a \quad space or even -36/18... oh nevermind, not important! There are also the Mathematical functions. You could type them normally, but they're usually better oriented with the command. $\quad \begin{array}{|c|c|c|} \hline \text{\frac} & \text{_} & \text{^} \\ \hline \text{\sqrt} & & \\ \hline \text{\sin} & \text{arcsin} & \text{sinh} \\ \hline \text{\log} & \text{\ln} & \text{\exp} \\ \hline \text{\lim} & \text{\int} & \\ \hline \text{\sum} & \text{\prod} & \\ \hline \text{\mod} & \text{\inf} & \text{\sup} \\ \hline \end{array}$ That frac function is probably one of the big secrets of the Equation Editor and LaTeX here. The syntax of the fraction function is \frac{numerator}{denominator}. In addition, the root's index actually is placed into a weird place in square brackets (\sqrt[index] {content}) The majority of the others do come up on Equation Editor, however, and should be familiar if you've played with it before. $$% AccessDenied, adding in some special comments here and there %$$ Lastly, I want to go over some modifying commands. This should wrap up the (useful) commands section. These commands are for changing the size and style of your writing in LaTeX. $\quad \begin{array}{|c|c|} \hline \textbf{Name} & \textbf{Explained} \\ \hline \text{rm} & \mathrm{Roman} \\ \text{it} & \mathit{Italicized} \\ \text{bf} & \mathbf{Bold} \\ \text{frak} & \mathfrak{Fraktur} \\ \text{cal} & \mathcal{Calligraphy} \\ \text{sf} & \mathsf{\text{Sans-serif}} \\ \hline \text{tiny} & \text{Tiny font} \\ \text{scriptsize} & \text{Size of a sub/super script} \\ \text{small} & \text{Small font} \\ \text{normalsize} & \text{Normal} \\ \text{large} & \text{Larger font} \\ \text{Large} & \text{Even larger font} \\ \text{LARGE} & \text{LARGE font} \\ \hline \text{color} & \color{green}{\text{Makes colors!}} \\ \hline \end{array}$ The first set of commands can come in a few forms, although some are exclusive to one form. All of the above forms may be stand-alone. These will not have arguments and apply to all the content in the space. The first three may be used appended to \text (i.e. \textrm{}, \textbf{}) for the same effect as if you used the stand-alone version and then \text{}, and only apply to a target-argument. All of these are also applicable at the end of a function "\math__" and will also apply to a target-argument. The sizes can either be left stand-alone to apply to their respective line, or be fed a target-argument for what should be made bigger. There are even larger sizes, but I find them overkill. The names are intuitive, though. Anything as "huge" as LARGE is absurd. The color command takes a color argument in either hexadecimal or nominal format (\color{#FF0000}{text} and \color{red}{text} do the same thing). As a test of our newfound skills, let's try to make a (considerably fancy) display for the slope-intercept form of lines! We would expect this to fail miserably, typing it directly into LaTeX: $$\quad \boxed{ \quad \color{green}{\Rightarrow} \quad \text{Slope-intercept form: y = mx + b} \qquad }$$ $$\quad \boxed{ \quad \color{lime}{\Leftarrow} \quad Slope-intercept form: y = mx + b \qquad }$$ And it does. Now, let's surround the "Slope-intercept form: " in a \text{} command. $$\quad \boxed{ \quad \color{green}{\Rightarrow} \quad \text{\text{Slope-intercept form: } y = mx + b} \qquad }$$ $$\quad \boxed{ \quad \color{lime}{\Leftarrow} \quad \text{Slope-intercept form: } y = mx + b \qquad }$$ There we go! Finally, we'll make it bold by replacing \text with \textbf and add a \quad between the text and formula for horizontal spacing. $$\quad \boxed{ \quad \color{green}{\Rightarrow} \quad \text{\textbf{Slope-intercept form: } \quad y = mx + b} \qquad }$$ $$\quad \boxed{ \quad \color{lime}{\Leftarrow} \quad \textbf{Slope-intercept form: } \quad y = mx + b \qquad }$$ We're done! Looks a lot nicer than just writing it out, which would take way too little time! Well, let's end this section off and move onto the final part: Environments!

4. AccessDenied

$$\color{orange}{\cdot} \quad \text{Eco-friendly / Safe Environments}$$ So, there's just one more thing to cover, called "environments." The name may sound a little funny, but I assure you that these are anything but lame! Environments allow for special conditions to be applied to the LaTeX space. There are two very useful ones. The first one is called "align." The alignment environment allows for the use of a special operator "&" that forces each line to line up at these points. Such an example for this environment could be a solution to the equation "2x + 3 = 9." \quad \boxed{ \begin{align} \quad & \color{green}{\Rightarrow}\quad \text{\begin{align}} \qquad \\ & \color{green}{\Rightarrow} \quad \ \text{ 2x + 3 &= 9} \qquad \\ & \color{green}{\Rightarrow} \quad \ \text{ 2x &= 6} \qquad \\ & \color{green}{\Rightarrow} \quad \ \text{ x &= 3} \qquad \\ & \color{green}{\Rightarrow} \quad \text{\end{align}} \qquad \end{align} } \quad \boxed{ \begin{align} \quad & \color{lime}{\Leftarrow} \quad & 2x + 3 &= 9 \qquad \\ & \color{lime}{\Leftarrow} & \quad 2x &= 6 \qquad \\ & \color{lime}{\Leftarrow} & \quad x &= 3 \qquad \end{align} } Notice that format. It starts with a "begin{align}" and ends with a "end{align}." This is how the environments will always be declared. It is mostly the same way with the array environment. Instead of "align", you just have the "array." However, the Array environment uses an extra parameter after the "begin{array}" part. We have to declare the alignment of each element in the table. We may optionally specify vertical separation. Also, the environment supports a command called $$\textbf{\hline}$$ to make horizontal lines. The possibilities are: "l", "c", and "r." They stand for "left," "center," and "right alignment, respectively. So, to write the array header for a two-column array with all elements aligned to the right and no vertical bars, we'd use "begin{array}{rr} ... \end{array}." Similarly, if we wanted to add a vertical bar between the first and second item of each row, we'd use "begin{array}{r|r}." I will not create another example of arrays for the sake of making sure the post isn't going to explode. Instead, I want to give you the very plaintext version of my tutorial that includes a few uses of arrays already, so that you may see how it was all written as well! Enjoy! This will conclude the tutorial! I hope you have learned a thing or two on making LaTeX. Just remember that your creativity will drive the effectiveness of what you do with this. Personally, I thought the diagram of a rectangle I made with arrays was fairly nifty. $$% Disclaimer: I love you all very much for checking out the guide %$$ Plaintext Source; Tutorial: http://pastebin.com/raw.php?i=v8GUrZi5

5. zepp

AccessDenied had lot of issues when writing the tutorial.. but he did it! *Applauses* ;D

6. AccessDenied

two revisions and a weird error concerning environments going after LaTeX

7. alexwee123

wall of text didn't read :D

8. Hero

I scanned through it in about a minute. Good info.

9. asnaseer

Great stuff AccessDenied. There is a $$\LaTeX$$ practising group where you could post this as well: http://openstudy.com/study?login#/groups/LaTeX%20Practicing!%20%3A)

10. Hero

They should feature these tutorials on the main page along with creating a special group. All of the tutorials so far have been pretty impressive.

11. AccessDenied

Thanks. I don't think I made any more mistakes after revising again, but I hope if I did, people can catch them. The biggest deal making it was just writing the latex in latex. There was a lot of weird issues that would come up doing that. :P There was also a weird thing that happened when I tried to type the environment declarations after I introduced an independent LaTeX string before it, where the environments would become LaTeX delimiters outside of the regular ones. D:

12. KingGeorge

Very impressive. And very helpful as well. Excellent job.

13. lgbasallote

just when i thought ishy and myin were the best in latex you proved me wrong

14. KingGeorge

15. Hero

I'm nitpicking, but you should have stated at the beginning of your tutorial that right arrow means input, and left arrow means output. @lgbasallote, there are several people who are really good at Latex, not just those you have specified.

16. Hero

Belay my last

17. lgbasallote

fine..hero is good in latex too...i know you wanted to be mentioned :P haha jkjk

18. Hero

I didn't say it was me :P

19. AccessDenied

Oh, its actually just if there are closed LaTeX strings anywhere in the post, \begin{} and \end{} become delimiters for their own LaTeX environments. Yeah, that might be a good idea for the future. Most ideas came as the thing progressed, those arrowed boxes being one of them. :D

20. AccessDenied

What! Fine then. Anytime.

21. lgbasallote

i hope with these the number of ambiguous questions would drop

22. AccessDenied

Notes for improvements in possible future revisions * Fix mis-spacing in title (L 1) * Fix qquad position (L 58) (should precede closing bracket) * Add in the diagram i referred to, (L 130) * . Add introductory note for used notations * C: possibly more elaboration in the environments section * C: Could probably add an example for arrays, it wasn't too bad to post as predicted * C: possibly more explanation of the line break, wasnt emphasized very well. * Add sources or helpful sites to check out: --> http://en.wikibooks.org/wiki/LaTeX/Mathematics (Originally taught me a lot of the possible commands, also found some interesting commands recently) --> http://insti.physics.sunysb.edu/latex-help/ltx-176.html (Text size, usable fonts)

23. AccessDenied

I bump in hopes that somebody does catch any mistakes, would help in making a revision that I don't miss something. D:

24. AccessDenied

I'm assuming that most of the things to tweak have been plucked out now, so I can probably just adjust and post in the other section as mentioned earlier. D:

25. TheViper

$\Huge{\color{red}{\mathbb{LaTex}}}$

26. TheViper

wow!

27. TheViper

I didn't know that I can do like that in the Equation Editor!

28. TheViper

Now, I too love $\Huge{\mathbb{\LaTeX}}$

29. TheViper

So much interesting!!

30. TheViper

I can't tell in words that how interesting is LaTeX!

31. KingGeorge

not to be rude, but it would be nice if you were to take your practicing to the $$\LaTeX$$ practice group at openstudy.com/study#/groups/LaTeX instead of repeatedly posting here.

32. TheViper

$\Huge{\color{red}{\rightarrow \boxed{\mathbb{\text{I loveLaTeX}}}}}$

33. TheViper

$\Huge{\color{orange}{\star \star}{\text{{Very Excellent Job}}}}$

34. TheViper

So useful! Thanx so much!

35. TheViper

I can't thank u in my words! I m so happy to know it! & thanx @ParthKohli for telling me this $\Huge{\color{red}{\star}{Tutorial}}$

36. sami-21

$\Huge \color{blue}{nice}\color{red} {tutorial}$ !

37. AccessDenied

$$\large \frak{\text{Thanks, glad you learned from it!}}$$ :) I should start on a second version, so I can add more / fix some of those things.

38. mathslover

$\huge{\frak{Hey, nice}\mathsf{Tutorial}\mathbb{Great!!!!}}$

39. ghazi

how you guys do it?

40. mathslover

41. TheViper

Wait if u want to know how they do just right click on LaTeX & then click show math as then click text commands @ghazi :)

42. TheViper

like

43. TheViper

After clicking on text commands a box will appear then copy everything in the box & paste in equation editor @ghazi :)

44. TheViper

@ghazi does that helped ??

45. ghazi

@TheViper that was really helpful...thanks dude....i am grateful to this ....i shall make use of it...

46. TheViper

$$\Huge{\color{green}{\ddot{\smile}}}$$

47. TheViper

wait @ghazi :)

48. ghazi

wow !!

49. TheViper

If you want to write anything in 'Code Block' you have write between these :- |dw:1347024632753:dw|Like this :- http://assets.openstudy.com/updates/attachments/503dfd2ce4b0074824ff598c-theviper-1346930814196-untitled.png It will be shown as :-  GHAZI 

50. ghazi

cool....let me try this

51. TheViper

try :)

52. ghazi

|dw:1346936212442:dw|

53. ghazi

it didn't work :(

54. TheViper

sorry u should not type in drawing :)

55. TheViper

work as in the attachment :)

56. TheViper
57. TheViper

try now :)

58. ghazi

okay wait a sec

59. TheViper

fast

60. TheViper

61. ghazi

like this ,,,,,,,,,,, Type here ,,,, Viper

62. ghazi

damn i am too stupid at this

63. ghazi

by the way thanks for your time dude :)

64. TheViper

hey @ghazi its not apostrophe its this

65. TheViper

& u must type it only 3 times like this :-

66. ghazi

@the viper thanks man

67. TheViper

ok try here:)

68. sauravshakya

$$\checkmark$$

69. MathSofiya

Thanks soo much @AccessDenied :D

70. jiteshmeghwal9

$\huge{\color{red}{\frak{So \space \text{great} \space tutorial \space}\mathbb{Thanx !!!!!!}}}$ @AccessDenied :)

71. blackops2luvr

 $$\bbox [ 15pt, #000033 ,border: 15px solid #aa8866 ] {\Huge\sf\color{white} {\ hi \ there \ :D }}$$