# [OS X TeX] Students could use some help

Alan Munn amunn at msu.edu
Tue Apr 10 00:10:32 EDT 2007

At 8:39 PM -0500 4/9/07, Jeffrey J Weimer wrote:
>On Apr 9, 2007, at 3:15 PM, Daniel Culver wrote:
>
>>I am trying to help some high school students use gwtex with
>>Texshop 2.10 beta to write a simple report. We are on a G-5 PPC w/
>>OSX 10.4.up to date. We started with \documentclass[12pt]{article}
>>because we thought that would be easiest. The preamble is nothing
>>more than this right now. I have been consulting The Latex
>>Companion, Tug, MacTex site, and Nasa site.
>
>Find a copy of "A Guide to LaTeX 2e" from Kopka and Daly. IMO, it is
>a much better companion for doing LaTeX than the companion.

I agree completely.  For beginning to learn LaTeX it's a really great
book.  The LaTeX Companion is a good reference once you know the
basics.

>
>>I am more confused than ever. I would like a little help getting
>>back in the right direction.

One of the problems with Latex is that it has it own ideas of what a
document should look like and makes changing things hard.  This is
fine if you are able to use the basic outline, but if you have to
follow a style guide (especially one created with Word in mind)
things can get scary pretty quickly.

>
>Try the code below, documented so your students might see what the
>commands are telling LaTeX to do ...

I agree with this in principle, but I prefer to give students a
template that includes the basic packages so that they don't end up
doing everything by hand (which ultimately leads to very kludgy and
messy documents.)  Since there is almost always a package available
to do the most obvious things, and packages are usually much better
than any home-cooked code (certainly by beginners) I think that it is
important to get students into the mode of thinking that packages
will do the work for them.  To this end, I suggest the following
modifications to Jeffrey's  basic document:

>
>%% Basic LaTeX Document
>
>%% this defines the document class to be an article at 12pt font on
>US letter paper
>
>\documentclass [12pt,letterpaper]{article}
>
>%% set the font to be Helvetica
>
>\usepackage[T1]{fontenc}
>\usepackage[full]{textcomp}
>\usepackage{helvet}

This actually only sets the sffamily font to Helvetica, which isn't
quite what is needed.  To make the whole document Helvetica we need
to add the following (more on this below).

\renewcommand{\familydefault}{\sfdefault}

>%% document settings to give 1" margins all around
>
>\textwidth=6.5in
>\textheight=9in
>\topmargin=-0.25in  % this puts the page number at 0.75in from the top
>text 1in from the top
>\oddsidemargin=0in
>\evensidemargin=0in

Instead of doing this by hand, use geometry:

\usepackage[margin=1in, includefoot]{geometry}

>
>%% set the line spacing to double space (twice the selected type size)
>
>\renewcommand{\baselinestretch}{2}

Instead of doing this (which has well known problems), use setspace:

\usepackage{setspace}
\doublespacing

>
>%% page style settings to put page numbers in proper place by default
>

The fancyhdr package gives you far more simple control over this.

\usepackage{fancyhdr}
%% Add the following to every document, and you will have simple
%% formatting you will need (just fill in the blanks)
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy} %make the default page style match the above template

>
>\begin{document}
>
>%% First Page
>
>%% override default page style for no page numbers and skip down 3"
>
>\thispagestyle{empty}
>\vspace*{3in}
>
>%% Here is the title - format it as you like ...
>
>This is the Title of My Document
>
>%% now skip to the bottom of the page and put the page number on the right
>%% (use \begin{center}\thepage\end{center} to put page number in center)
>
>\vfill
>\hspace*{\fill}\thepage

\thispagestyle{plain} % put first page number centered

>%% on to the next page
>
>\clearpage
>
>Here is the text of the first page of the document. My goodness, how
>nicely \LaTeX\ typesets this document! I can even type a beautifully
>formatted math equation
>
>$A_{circle} = \pi r^2$

Of course, notice that this equation no longer is in Helvetica, since
it provides no math support.  So if the document is to include math
as well, then a better initial choice for a sans serif font might be

\usepackage{cmbright} % of course this must go in the preamble,
replacing the helvet package.

>
>\noindent I think, I will throw away my MS Word program and become a TeXXie!
>
>\clearpage
>
>Here is another page as a test.
>
>\end{document}
>

My two cents.  (Here is cut and paste form of  my version of the
document:)  -Alan

\documentclass[12pt]{article}
\usepackage[margin=1in, includefoot]{geometry}
\usepackage{setspace}
\doublespacing
\usepackage[T1]{fontenc}
\usepackage{cmbright} % change to helvet if no math support needed
\renewcommand{\familydefault}{\sfdefault} %make the document sans-serif
\usepackage{fancyhdr}
%% The following template sets headers and footers for pagestyle 'fancy'
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\footrulewidth}{0pt}
\thispagestyle{plain} % make the first page plain

\begin{document}
\pagestyle{fancy} % make the rest of the pages fancy
\vspace*{3in}

%% Here is the title - format it as you like ...

This is the Title of My Document

%% on to the next page

\clearpage

Here is the text of the first page of the document. My goodness, how
nicely \LaTeX\ typesets this document! I can even type a beautifully
formatted math equation

$A_{circle} = \pi r^2$

\noindent I think, I will throw away my MS Word program and become a TeXXie!

\clearpage

Here is another page as a test.

\end{document}

--
Alan Munn
amunn at msu.edu
Department of Linguistics
and Germanic, Slavic, Asian and African Languages   Fax.  +1-517-432-2736
Michigan State University, East Lansing MI 48824       Tel.  +1-517-355-7491