Skip to Main Content

Math Majors’ Seminar

Suggestions for researching the literature in mathematics.

What You Need to Remember

This page reminds you of the essentials in your .tex file and .bib file in order to make your BibTeX citations and LaTeX work happily together.  If you have any questions email me or your professor!

.tex file

What you need to remember when working on with your .tex file regarding citations:

  • \cite{record_name} : When you are citing a source in the text of your .tex file you need to write \cite{record_name} where the record name is taken from the area of your .bib file that looks like this: @article{Jones2015.
    • Keep in mind the actual "record_name" doesn't matter.  It can be a string of letters and numbers, a name, whatever.  Just keep it consistent between your .tex file and your .bib file.
  • \bibliographystyle{style_name}: You have to tell LaTeX what bibligraphy style you want to use in order to output the in-line and references correctly.  This is done towards the end of the .tex file by writing \bibliography{style_name} where "style_name" is the style.
    • Some of the common styles are programmed into WriteLaTeX such as {plain} and {apalike}. 
    • Others, like the one you are going to use in this class {agsm} need two more things to make it work in LaTeX
      • A .sty file (which you should have been given) and 
      • \usepackage{harvard} at the top of your .tex file (which you should also already have). 
  • \bibliography{name_of_bib_file}: In order for LaTeX to know what .bib file to pull your references from you have to tell it.  So after \bibliographystyle{agsm} you want to write on another line \bibligraphy{name_of_bib_file} where {name_of_bib_file} is the name of your .bib file (minus the .bib). 
    • Example: So if your .bib file is named Math_2094.bib then you need to write \bibligraphy{Math_2094} so it knows where to pull your citations from.


What you need to remember when working on your .bib file regarding citations:

  • @book, @article, @misc, @conference: These are telling LaTeX that the information that follows is either a book, an article, misc, etc.  Do not change that information unless it is incorrect because LaTeX uses that info to create a properly formatted bibliography. 
  • Use the export citation feature on almost any database to output in BibTeX format and copy and paste into your .bib file to avoid having to type this all in by hand.
  • When you have to do it by hand, follow the template your professor gave you for that particular type--book, article, conference proceeding etc.
    • For websites use @misc