Skip to main content

Latex Hints

Setting up LaTeX on a PC

  1. Download and install the latest version of MikTeX from Be sure to select the option that installs all of the available packages
  2. Download and install the latest version of Ghostscript from
  3. Download and install eithera. WinEdt from (best buts costs $40)b. TexStudio from is free and cross-platform, although Mac implementation is not the greatest.c. TexMaker free and Qt based so is cross-platform. Better than TexStudio on Mac, but on Windows TexStudio is better.c. TeXnic Center from (free!)
  4. Unzip and place these executable and batch files in a directory contained on your path: (c:/texmf/miktex/bin works)
  5. Download and install the wmf2eps from
  6. Download and install TexPoint from The utility allows you to insert equations formatted using LaTeX in powerpoint presentations, although consider using the Beamer LaTeX template found on the previous page.
  7. Some individuals like to use Sumatra PDF to view the output of LaTeX since it doesn't go back to the beginning of the document if have it open and recompile. However texstudio does this natively.

Organizing your files

Dr. Beard suggests the following directory structure or a variant of it:

Screen Shot 2020-05-01 at 11.38.44 AM.png

Each paper that is written gets it's own folder. The figures subfolder contains all the graphics files associated with the paper. The matlab subfolder contains all of the matlab files used to create the simulation results reported in the paper. Note the if you use Mendeley custom bibtex files can easily be exported for each paper.

Compiling your first document

If using WinEdt:

  1. Create a folder under your latex directory. Create a subfolder called figures.
  2. Copy the file template.tex into the folder and open it with WinEdt.
  3. Compile by clicking on the button with the Brown LaTeX Bear.
  4. To view a dvi version of the paper click on the dvi button.
  5. To create a pdf version click on the dvipdf button.
  6. To view a pdf version click on the pdf button.

If using TeXnicCenter:

  1. Create the folders and copy the file from above.
  2. Open it with TeXnicCenter
  3. In the Output Profile dropdown, select LaTeX - DVI - PDF
  4. Click the Build and View Current file button (has arrow pointing down and a magnifying glass)

If using TexStudio:

  1. Create folders and copy the template file from above.
  2. Open it with TexStudio
  3. Build and view the document
  4. TexStudio's own PDF viewer allows you to right click and find the code from the PDF or right click in the code to find the place in the PDF (very handy!)

Note that you initally have to compile a document 2-3 times for the typesetter to get all the references figured out. A DVI file is the compiled output of a LaTeX file in a highly portable format for printing. In many cases it's better to output to a PostScript file or just a pdf.

Adding a figure

  1. Open powerpoint and create a figure.
  2. Select the figure and copy it to the windows clipboard.
  3. Open wmf2eps and paste from the clipboard.
  4. Set the output directory to the appropriate figures folder and convert to eps using the appropriate button.
  5. Include the following text in template.tex:[insert screenshot here]
  6. In template.tex, you can refer to the figure with text like the following:Figure~\nef{fig:figurename} shows some cool results.
  7. Compile it in WinEdt or TeXnicCenter.

Adding a Matlab Figure With Embedded Fonts

Most places you will publish (and your thesis) now require that all the fonts in a PDF file be embedded so that they display properly on any machine. If you save your matlab figures as PDFs, it will not embed the fonts and then you will be in trouble at submission time (or when you are trying to finish your thesis). Instead of saving your figures as PDFs, you should print to PDF. If you do not have PDF printing (in windows try, you should ask about having Adobe installed on your machine.

  1. Format your figure how you want it (make sure the font size for the axis labels is big enough, I use a size 14 font)
  2. Select print
  3. Select your favorite PDF printer
  4. Print
  5. Place the image in your ../Figures folder so that it can be accessed by Latex.

You can check to see that your PDF files have embedded fonts by:

  1. Open the pdf in Adobe Acrobat Reader
  2. Go to File -> Properties
  3. Open the "Fonts" tab
  4. Examine all the fonts in the file. If all of them say at leasted "Embedded Subset", you are fine.

Adding a jpg Photograph

  1. Assuming that the photograph is located in the jpeg2ps folder and is called coolphoto.jpg, convert to eps format by using the following command (entered at a DOS prompt): jpeg2eps coolphoto
  2. Include eps figure using the instructions given above.

In doing research, it is essential to carefully study related work in the field. In doing so, it is critical to efficiently organize the papers that you have read in a system that allows you to quickly find papers on a related subject. After experimenting with various systems, I (Dr. Beard) have converged on the following organization structure that you may want to try as an initial starting place.

  1. I maintain a *single* file called refs.bib in the directory My Documents > latex >> bib that contains bibliography information about all of the papers that I have read. Copy the following gutted version of refs.bib to your directory, and open using WinEdt.
  2. As an exercise, insert a reference to the paper[insert screenshot here]The article key is McLainBeard05 which is used to reference the article inside a latex file. For consistence, I always create an electronic version of papers that I have read and save them to the folder My Documents > latex >> bib >>> library under the same name used for the article key. For the example given above, the paper is McLainBeard05.pdf. This allows me to quickly find papers that I have read using the bibliography file refs.bib. Everything contained inside of the "abstract" field is ignored when the reference list is compiled. Therefore, I use this field to insert keywords that will make it easy for me to find the paper, and a short description of what is in the paper. I use the description to help me write literature surveys in papers.
  3. Include the following text right before \end{document} in template.tex:
    1. \bibliographystyle{plain}
    2. \bibliography{../../bib/refs}
  4. In the body of the text reference the paper using text like the following:
    1. A discussion of coordination variables is given in Reference~\cite{McLainBeard05}.
    2. The tilde is a non-breaking space that makes sure the word "Reference" and the actual reference number appear on the same line.
  5. Compile using WinEdt by running latex -> bibtex -> latex -> latex


Use the following LaTeX template for MS thesis or PhD dissertation: byustyle.sty (EE Students)
LaTeX Prospectus Template (ME Students)
LaTeX Thesis Template (ME Students)
MS Word Thesis Template (Use only if you want to learn the hard way that LaTeX is superior to Word! Seriously--you should learn LaTeX.)
Templates current as of March 2013

Other Tips

If everything prints on A4 paper then do the following:

Screen Shot 2020-05-01 at 12.07.28 PM.png

3.When you print your PDF, in the print dialog box change the scaling option to "None". By default it is set to "Fit to printer margins". Failure to do so will result in bad margins

Other Resources

Additional LaTex Instructions