Tips for using LaTex to produce your thesis/project documents

[ University Resources | LaTeX | BibTex | Miscellanea ]


University resources


LaTeX Master files

  • Download statthesis.tar.gz.
  • This folder includes a latex class file for projects and theses from the BYU Department of Statistics. The formatting commands in this class file represent the required Department of Statistics formatting and are consistent with university requirements as of August 2006.
  • Files contained in download:
    • A sample master.tex file---this is the only file you need to latex---it will call all the chapters, appendices, and the bibliography for your final document.
    • Sample chapter1.tex and chapter2.tex.
    • Sample bibliography.bib file---you can store in same directory as master file and chapter files, but some prefer to keep their references in their texmf/bibtex folder.
    • Class file statthesis.cls---you can store in the same directory as the master file and chapter files, but better to keep in texmf/tex folder.
    • Bibliography style asa.bst---you can store in the same directory as the master file and chapter files, but better to keep in texmf/bibtex.
    • Sample of finished document, master.pdf, in pdf form.
  • Particularly long titles may cause formatting concerns---see me in this case.


Bibtex

  • Use bibtex to track your references. In order to use bibtex, you need to create a .bib file. Each reference you cite will have a corresponding entry in this .bib file. These entries will look like:
     
    @article{ansc:1964,
      author={Francis John Anscombe},
      year={1964},
      title={Normal likelihood functions},
      journal={Annals of the Institute of Statistical Mathematics},
      volume={26},
      pages={1--19},
      keywords={likelihood},
    }
    @article{audi:clav:1997,
      author={Stephane Audic
             and Jean-Michel Claverie},
      year={1997},
      title={The significance of digital gene expression profiles},
      journal={Genome Research},
      volume={7},
      pages={986--995},
      keywords={SAGE, two-sample test},
    }
    
    See
    this site for details regarding other fields you can include.

    Notes re: making your bibfile:

    1. Use the same naming convention as CIS (CIS uses only four letters per author, excludes letters with diacritical marks, separates names with colons, lists a keyword after the last author, finishes with year of publication). CIS also lists advice on selecting keywords for your bibtex entries.
    2. For more than three authors, the first of which is, say C. Shane Reese, use rees:etal:2001.
    3. A good source of cut-and-paste bibtex references, in addition to the CIS, are CiteSeer and Cambridge Statistical Laboratory.
  • I like to use natbib for bibliographies. It seems to offer the greatest flexibility with respect to citation styles. In the preamble, include the line: \usepackage{natbib}
  • Cite references in the text using \citet{audi:clav:1997} (for citations within the text) or \citep{audi:clav:1997} (for parenthetical citations). See the natbib reference sheet for additional citation varieties (author only, specific chapter, year only, etc.).

    Pseudo text:

     The Dirichlet process (DP) prior, introduced by Ferguson (1973),
    \nocite{ferg:1973} and the Dirichlet process mixture (MDP) prior
    \citep{anto:1974}. In recent years, rapid progress in Bayesian
    computational methods, reviewed by \citet{mace:1998,esco:west:1998} 
  • Before the \end{document} command, add
    \newpage
    \newcommand{\bibdir}{\dirdir/gp/bibtex}
    \bibliography{\bibdir/bibfile}  
    \bibliographystyle{\bibdir/rlwjasa}  
    
  • To compile, you must
    latex filename.tex
    bibtex filename.tex
    latex filename.tex
    latex filename.tex


    Miscellaneous LaTex tips

    • Simone Grose maintains a site with lots of TeX and LaTex tips.
    • To change the font in an entire section of your LaTex document without using one of the named font sizes, try \fontsize{11}{12}\selectfont for 11 pt font and 12 pt baselineskip.
    • To change page layout mid-document, use the package chngpage.
    • To increase spacing in tables:
      \renewcommand{\arraystretch}{1.3}
      \renewcommand{\tabcolsep}{12pt}
      
    • To print only a selection of your thesis, use dvips -pp 13-15 -o page13_15.ps filename.dvi to print pages 13--15, inclusive.



     

    Send an email to Natalie Blades (nblades at stat dot byu dot edu) if you have suggestiong for additions, subtractions, clarifications, corrections, or modifications.