Windows LaTeX Tutorial

Extract

Extract the files from Thesis.zip.  The files will automatically extract to a folder/directory called Thesis.  The tex and bib files will be extracted to this folder.  Subfolders will contain figures, etc.

WinEdt

Open WinEdt.  (For newbies, WinEdt is a shareware GUI that can be used in Windows to work with latex.  The underlying latex engine is MikTex.  Install MikTex first, then WinEdt.)

Project

Create a new project.  Select Project New Project from the menu.

A project needs files.  Open the main file for this project.  From the menu, select File | Open, navigate to the newly created Thesis directory.  Choose Thesis.tex.  WinEdt needs to be told that this is the main project file.  To do this, select Project | Set Main File from the menu, or use the icon from the toolbar (folder with a green plus sign).

Now is a good time to save your project.  Choose Project | Save Project from the menu.  Save it in the same file as your main tex files.  Call it whatever.

Project Tree

Now that the main file has been set, it is possible to make use of WinEdt’s Project Tree.  Select Project | Tree from the menu to display the tree pane, if it is not already displayed.  Once the pane is displayed, as in the previous figures, use the Build Tree command at the top of the tree pane.  The following diagram shows the tree after it has been built; the Build Tree command is circled.

The tree shows the main project file (Thesis.tex) along with the files that have been input (or included).  For example, Thesis.tex includes myPreamble.tex, Abstract.tex, etc.  On the other hand, Embee_Implementation.tex inputs Embee_PerformanceAndConstraints.tex.  (See your Latex book for the difference between include and input.)  The purpose of this complex structure is simple to make it easier to organize your thoughts – it’s far easier to edit a small document than a large one.  I suggest one document per chapter, but you could actually keep *all* of your thesis text in the main Tex file.

Compiling

This set of files has been carefully orchestrated in order to compile and create a 29 page thesis with all of the appropriate tables of contents, bibliography, vita, etc.

The beauty in using WinEdt projects and selecting a main file is that you can compile your project from within any of the files.  For example, you don’t need to make sure that you’re editing Thesis.tex in order to compile the project.

To compile, select Accessories | Texify from the menu bar or the Texify button on the toolbar (looks like a brownish creature).  The following screen shot shows the tool tip highlighting the Texify button.  As soon as you texify, a command window pops up, showing what is happening in the background.

Viewing the Result

The Yap DVI viewer program should be opened when the compilation is finished (assuming no errors).  The following screen shot shows the output in the Yap window.

Of course, if there are errors, you won’t get a final dvi to view.  WinEdt is relatively nice with errors, showing you where the compilation has crashed, and providing somewhat explanatory messages.

Converting to PS and PDF

Converting to PS

The DVI is nice to look at, and usually prints nicely.  However, these documents are not very portable.  Therefore, most people want to create ps or pdf files.

To convert to PS, use the DVI->PS button on the toolbar.

It is important to set your DVIPS options correctly, in order to get your document to print correctly on letter paper (the default is A4).  The following screen shot shows the options popup box, which appears after you click the DVI->PS button.  Make sure to enter the page numbers of the DVI document that you want converted.  Also make sure that the generic parameters contains “-P pdf -t letter”.

This command creates a ps file with the same name as the main project file, in this case thesis.ps.

Convert to PDF

To convert to a PDF file, do *not* use the DVI->PDF button available on the toolbar.  We have yet to successfully create a nice pdf with this command.  Instead, create a ps file, and then use the PS->PDF button on the toolbar (recommended).  You may also be able to use Adobe Acrobat to distill it to a pdf.

Bibliography

This thesis template makes use of a separate bib file, instead of inserting each biblography item in the main document.  Because of a GATHER command in the Thesis.tex file, the Texify command automatically runs bibtex on the bibliography file.  To learn more about the bibliography, see the template for how to create bibtex entries (in the thesis.bib file), as well as citations in the main document.

Advanced – Glossary

This template also contains code to permit the creation of a glossary.  This is not beginner material, so ignore it until you feel more comfortable with your project.

The gloss package is used, and more information is provided in Glossary_Stuff.zip.  In a nutshell, there is a separate bibliography-like file, here called glossary.bib, which contains specially formatted glossary entries.  In the main document you can (but don’t have to), use the \gloss{} tag to flag a particular word (this causes the glossary to show the page number of the first flagged instance of the word).

In order to actually create the proper auxiliary files, you have to bibtex the glossary file.  To do this, open the command prompt in WinEdt and type bibtex thesis.gls (where thesis is the name of the main file, which actually refers then to glossary.bib).

It sounds complicated, but once you figure it out, it’s beautiful.  Check out the zip file mentioned above for more information.