26/10/2008
Writing a thesis using LaTeX
PHYSICS & ASTRONOMY
Undergraduate Resources
LaTeX Resources Using LaTeX to create your thesis Many students choose to write their thesis in LaTeX. To facilitate this we have created a document class (BYUPhys.cls) that encapsulates the basic format of a thesis and a template document that demonstrates how to use this class. The class has options for producing a senior, honors, or masters thesis as well as a PhD dissertation. To test it out, create a new folder and unzip the following files into the folder Zip file with thesis template and document class The file 'template.tex' has quite a few comments to help you understand how it works. If you compile 'template.tex' using pdflatex, you should get the following output: PDF of the template For longer documents, it is often nice to split the document into several files and keep track of references using BibTeX. If you would like to see an example of how to do this, create another new directory and unzip the following files into it: Zip file with a longer example thesis using BibTeX and include files If you compile the file 'thesis.tex' using pdflatex, you should get a pdf of the document "Incredibly Useful Advise for Physics Students Writing a Senior Thesis". Notice that the references for this document are stored in the file 'references.bib', and the file 'phBYU.bst' is included to designate how the references should be formatted (your advisor may have you use a different format). If you have questions about getting the template to run correctly or think you have found a bug, you can email Michael Ware about the problem.
Learning LaTeX There are some excellent tutorials available for learning LaTeX, so we won't try to recreate one here. You might start with one of the documents listed at http://www.latex-project.org/guides/, or you can do a web search for "latex tutorial" and you will find many excellent introductory documents. Take the time to read an online tutorial about LaTeX. If you get stuck, ask around for help. There are a number of students and professors that are familiar with LaTeX and can help you with the basics. Here are some answers to questions that students regularly ask
FAQ How do I get LaTeX to run on my personal computer? O n a windows m achine , a com m on way to ge t LaTe X work ing is as follows:
1. Download and install MikTeX from http://www.miktex.org/. This is a full TeX/LaTeX distribution 2. Download and install GhostScript and GSView to handle postscript issues. These two programs can be obtained at http://www.cs.wisc.edu/~ghost/. 3. Make sure you have installed Adobe Acrobat reader (available at http://www.adobe.com/) to handle pdf files. 4. You can edit your documents in any text editor you want (e.g. notepad), but it is helpful to have one that is designed specifically for LaTeX. On physics department machines we use WinEdt (available at http://www.winedt.com) because it integrates well with MikTeX, provides spell checking, project management, and other nice features. WinEdt is shareware, and there is a small fee associated with registering it, but there are a number of free front ends available (TexMaker, WinShell, etc.). On a Macintosh, TexShop is a good way to go. Their web site provides installation instructions. If you run Linux, you probably already have LaTeX installed. What's the deal with DVI, PDF, and Graphics Files? Traditional LaTeX puts the finished output in a Device Independent (DVI) file. DVI files have the advantage that you can perform an inverse search from a DVI, i.e. you can double click on the nicely formatted DVI and it will take you to the associated place in your LaTeX source file so you can edit it. The only kind of graphics that can be included in a DVI file are Encapsulated PostScript (EPS) files.
http://www.physics.byu.edu/Underg…
1/2
26/10/2008
Writing a thesis using LaTeX
Today, Adobe's Portable Document Format (PDF) is the standard for electronic documents. You can convert DVI documents into PDF documents, but normally you shouldn't use this option (the resulting PDF files are large and lack many linking features). Instead, the preferred way to create a PDF is to use PDFLaTeX, which creates a PDF directly from your LaTeX source. PDFLaTeX can include a number of graphics file formats in the finished PDF, but it can't include EPS files. When creating figures files for your thesis, you should save them in a format that can handle vector graphics (EPS or PDF) rather than one that only handles raster images (jpeg or png). This will make the print quality of the figures much higher. It is usually easier to create EPS files, so a common practice is to create all of your graphics in the EPS format and use plain LaTeX and DVI files (with the inverse search) to get your thesis into shape. Then, when you want to create a PDF of your thesis you can run a utility called "epstopdf" that creates a PDF graphics file from each of your EPS graphics. These PDF graphics files can be included in the PDF of your thesis when you run PDFLaTeX. To make this procedure work right, don't use file name extensions in the \includegraphics command (e.g. use \includegraphics{mygraphic} not \includefile{mygraphic.eps}). LaTeX will automatically look for files with an .eps extension, and PDFLaTeX will automatically look for files with a .pdf extension. How do I create an EPS graphics file? First you have to decide what program you will use to create your graphics. You should always use vector graphics (rather than raster graphics) for line drawings and plots. While we don't have a commercial vector drawing program available on the department computers, there are several workable options for you to create your graphics. Perhaps the easiest is to just use the drawing capabilities in PowerPoint. Most dedicated graphics programs let you export EPS files directly, but PowerPoint lacks this capability. However, you can make an EPS file from any program that can print using the following procedure: 1. Install a color PostScript printer driver on your computer and set it to print to a file. (Department computers may already have a driver installed.) If you need help installing a printer on a department computer, click here. 2. Print your drawing using the PostScript printer driver. Make sure you print only one page (i.e. one slide if you you are using PowerPoint). You will be prompted for a file name. Usually you should append a .ps extension to the name (and make sure you know where the file is being saved). 3. The PostScript file created in step 2 describes a graphic that is the size of a piece of paper with unwanted white space around your figure. To create an EPS file out of a postscript file you need to specify a bounding box (i.e. a rectangle that specifies the portion of the page that is of interest). The easiest way to do this is to use a PostScript utility called GSView. Open your file in GSView, go to the File menu, and select "PS to EPS". Make sure the box next to "Automatically calculate bounding box" is checked, and click yes. You will be prompted for a file name (usually use the .eps extension). Not all PostScript file s can be conve rte d to EPS using this proce dure , but it usually work s fine . The he lp file in GSVie w lists the crite ria tha t m ust be m e t for the conve rsion to work right.
The C hurch of Je sus C hrist of Latte r-day Saints | BYU-Hawa ii | BYU-Idaho | BYU Je rusale m C e nte r | BYU Salt Lak e C e nte r | LDS Busine ss Colle ge | Missionary Tra ining C e nte r
http://www.physics.byu.edu/Underg…
2/2