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!
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
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
| 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 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- A Topic for Discussion - Open Source Feature-Richness?
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Home, My Backup Data Center
- Paranoid Penguin - Building a Secure Squid Web Proxy, Part IV
- New Products
- Developer Poll
- Trying to Tame the Tablet
Enter to Win an Adafruit Prototyping Pi Plate 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 Prototyping Pi Plate 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
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




26 min 40 sec ago
4 hours 40 min ago
7 hours 12 min ago
11 hours 52 min ago
14 hours 14 min ago
1 day 7 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 11 hours ago