Latex Interactive Guide
User Manual:
Open the PDF directly: View PDF
.
Page Count: 3
| Download | |
| Open PDF In Browser | View PDF |
CIS 160
A Guide to
Generic Name That Needs Changing
Recitation 2XX
LAT
EX
Welcome to Latex. This is how normal text is displayed. You can keep on typing off the screen like this but
LaTeX is nice and smart and will just wrap everything for you. Of course, you can be kind to yourself and
just use a linebreak (hit return/enter) to keep all of your lines within some reasonable width in the .tex file.
Notice how LaTeX automatically ignores all of your line breaks in the .pdf. Neat! But now you wonder, how
DO we add line breaks then???
This is how! Two line breaks is interpreted by LaTeX as a separator between two different paragraphs. And,
because of some settings we included up there, there is a nice space between the two paragraphs too. Neato!
Speaking of LaTeX...
LATEX! This is the first command you’ve seen that displays something neat! Notice the command is prefixed
by a backslash, much like a lot of things that you’ve seen so far in this file. The backslash is a really special
character in LATEX, so much so that you even need a special command in order to display it! \
Let’s try to do some other things with just plaintext. You can bold text, italicize text, and underline text.
You can also make text
big, bigger, even bigger, and even
HHHUUGEEE.
LATEX also has a pretty unique way of generating the quote characters. “This is how a quote should look in
LaTeX”.
You can also get bulleted and numbered lists, which are great for formatting questions and answers.
• This is a bulleted list!
• With a bunch of things in it.
– You can even nest these lists
– In case there is serious categorization that you need to do.
And...
1. This is a numbered list!
2. Pretty cool, huh.
(a) Of course, nestable as well.
And...
1. You can also mix and
• match!
And...
1. You can specify the format of the numbering like so:
Problem 1. Some Text
Problem 2. Next Problem
Problem 3. More Stuff
2. You can even specify where it all begins!
1
(e) Stuff
ix. Notice how we have “enumiii” instead of “enumii” here. The number of i’s is indicative of
the level of the nesting that it controls.
At this point you might be thinking what on earth the point of all of this is, since nothing we’ve done so far
is hard to achieve using Word or a similar word processing software. Well, it turns out LATEX is amazing at
displaying and working with mathematical symbols and equation.
For example: ( 21 + 12 ) × 34 = 1 × 34 = 34 or (A ∩ B) ∪ (B ∩ C) ⊆ D.
There are some quirks to it of course. For example, i2 looks all fine and dandy but notice what happens
when we try this it his – doesn’t look nearly like what we wanted it to. That’s because “operators” such as
and ˆ operate on the thing that is directly on their right.
So, in order for it to work on a bunch of characters, we have to group them together using curly braces { }.
For example, i234 or i234 .
Let’s explore some more: thisissomemoremathstuf f i2 × 54 .
Hmm, that looks nothing like what we wanted. In fact, normal text behaves really poorly inside “math
mode”. Since LaTeX wants to interpret all of the things in as “mathy” as way as possible, all of the text
generally gets converted to look like how you would want variables to look. So e = mc2 look real good, but
somethinglikethisdoesnot.
What can we do? One of two things:
1. The first is that we can just move all of the normal text out of math mode where possible. This means
changing things from thisx2 + x + 1, to this x2 + x + 1.
2. The second is that we can explicit tell LATEX that it’s normal text and it should handle it like it is.
For example {x|x is a cool variable}
• While we’re at it, notice how the two x’s are spaced pretty poorly? We can fix that by adding a
∼ next to the pipe, like so: {x | x is a cool variable}
So far, all of the expressions we’ve seen have been inline. But you can also make the expressions live in their
own line by using LATEX’s display mode, like so:
n
X
i3 + i =
i=0
m
Y
j2
j=1
And what if you want to display a series of equations?
(x + 1)(x + 2)(x + 3) = (x2 + 3x + 2)(x + 3)
= x3 + 6x2 + 11x + 6
= 6 + 11x + 6x2 + x3
This is a good place to stop this introductory guide to LATEX, but it’s probably good for us to let you know
that there is so much more to LATEX than what we have covered in this guide. Once you’re done with this
2
guide, you’ll definitely take a look at the “Useful LATEX commands” document on the course site for all of
different commands that you’ll need for this course.
Beyond that, there are many great resources online where you can learn even more LATEX and become a true
power user (if you want).
LATEX is something that you’ll find that you’ll need to use quite a few times in your college career, so it’s
best if you get a solid foundation starting in CIS160!
If you ever get stuck on something LATEX related, feel free to post in the Piazza group with your struggle.
Please take the time to run a quick Google search first though – more often than not that’s what we as TAs
do when a student has a LATEX question anyways!
3
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Page Count : 3 Producer : pdfTeX-1.40.19 Creator : TeX Create Date : 2019:02:17 13:10:33-05:00 Modify Date : 2019:02:17 13:10:33-05:00 Trapped : False PTEX Fullbanner : This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) kpathsea version 6.3.0EXIF Metadata provided by EXIF.tools