RSI 2001

The 2001 Research Science Institute



 RSI 2001 Home > Help Me! > FAQ > LaTeX



Latex FAQ

1. How do I do a citation in LaTeX?
2. How do I put in a trademark/registered/copyrighted sign in LaTeX?
3. How do I get an angstrom sign in LaTeX?
4. How do I get a percent sign in LaTeX?
5. How do I get table cells to auto-wrap?
6. How do I label things and reference them?
7. How do I get a degree sign?
8. How do I get "a choose b"?
9. How do I get a square/cube/n-th power root?
10. How do I get nicely numbered equations?
11. How do I reference numbered equations?
12. How do I reference numbered figures?
13. How do I stop latex from putting an extra space after Ms. ?
14. How do I include a package?
15. How do I create a subsection?
16. How do I superscript?
17. How do I draw the double-barred Z (representing all integers), R (all reals), or Q (all rationals) in LaTeX?
18. How do I do italics in LaTeX?
19. How do I get the "for all" symbol (upside down A)
20. How do I include an image?
21. How do I rotate or resize an included graphic?
22. What does Unable to read an entire line---bufsize=3000. Please alter the configuration file. mean?

1. How do I do a citation in LaTeX?

\cite{sourcename}

2. How do I put in a trademark/registered/copyrighted sign in LaTeX?

\textregistered for (R)
\copyright for (C)
\texttrademark for (TM)

3. How do I get an angstrom sign in LaTeX?

\AA

4. How do I get a percent sign in LaTeX?

\%

5. How do I get table cells to auto-wrap?

Use p{dimen} as the column specification. That wraps them to that width specified by dimen. Example: \begin{tabular}{|l|l|r|p{2in}|}

6. How do I label things and reference them?

\label{labelname} to label
\ref{labelname} to reference
For tables and figures make sure the \label{} comes inside \caption{}

7. How do I get a degree sign?

^\circ (in math mode).

8. How do I get "a choose b"?

{ a \choose b } in math mode

N.B. If you are using the amsmath package, using \choose will cause a Package amsmath Warning complaining about the \atopwithdelims control sequence. Just ignore this warning.

9. How do I get a square/cube/n-th power root?

\sqrt{k} for a square root of k
\sqrt[n]{k} for an n-th power root of k

10. How do I get nicely numbered equations?

Use the equation style:

\begin{equation}
E=mc^{2}
\end{equation}
Note: Numbered equations are almost always preferable to unnumbered equations, for which you can use \begin{displaymath} \end{displaymath}.

11. How do I reference numbered equations?

When you write the equation,

\begin{equation}
E=mc^2
\label{eqn:Einstein}
\end{equation}
And then when you wish to reference the equation in the prose,
Applying the mass-energy relations given in (\ref{eqn:Einstein}),
we find that...
Note: the eqn: in the label is not formally necessary, but will make your code more readable.

12. How do I reference numbered figures?

When you insert the figure the equation,

\begin{figure}
\includegraphics{poodles.eps}
\caption{Commuting canine movements}
\label{fig:poodles}
\end{figure}
And then when you wish to reference the figure in the prose,
As seen in Figure \ref{fig:poodles}, the hunting patterns...

13. How do I stop LaTeX from putting an extra space after Ms. ?

use Ms.~Name

14. How do I include a package?

\usepackage{packagename} before \begin{document}
Useful package: amssymb -- mathematical symbols and fonts

15. How do I create a subsection?

\subsection{subsectionname} for subsections
\subsubsection{subsubsectionname} for subsubsections

16. How do I superscript?

$E = mc^{2}$

$1024 = 2^{10}$

17. How do I draw the double-barred Z (representing all integers), R (all reals), or Q (all rationals) in LaTeX?

\mathbb{Z}, \mathbb{R}, \mathbb{Q} (you must be using the amssymb or amsmath package)

18. How do I do italics in LaTeX?

\emph{}

19. How do I get the "for all" symbol (upside down A)

\forall in math mode

20. How do I include an image?

\begin{figure}
\includegraphics{imagename.eps}
\caption{Lovely caption}
\label{fig:somethin-you-will-remember}
\end{figure}

21. How do I rotate or resize an included graphic?

use the angle attribute to \includegraphics. For example, \includegraphics[angle=45]{foo.ps} to rotate counterclockwise by 45 degrees. Other possible attributes are:

\includegraphics[width=5in]{foo.ps} 
\includegraphics[width=\textwidth]{foo.ps} % scale to the width of the page
\includegraphics[height=5in]{foo.ps}
\includegraphics[scale=0.5]{foo.ps} % scale to 50%
If you want it to be just as wide as the text, use width=\textwidth.

22. What does Unable to read an entire line---bufsize=3000. Please alter the configuration file. mean?

Most likely, you are trying to include an image that is not in PostScript format.