(URL http://www.cs.cornell.edu/Info/Misc/LaTeX-Tutorial/Errors.html)
Consider the following input file:
``When {\em I} use a word,'' Humpty
Dumptysaidinratherascornfultone,``itmeansjust
what I choose it to mean --
neither more nor less.''
When you latex the file, you will get the following error:
Overfull \hbox (23.24313pt too wide)
in paragraph at lines 3--7
[]\twlrm ``When \twlit I \twlrm use a word,''
Humpty Dump-ty-said-in-ratheras-c
orn-ful-tone,``itmeansjust
Note that the position of the error in the file from the error message.
Correct the text in overfull.tex to get rid of the "Overfull \hbox" error.
and here's the dvi output.
When you get an "Underfull \hbox" message, it means that there is too much empty space in a line. The solution is to rework the to remove the blank space. LaTeX keeps processing.
Consider the following input file:
It certainly was a {\em very large
Gnat: ``about the size of a chicken,''
Alice thought. Still, she couldn't
feel nervous with it, after they had
been talking together so long.
When you latex the file, you will get the following error.
(\end occurred inside a group at level 1)
Output written on runaway.dvi (1 page, 500 bytes).
LaTeX processes the file anyway. Here's the dvi output. To correct the text, just add the missing } to limit the italics.
Correct the text in runaway.tex to add the missing brace after "very".
and here's the dvi output.
\begin{enumerate}
\begin{itemize}
\begin{description}
All lists in LaTeX have the same general format:
\begin{list type}
\item List entry
\item Next List entry
\end{list type}
Any time a
\begin{operator} ...
\end{operator}
construct is used in LaTeX, the text inbetween is said to
be in the "operator" environment. For example, text that
begins with \begin{enumerate} and ends
with \end{enumerate} is in the "enumerate"
environment.
Create a numbered list that looks like the following. The text is in the file name.tex which is already in your latex directory.
\begin{itemize}
\item ``That's a great deal to make one
word mean,'' Alice said in a thoughtful tone.
\item ``When I make a word do a lot of
work like that,'' said Humpty Dumpty,
``I always pay it extra.''
\item ``Oh!'' said Alice. She was too much
puzzled to make any other remark.
\end{itemize}
The description term follows the \item
command and is bounded by brackets [ ]. Consider the
following example which produces
these results.
\begin{description}
\item[Toves] are something like badgers
-- they're something like lizards --
and they're something like corkscrews
\item[Gyre] to go round and round like
a gyroscope
\item[Wabe] the grass-plot round a
sun-dial, which goes a long way
before it, a long way behind it, and
a long way beyond it on each side
\end{description}
Note that there is no space between the
\item command and the brackets.
`Twas brillig, and the slithy toves \\
Did gyre and gimble in the wabe; \\
All mimsy were the borogoves, \\
And the mome raths outgrabe.
Note that the above must be in the flushleft environment to
prevent LaTeX from indenting the first line as if it were a
paragraph (see \begin{flushleft} below).
Modify the file break.tex to take out the backslashes, and preview it to see the result. Then add back the backslashes, only this time add one to the last line as well. Preview it to see the result.
\begin{center} and the
\end{center} commands will be centered.
Here are the
formatted results.
Alice felt that in that case she really {\em ought}
to listen to it, so she sat down, and said
``Thank you'' rather sadly.
\begin{center ``In winter, when the fields are white,
I sing this song for your delight --
\end{center}
only I don't sing it,'' he added, as an
explanation.
Notice in the formatted document that the poetic lines are centered, but they don't break to create two separate lines more like the input file text.
Use the file poem.tex as a skeleton to create a document which is like the one above, but with the line breaks done correctly.
Here's the dvi output.
\begin{center} ... \end{center}
\begin{flushright} ... \end{flushright}
\begin{flushleft} ... \end{flushleft}
The declarations for the above environments are shown
below. These can be used at the start of the body
to make them effective for the entire document. Be sure
to put the declaration right after the
\begin{document} at the top of the
body.
\centering
\raggedleft
\raggedright
Use the file down.tex as a start to create a document
without a justified right margin. Do this by both using the
\begin{flushleft} environment and
without using the \begin{flushleft}environment.
Here's the flushleft dvi output,
and here's the other dvi output.
If these are not identical, something is wrong.