basic

advertisement
Introduction to Latex
http://cta.tug.org/tex-archive/info/lshort/english/lshort.pdf (manual)
Focus on the following pages:
 Chapter 2: (sets up the basic environment) pg 29
 Chapter 3: (Deals with all the mathematical symbols with examples) pg 59
 Index: pg 131
1.
2.
3.
4.
5.
6.
7.
\documentclass[12pt]{article}
\input{tcilatex}
\begin{document}
\begin{center}
Title: The basic setup
\end{center}
\medskip
8. \begin{description}
9. \item[1.]
10. \end{description}
11. \end{document}
This is the basic setup (or template) for writing a quiz. What will be on the quiz will be
in between lines 8-10.
In basic programming, whenever you begin something, you have to end it. When you
begin something, you are “creating an environment.” You have to tell the computer
when you want to begin it and when you want to end it. These are the main
environments that you will have to deal with.
\begin{document}
\end{document}
**Main environment.
\begin{description}
\end{description}
**Important environment. All the code between is what will be on my quiz
\begin{displaymath}
\end{displaymath}
**All the code between will be using mathematical symbols. Like fractions, square
roots, inequalities, etc.
*There is a backdoor to this environment, sometimes it is easier to use. Instead of
creating the environment, you may use $ signs.
You start with a $, and write your code, and when you done using math symbols, put a $.
*You just have to be careful with letters or words. If you type a sentence in either of the
two above, it will print out in italics.
\begin{flushright}
\begin{center}
\begin{flushleft}
\end{flushright}
\end{center}
\end{flushleft}
These three, help align your code, just as you were using the 3 align buttons in Microsoft
Word.
Basic code and output (each code has to be within a specific “environment”)
 Code/command…………………………OUTPUT

















\item[1.]……………………………….→ 1.
\dfrac{1}{2}………………………….→ ½
For a negative number,{-1}………….→-1
x^2……………………………………→x2
x\neq 0 .…………………………….→ x≠0
x,y \geq 0 ……………………………..→ x, y≥0
x\leq 0 ………………………………...→ x≤0
For < , >,or = use buttons on keyboard.
To enclose an expression in parentheses, use buttons on keyboard.
To enclose a fraction in parentheses, use:
o $\left(……\right)$
Absolute value, |x|…………………….→|x|
o This button is the \ button, just have to use SHIFT
\underline{~~~~~~}………………….→________
\underline{1/2}………………………→ ½
\vspace{.25cm}………………………→(skips a space of .25cm between lines)
{\hspace{.75in}}……………………→(indents a space between words of .75in)
\\..........................................................→ends a sentence, and begins on a new line
\newpage………………………......→Ends the page, and begins on the next page
These are the basic commands. For others please see either examples when they are used
in the things I gave you, but the above codes I have used most often. There are a few that
come up here and there, and I will address it as they come; I don’t want to bog you down
with too much.
Download