# Help with bibliographystyle in LaTeX

I seem to be getting nowhere with my bibliography in LaTeX. Below is what I am using within my document. My reference page is blank for some reason.

Here is the main document structure:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{amsmath,amssymb}
\usepackage{fancyvrb}
\usepackage{cite}

\begin{document}

As shown in \cite[sec]

\bibliography{myref}
\bibliographystyle{ieeetr}

\end{document}


I also have a file name myref.bib. Below is an example of a reference I am trying to use, which is declared in the myref.bib file.

 @ONLINE
{sec,
AUTHOR  = "Author.N",
TITLE   = "{Title goes here}",
URL = {http://www.here.com},
URLYEAR = 2012,
PRESORT="aa"
}


Does anyone have any ideas?

-
First, don't load both the natbib and cite packages; I suggest you only load the natbib package. Second, I don't think that the bibliography style file ieeetr.bst is one of the standard bibliography style files; did you maybe mean to specify ieeetran(.bst)? Third, one must encase the argument of a \cite command in curly braces, not square brackets. Fourth, be sure to also load the url package. Last but not least, be sure to run latex, bibtex, and latex twice more on your file. If these things don't work, check the .log and .blg files for errors and warning messages. – Mico Dec 13 '12 at 22:14
are you ensure to run bibtex with yourfile.aux and re-latex? If you did this must have a .blg and .bbl files in the directory – Luis Parrado Dec 15 '12 at 23:35

Please try the following MWE, it compiles on my system:

\listfiles    % shows list of used packages in log file
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@ONLINE{sec,
AUTHOR  = {Author.N},
TITLE   = {Title goes here},
URL     = {http://www.here.com},
URLYEAR = {2012},
PRESORT = {aa},
}
\end{filecontents*}

\documentclass{article}     % article IEEEtran
\usepackage[utf8]{inputenc}
%\usepackage{natbib}        % throws error
\usepackage{graphicx}
\usepackage{amsmath,amssymb}
\usepackage{fancyvrb}
\usepackage{cite}

\begin{document}

As shown in
\cite{sec}
%\cite[sec].                 % [] throws error/warning

\bibliographystyle{IEEEtran} % ieeetran
\bibliography{\jobname}

\end{document}


I have included the bib file in the MWE, changed the call with \cite ({} instead of []) and corrected the bibliography style.

-
This doesn't work for me at all, still get the same problem – mitchnufc Dec 13 '12 at 22:05
Do you have error messages in the log or blg file? Which tex distribution do you use? Please add \listfiles at the beginning of the MWE and add the list of used packages from the log file in your question. – Kurt Dec 13 '12 at 22:27
I access the sharedLaTeX url to create my documents. – mitchnufc Dec 13 '12 at 22:53
@mitchnufc If you mean shareLaTeX, I just tested this MWE there and it works fine. Please, read Kurt's answer carefully and see if you still have problems. As it is now, your question tends to be closed as not a real question. – henrique Dec 13 '12 at 23:19