Home
Up

Formatting ASCII Text Files for LaTeX

LaTeX takes an ASCII text file and applies the formatting specified via ASCII-based macros. These macros typically take the form of

\bf and \rm
\begin{equation} and \end{equation}
\cite{reference}
et cetera

For example, suppose we have the plain text

Now is the time for all good men to come to the aid of their party.

The LaTeX output corresponding to this ascii input looks like:

Suppose we are orators and we cannot help but emphasize some parts of the sentence for purpose of rhetorical flourish. We can apply boldface to the word "Now" by adding the following boldface \bf macro to our ASCII input:

\bf Now \rm is the time for all good men to come to the aid of their party.

The LaTeX output now looks like:

(note the use of the "roman" macro \rm to return to normal type face. Suppose you're also a politician and your campaign manager points out that you're being a sexist pig. To assuage his or her worries about perceptions of your candidacy and to salvage your now wobbly campaign, you change your ASCII text input to read:

\bf Now is the time for all good men \em{and women} to come to the aid of their party.

The output now reflects the use of the emphasis \em{ } macro as:

Now suppose you're running for office in your professional society (e.g., AIAA) and you want to throw in some math equations with the written handout notes, just to show that you've got that aspect of technical awareness covered. (Life is often surreal, after all.) To meet that challenge, you include Euler's famous proof for the existence of God...

The result of this is...

So, you see, we have

Defined an equation, set apart from the text, using the \begin{equation} ... \end{equation} macro; and
We have defined a fraction using the \frac{ }{ } macro.
 

 

This web site copyright © 1999-2000 by Robert A. Luke.  All rights reserved.