You are on page 1of 44

Referencing in LaTex

Recall the following method of referencing

Rolando V. Raqueño

1

Thursday, December 27, 2012

Making references in LaTeX (fish.tex)
\documentclass{article} \begin{document} \emph{My mother} is a \underline{fish} \cite{WF}. \begin{thebibliography}{99} \bibitem{WF} William Falkner, \emph{As I Lay Dying} \end{thebibliography} \end{document} 2 Rolando V. Raqueño Thursday, December 27, 2012

Need to compile the document twice
• Because we are using symbolic references, e.g., \cite{WF},
– a second pass is necessary

• The second pass will resolve references

Rolando V. Raqueño

3

Thursday, December 27, 2012

Rolando V. Raqueño

4

Thursday, December 27, 2012

Problem with this method • User is burdened with deciding how to format article titles. proceeding references • Difficult to reuse references in other documents Rolando V. December 27. journal names. Raqueño 5 Thursday. 2012 .

Quick BibTex Tutorial Rolando V. Raqueño 6 Thursday. December 27. 2012 .

Raqueño 7 Thursday. December 27. 2012 .BibTex Tutorial • Why do you want to learn BibTex? • Nuts and Bolts of BibTex • Examples Rolando V.

2012 .Why you want to learn BibTex • Complements LaTeX documents by managing bibliography and references • Minimizes the drudgery of formatting. numbering. Raqueño 8 Thursday. December 27. and referencing • Disadvantage: – Steep Learning Curve Rolando V.

View the dvi or pdf file Rolando V. “Compile” or “Build” your LaTeX document to create an *. Create a BibTex file with Rerefence entries 2. Get a *. December 27.aux file 4. Run BibTeX on your LaTeX file 5. Run LaTeX twice on your updated file 6.bst file (bibliographic style file) 3.The BibTex Process 1. 2012 . Raqueño 9 Thursday.

Types of Documents BibTex can handle • • • • • • • ARTICLE BOOK BOOKLET INBOOK INCOLLECTION INPROCEEDINGS MANUAL • • • • • MISC PHDTHESIS PROCEEDINGS TECHREPORT UNPUBLISHED Rolando V. Raqueño 10 Thursday. 2012 . December 27.

• • • • • • • • • • • • address author booktitle chapter crossref edition editor howpublished institution journal key language Each Document type can have the following entries • • • • • • • • • • • • month note number organization pages publisher school series title type=“Ph.D. December 27. dissertation” volume year Thursday. Raqueño 11 . 2012 Rolando V.

bib) @BOOK{Press. Raqueño 12 Thursday. 2012 . year=1992. author="W. Press".Sample BibTex Book Entry (mybib. publisher="Cambridge University Press".H. } Rolando V. December 27. title="Numerical Recipes in C: The Art of Scientific Computing".

Robertson". Berk and L.S. MA". number="GL-TR-89-0122".C.Sample BibTex Technical Report Entry @TECHREPORT{Berk. institution="Spectral Science". Bernstein and D. year = 1989 } 13 Rolando V. Raqueño Thursday. author="Lex A. December 27. 2012 . title="MODTRAN: a moderate resolution model for LOWTRAN 7". address = "Burlington.

Dissertation Entry @PHDTHESIS{Kuo. } 14 Rolando V. December 27. address="Ithaca. year=1981. school="Cornell University". Raqueño Thursday. NY". 2012 .Sample BibTex Ph. author="Jan-Tai Kuo". title="The Influence of Hydrodynamic Transport on Phytoplankton Dynamics in Homogeneous Lakes".D.

school="Rochester Institute of Technology". Knobelspiesse". title="Atmospheric Compensation for SeaWIFS Images of Lake Superior Utilizing Spatial Information". month=Sep. 2012 . December 27. } Rolando V. NY". addess="Rochester. Raqueño 15 Thursday.Sample BibTex Master’s Thesis Entry @MASTERSTHESIS{Knobelspiesse. year=2000. author="Kirk D.

K.V. author="Anthony Vodacek and F. Hoge and R. Blough". journal="Limnology and Oceanography". Peltzer and N. title="The use of in situ and airborne fluorescence measurements to determine UV absorption coefficients and DOC concentrations in surface waters". 16 } Rolando V. number=2. December 27.Sample BibTex Article Entry @ARTICLE{Vodacek. Raqueño Thursday. Yungel and E.E. 2012 . Swift and J.T.N. pages="411--415". volume=40. year=1995.

Sherwood". 2012 . } Rolando V. month="November". New York". howpublished="USGS Fact Sheet 128-99". title="Phosphorus Loads Entering Long Pond. Raqueño 17 Thursday. year=1999. author="D. A Small Embayment of Lake Ontario near Rochester.Sample BibTex Booklet Entry @BOOKLET{Sherwood.A. pages=4. December 27.

2012 .Sample BibTex Proceedings Entry @INPROCEEDINGS{Stoermer. Stoermer".F. pages="137--150". Michigan vicinity during thermal bar conditions". } Rolando V. December 27. year=1968. title="Nearshore phytoplankton populations in the Grand Haven. booktitle="Proceedings of the 11th Conference on Great Lakes Research". author="E. Raqueño 18 Thursday.

month="September". author="RSI". organization="Research Systems Incorporated". address="Boulder. Raqueño 19 Thursday.Sample BibTex Manual Entry @MANUAL{RSI. 2012 . December 27. CO". publisher="Reasearch Systems Incorporated". year=2001. howpublished="PDF File". title="ENVI User's Guide". } Rolando V.

bst Rolando V. go to – http://www.Different Formatting Styles • To invoke a particular style.org • Document styles are defined in *.sty • Bibliography styles are defined in *.bst – amsplain. December 27.bst files – mla. Raqueño 20 Thursday. 2012 .sty – bmsplain.sty files – mla.ctan.

December 27.To invoke these styles in your document • Copy them to your current working directory with your LaTeX and BibTex document • Edit your LaTeX file to appropriately reference these style guides Rolando V. Raqueño 21 Thursday. 2012 .

tex) \documentclass{report} \usepackage{mla} \begin{document} \bibliographystyle{mla} \bibliography{mybib} \nocite{*} \end{document} Rolando V. 2012 .Sample LaTeX document listing Bibliography in MLA Style (bib. December 27. Raqueño 22 Thursday.

December 27. 2012 .tex xdvi bib.tex latex bib.aux latex bib.tex bibtex bib.Commands to Build and View Document To use xdvi viewer % % % % % latex bib. Raqueño 23 Thursday.dvi Rolando V.

December 27.Rolando V. 2012 . Raqueño 24 Thursday.

Sample LaTeX document listing Bibliography in AMS Style (bib.tex) \documentclass{report} \begin{document} \bibliographystyle{amsplain} \bibliography{mybib} \nocite{*} \end{document} Rolando V. Raqueño 25 Thursday. 2012 . December 27.

Raqueño 26 Thursday. December 27.Rolando V. 2012 .

2012 . December 27.To include only cited articles we remove the \nocite{*} command \documentclass{report} \begin{document} We want to get the documents \cite{RSI} and \cite{Kuo} for our collection \bibliographystyle{amsplain} \bibliography{mybib} \end{document} Rolando V. Raqueño 27 Thursday.

Rolando V. 2012 . Raqueño 28 Thursday. December 27.

} Rolando V. 2012 . volume=3059. editor="Ram Mohan Narayanan and James E. Jr.Cross-referencing in Proceedings @PROCEEDINGS{Narayanan. year=1997. Kalshoven. booktitle="Proceeding of SPIE". title="Advances in Laser Remote Sensing for Terrestrial and Oceanographic Applications".". December 27. Raqueño 29 Thursday. publisher="SPIE".

