[texhax] tip: bibTeX: testing a .bib

Fehd, Ronald J. (CDC/CCHIS/NCPHI) rjf2 at cdc.gov
Fri Dec 22 22:59:24 CET 2006


Here is the test document that I use to test my .bib files;
the output .pdf contains live urls

- - - sas-press.bat - - -
set filename=sas-press
call del      %filename%.aux
call del      %filename%.bbl
call del      %filename%.blg
call pdfLaTeX %filename%
call pdfLaTeX %filename%
call   bibTeX %filename%
call pdfLaTeX %filename%
call pdfLaTeX %filename%

note: this .tex must be same name as .bib
see sas-press.bib in an earlier e-mail

- - - sas-press.tex - - -
\documentclass[12pt]{article}
\title{\jobname\ Bibliography Test
\\using packages: \texttt{unsrtnat, url, hyperref}}
\author{scribe: Ronald J. Fehd
\thanks{please e-mail comments and corrections to
\url{mailto:RJF2 at cdc.gov}}}

%\bibliographystyle{abbrvnat}%provides live url
\bibliographystyle{plainnat}%provides live url
%\bibliographystyle{unsrtnat}%provides live url
%\bibliographystyle{plain}%ref: [1]... In sugi31 [2]. \newline [2]
%\bibliographystyle{unsrt}%ref: [1]... In sugi31 [2]. \newline [2]
%\bibliographystyle{alpha}%ref: [Jan06] ... In sugi31 [2]. \newline
[sug06]
%\bibliographystyle{abbrv}%ref: [1] ... In sugi31 [sug06]. \newline [2]

\usepackage[numbers]{natbib}%usage: \citet{key} returns: NameLast
[cite-#]
\usepackage{url}%
\usepackage[bookmarks
%,pagebackref%adds -1- at end of each bib entry
   ,colorlinks,pdfpagemode=UseOutlines,
   ,pdfauthor={Ronald J. Fehd}
   ,pdftitle={\jobname}
   ,bookmarks   = false
   ,pdfstartview={FitH}%Fit width of page to window
]{hyperref}%
\begin{document}%%%%%%%%%%%%%%%%%%%%%%%%
\maketitle
\nocite{*}%*list all in *.bib
\bibliography{\jobname}%generates thebib environment
\end{document} %%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




More information about the texhax mailing list