TeX Frequently Used
Math Mode ($ vs. $$)
Putting text between dollar signs will activate "math mode" where you can format equations and code in TeX.
A single pair of dollar signs (e.g. $y = mx + b$) produces in-line math mode (i.e. insert symbol $\lambda$). This is used to distinguish math from text.
Example:
By the Lemma from Section 2.3, the difference of any two solutions of the nonhomogeneous equation $L[y]=g(t)$ is a solution of the homogeneous equation $L[y]=0$.
Displays as:
A pair of dollar signs (e.g. $$y = mx + b$$) will bump it to a new line and center it on the assignment page in a more prominent display.
Example:
$$ \eqalign { 2x &= 3y \cr 2x^2 &= 3y + 2z \cr x^3 &= 3x^{@e} } $$
Displays as:
Notice that:
- \eqalign is used for equation alignment for aligning multi-line displays at a single place
Each line is aligned by centering on the ampersand ("&")
A carriage return is inserted after every "\cr"
- Only the code between "$$ { . . . } $$" is shown
Commonly Used TeX Markup Tools
All of the following, plus more, can be accessed on the TeX Reference Card!
Tool Category | Item | TeX Code |
---|---|---|
Elementary Math Control Sequences | Fraction (overline is for larger equations) | {<numerator>\over <denominator>} \overline{ . . . } |
Square root | \sqrt{<expression>} | |
Integral | \int_{lower bound}^{upper bound} {<expression>} | |
Formatting Alignment and Spacing | Indentation | \indent{ . . . } |
No Indentation | \noindent{ . . . } | |
Alignment | \eqalign{ . . . } | |
Horizontal Spacing (spacing within text) | \; \enspace | |
Vertical Spacing of various sizes | \smallskip \medskip \bigskip | |
Text Formatting | Bold font | \bf{ . . . } |
Superscript | <variable>^{<subscript expression>} | |
Subscript | <variable>_{<subscript expression>} | |
Displaying Dollar Sign | $\$ |
Tips for Using TeX
- Incorrect use of curly braces can cause errors, so make sure that for each opening bracket there is a corresponding closing one (and vice versa)
- To call variables define in the code field, prepend it with '@'
Example: "@ans1" calls variable ans1 - Feel free to Google what you're looking for with TeX as well
Welcome to the University Wiki Service! Please use your IID (yourEID@eid.utexas.edu) when prompted for your email address during login or click here to enter your EID. If you are experiencing any issues loading content on pages, please try these steps to clear your browser cache.