今日吃瓜

Help Desk

Information Technology

General Paper Help: Making LaTeX Look Like Word

LaTeX has a very distinct style that is somewhat different from what your professors expect and want their student's papers to look like. Some professors will not accept papers without ragged right text, 12 pt font, and 1 inch margins. I recommend asking your professor for their guidelines before you write your first paper. Once you have their guidelines, the options below will help you make your paper's format exactly what they want.

Changing the Font Type or Size

LaTeX allows you to change the font type and size in the preamble of your document. (The preamble is the section before \begin{document}, and where most of the global formatting commands are made.) This will affect your document's font size globally, but you can use the relative sizing for local changes. By default, your paper will be in Computer Modern (a font invented by Donald Knuth, the inventor of TeX) and 11pt. For something different, you will have to insert options and packages in the preamble. To change the font size, add the desired font size between the square brackets of the document class declaration. Remember, font size must be of the form "12pt", "11pt", or "14pt".

\documentclass[12pt]{article}

To change the font, you will need to add the font's package to your document by putting \usepackage{ packagename} in the preamble:

\documentclass[12pt]{article}
\usepackage{times}
\begin{document}
The body of your document!
\end{document}

avantgar
avantgar sample image
bookman
bookman sample image
courier
courier sample image
helvetic
helvetica sample image
newcent
newcent sample image
palatino
palatino sample image
times
times sample image
zapfchan
zapf chancery sample image

back to top

Alignment

Ragged Right Text

LaTeX uses its professional typesetting engine to perfectly justify your text, just like professionally published books and journals. However, many professors prefer unjustified text that is aligned with the left edge and the right edge ragged, commonly known as ragged right or left-aligned text. To give your paper a ragged right edge, use the raggedright environment.

\begin{raggedright}
\parindent=0.5in
[You must have a blank line here for the package to work]
Aware of no military grounds for keeping the Jupiter missiles in Turkey, Kennedy informed Ormsby-Gore that he would have to see ``whether political developments would enable him to do a deal on the reciprocal closing of bases''.

And so goes the rest of your paper...
[You must have a blank line here for the package to work]
\end{raggedright}

It will produce text like the following:

ragged right text image

back to top

Other Justifications

To make things centered, you will want to use the center environment:

\begin{center}
This is centered text.
\end{center}

Similarly, the environment flushright aligns the text on the right edge of the document.

back to top

Adjusting the Margins

While LaTeX has very generous (nearly 2 inch) margins by default, most professors prefer one inch margins all around so they can easily judge the true length of a paper. Use the fullpage package to make your paper conform to your professor's expectations. Include the \usepackage{fullpage} in the preamble of your document and you're set!

back to top

Doublespacing

There are many packages in LaTeX that will doublespace your paper, but setspace does the best job of ignoring headings, figures, and other parts of the text you do not want doublespaced. Make sure to include the package at the top (in the preamble): \usepackage{setspace}.

Use the command \doublespacing to make the text doublespaced. Use the command \singlespacing to return to singlespaced text. If you place either command unseparated from the text as part of a paragraph, it will only apply to the paragraph it is in. However, if is separated by an empty line, it will apply to everything after it. The command \onehalfspacing will create less space between each line than doublespacing, about equivalent to Word's 1.5 spacing. (See an example on the Introduction to LaTeX page)

back to top

Creating a Title Page

You can make a title page using the \maketitle command, which grabs the author and title that you have defined in the preamble and creates a title page automatically. Here's an example document that utilizes this:

\documentclass[11pt]{article}
\title{The Title of Your Paper}
\author{Your Name Here}
%\date{}
%When commented out, the current date is printed. Uncomment to print no date or to specify a date inside the curly braces
\ begin{document}
\maketitle
\pagebreak
The rest of the paper
\end{document}

To get a page that looks like this (click on the image to see it bigger):

sample paper image

Alternately, you can make a title page by centering text and changing the size as you see fit, then adding a page break. Here's one such title page:

\begin{document}
\begin{center}
\begin{huge}The Title of Your Paper\end{huge}\\
\textit{Your Name Here}\\
The Date (or \today)\\
\end{center}\\
\end{document}

To get a page that looks like this (click on the image to see it bigger):

sample paper image

This template showcases how to make a title emulating a typical Mricrosoft Word title.

back to top

Inserting Space

You may wish to leave a large gap between paragraphs for whatever reason. To do this, you can add a command after a line break (\\) or use the command \vspace:

Right below here will be a 3in gap\\*[3in]
Below here will be a gap 5 cm tall \vspace{5cm}

When specifying any space, be sure to give the unit of measurement and do not leave a space between the number and the unit. In addition to the absolute values of inches (in), centimeters (cm), millimeters (mm), you can also use relative values em and ex. Em is the width of a capital M in the current font, and ex is the height of a lower case x in the current font. Mathematicians might also want to use a mu, 18 of which are equal to one em, for precise positioning in mathmode.

back to top

Long Quotes

Long quotes should go in the quote environment, intuitively enough. The quote is set off by blank lines and horizontal space, just like you learned to do in high school.

Text not in the quote.
\begin{quote}
Quoted text, lots of it

Another paragraph, if necessary
\end{quote}
More text not in the quote. Be that analytical machine!

That gives something like this:

long quotes sample image

back to top

Footnotes

Whenever you need a footnote, just use \footnote{}. Anything within the bracket will be in the footnote. Here's an example:

Aware of no military grounds for keeping the Jupiter missiles in Turkey, Kennedy informed Ormsby-Gore that he would have to see whether political developments would enable him to do a deal on the reciprocal closing of bases.\footnote{Ormsby-Gore was the British Ambassador to the United States during the Kennedy Presidency.Ormsby-Gore knew Kennedy well from his time in London where his father, Joseph P. Kennedy, had served as American Ambassador.}

The above LaTeX code produces this output:

footnotes sample image

back to top

Endnotes

Endnotes are created in a similar way to footnotes, except you will need to use the package endnotes (not to be confused with End Note, the bibliography manager). The package probably came with your LaTeX installation, but if necessary, you can find it Wherever you want to add an endnote reference, write \endnote{ your endnote text in here, and then at the end of the document (or wherever you want your Notes section to start), put \theendnotes:

\documentclass[12pt]{article}
\usepackage{endnotes}
\begin{document}
Some assertions.\endnote{Side notes to the assertion.} More talking and analysis.\endnote{More endnote text.}
\theendnotes \end{document}

back to top