2008-04-21

LaTeX简单问答 (ZZ)

发信人: pixYY (小精灵), 信区: TeX
标 题: LaTeX简单问答
发信站: 水木社区 (Fri Aug 18 20:26:15 2006), 站内

有些问题还不错
http://web.mit.edu/rsi/www/2001/help/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
--
自从朗多什衰败以后,古老而神秘的精灵家族便逐渐退隐人间。如果足够
幸运的话,有些童真无邪的人还可能偶尔见到他们。但是精灵们留下了一个奇
特的传统,每过一段时间,会派遣一批精灵幻化为人来到世间,那些感觉敏锐
的人如果留意的话还可以发现他们所共有的一些精灵的特质... ...



※ 修改:·pixYY 于 Aug 18 20:28:11 修改本文·[FROM: 59.66.117.*]
※ 来源:·水木社区 newsmth.net·[FROM: 59.66.117.*]

No comments: