# Alphabetical order in natbib

I have read questions about this, and people say that it is just to include the natbib package and the plainnat style. For some reason my references will not sort alphabetically. Any help on this would be much appreciated! I am really new to LaTeX ...

My commands:

\documentclass[a4paper,norsk]{article}
\usepackage{amstext}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage[comma,authoryear]{natbib}
\usepackage[norsk]{babel}
\usepackage[hmargin=3cm,vmargin=3.5cm]{geometry}
\pagestyle{plain}

\begin{document}

\begin{thebibliography}{56}

\end{thebibliography}

\printindex

\bibliographystyle{plainnat}

\end{document}

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks , they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Kurt Feb 13 '13 at 13:07

The command to print the bibliography in natbib is \bibliography{<your-bib-file>}. You don't use \begin{thebibliography} ... \end{thebibliography}.

So the following document should work:

\documentclass[a4paper,norsk]{article}
\usepackage{amstext}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage[comma,authoryear]{natbib}
\usepackage[norsk]{babel}
\usepackage[hmargin=3cm,vmargin=3.5cm]{geometry}
\pagestyle{plain}

\begin{document}
Insert some \cite{} commands here to your citations.

\printindex

\bibliographystyle{plainnat}
\bibliography{<your-bib-file>} % Insert the name of your bib file here

\end{document}

-
I do not have a bib file, because I'm only going to use these for one article. Is it not possible to do it the simple way? Everything works as intended except for the alphabetibal references. –  Per Kvalvåg Feb 13 '13 at 13:42
@Per There is no automatic way to sort citations in the manual {thebibliography}` environment. You will save yourself time by creating a bib file with your references even if you don't use it again. See LaTeX and bibliography management tools. –  Alan Munn Feb 13 '13 at 14:36
Ok, will do that. Thank you! –  Per Kvalvåg Feb 13 '13 at 16:15