LaTeX for the Slightly Timid
Now, suppose that you want to see what your letter really looks like—you certainly don't want to send it as it appears in your letter.tex file. So, after saving the file and exiting the editor (or just popping over to another virtual console), from within the directory where letter.tex is, type latex letter.tex. LaTeX will format your file it in a way that can be displayed and printed. The formatted file will be called letter.dvi; DVI stands for “device independent”, which means that your file can be displayed or printed using a number of programs. If you are using X-Windows, type xdvi letter.dvi to see what you have written. If you are not running X-Windows, you may be able to use dvgt, which comes with some distributions and is also available from sunsite.unc.edu in the /pub/Linux/apps/tex/dvi/ directory. However, its user interface is not the best possible for a novice, and xdvi is certainly easier to use.
“The text looks great!” you say, “But I didn't just want to type plain text in, I wanted to add italics and underlining and mathematical equations and footnotes and...” (If you didn't get past the command latex letter.tex, I'll give some hints for debugging your letter later.) Most of these commands are easy enough and very similar to the commands used so far.
For example, to create a footnote, type footnote{This is the text of the footnote.} wherever you want the footnote to appear. Note that you will have to be careful with spacing—put the footnote command after any punctuation, but before any trailing space. LaTeX will make a complete list of the footnotes and number them correctly. However, if you want to number them yourself, use footnote[num]{text} instead. Remember that brackets contain optional things, so you don't need to number the footnotes yourself unless automatic numbering won't do what you want.
Creating italic and bold text is very similar, except the bold and italic commands are actually inside the braces instead of outside. This is so that more than one command can apply to a region. Here are some examples: I can make some words {\bf bold}, {em italic}, {em\bf bold-italic}, or {em have a {\bf bold} word in a group of italic words}. (em stands for emphasized text; it, which stands for italic, works as well.) LaTeX has many other type styles which work the same as bold and italic; they are documented in all LaTeX reference books.
Another method used in LaTeX for text formatting is similar to the one you used for the letter environment with the \begin and end commands. For example, here is how to center text:
\begin{center}
Here is my centered text,\\
here are two\\
more lines of centered text.
end{center}
Again, as in the letter, the double backslashes signal a new line. The \begin and end commands, along with {table}, {quotation} and many other options, are documented in the reference manuals.
To sum up, when dealing with some text which is to be put in a separate place on the page, as in footnote and opening, the text goes after the command in braces. When dealing with a few words in the flow of the main text, the command (like em and \bf) goes within the brackets along with the text, to set it off from the text around it. And finally, when dealing with larger blocks of text within the document which need to be displayed specially, such as centered text or a table, commands such as \begin{center} and end{center} are used around the text.
A note about line breaks and spacing: When LaTeX sees a line break in your typed-in text, it just assumes that your line got too long and you went to the next line to keep entering text for the same paragraph. LaTeX knows better than you do how many words fit on a line, so one line break just doesn't register with LaTeX. Two or more line breaks (one or more blank lines), on the other hand, are interpreted as a “new paragraph”, so LaTeX will skip a line and/or indent, whatever is appropriate in your document style, and will not put that extra new line in the output. If you want to force LaTeX to break a line without a new paragraph, you must use a \\, a double backslash.
LaTeX also interprets extra spaces and extra empty lines just as it would one space or one empty line. You probably won't know exactly how many lines to leave blank; just leave it up to LaTeX. As in the letter above, LaTeX knows where on the page to put everything so it looks good, so let it do the work. On the other hand, if LaTeX does not know how to make things look right, you do have some control. As above, use \\ (or equivalently, linebreak) to specify a line break, and pagebreak to begin a new page. If this doesn't work, see one of the books about it, or else ask your local “TeXnician” (TeX-speak for “TeX guru”).
Finally, you can add horizontal and vertical space with hspace{width} and vspace{height} respectively, where width and height refer to the amount of space you want added. For example, hspace{.25in} would make the current line be at least a quarter inch high; it's the equivalent of an infinitely thin letter a quarter of an inch high. This may not work at the beginnings of paragraphs, the end of lines, the end of pages, and various other spots. Again, see the book if you can't get it to work the way you want!
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




4 hours 21 min ago
4 hours 39 min ago
6 hours 32 min ago
8 hours 25 min ago
15 hours 19 min ago
15 hours 35 min ago
17 hours 27 min ago
23 hours 18 min ago
1 day 3 hours ago
1 day 3 hours ago