title="Recent results in imaging lidar". December 27. Ulrich and P.Article in Proceedings @INPROCEEDINGS{Ulrich. 2012 . Moran and M. crossref="Narayanan".L. DeWeert". author="B.E. Lacovara and S. } Rolando V.J. pages="95--108". Raqueño 30 Thursday.

December 27. Raqueño 31 Thursday. 2012 .Rolando V.

2012 . Raqueño 32 Thursday.Miscellaneous LaTeX Topics Rolando V. December 27.

Comments in LaTeX % – Ignores the rest of the line Rolando V. 2012 . Raqueño 33 Thursday. December 27.

My\_Cat.To protect special characters • Use the \ character – e.g. Raqueño 34 Thursday. December 27. 2012 .raw • To typeset a section as typed \begin{verbatim} \end{verbatim} Rolando V.

Raqueño 35 Thursday. 2012 . December 27.Verbatim command • OK for small sections that can be typed into document • What about including entire source code of programs – Use verbatim package Rolando V.

pro} \end{document} Rolando V. Raqueño 36 Thursday. December 27. 2012 .Including Source code in LaTeX documents \documentclass{article} \usepackage{verbatim} \begin{document} \begin{equation} \label{E:sum} s = \sum_{i=1}^{n}x_{i} \end{equation} The code as implemented in idl in vectorized form looks like \verbatiminput{sum.

Rolando V. 2012 . December 27. Raqueño 37 Thursday.

use pnmtops. December 27.ps • -norotate keeps from auto-rotating the image • -nosetpage keeps from setting to a specific device • Need to include an extension package to LaTeX called graphics using command \usepackage{graphics} Rolando V. Raqueño 38 Thursday.pgm > MyCat.Including image graphics into you LaTeX document • Need to convert your image graphics into EPS • For images.g. e. % pnmtops –norotate –nosetpage MyCat. 2012 .

December 27. 2012 .ps} \caption{This is My Cat} \label{F:MyCat} \end{figure} \end{document} Rolando V.tex) \documentclass{article} \usepackage{graphics} \begin{document} \begin{figure} \includegraphics{MyCat. Raqueño 39 Thursday.Image Graphics Example (image.

2012 .Rolando V. Raqueño 40 Thursday. December 27.

Raqueño 41 Thursday.ps • OR User xfig because it will export to EPS • Shareware utility called WMF2EPS – Windows clipboard objects to EPS Rolando V. 2012 . December 27.Flowchart Figures • Create Flowchart in PowerPoint • Export as a bmp file • Convert from bmp to postscript % bmptoppm figure.bmp | pnmtops – norotate –nosetpage > figure.

December 27.Because current pdflatex cannot include Encapsulated Postscript Files (EPS)… • Need to go from dvi to postscript to pdf using the following commands % dvips image. 2012 .ps • Some degradation in quality is observed Rolando V.dvi % ps2pdf image. Raqueño 42 Thursday.

Rolando V. December 27. 2012 . Raqueño 43 Thursday.

Rolando V. December 27. 2012 . Raqueño 44 Thursday.