# Bibliography in reverse order of entrance in .bib

When I type:

@ARTICLE{article1,
author  = {AAA},
title = {New Method1},
year    ={2013},
journal = {SuperJournal},
}

@ARTICLE{article2,
author  = {BBB},
title = {New Method2},
year    ={2013},
journal = {SuperJournal},
}


the desirable order is

[1] BBB,Article2,...

[2] AAA, Article1,..

In other words, I want the opposite of what \bibliographystyle{unsrt} give me. Anyone?

EDIT. I extend the question by addidng more information. I want to import files from publications.bib using multibib package.

 documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}

\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\makeatother
\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}

% bibliography with mutiple entries
\usepackage{multibib}

\newcites{article}{{Articles}}

.
.
.

\section{Publications}

\nocitearticle{article1, article2}
\bibliographystylearticle{unsrt}
\bibliographyarticle{publications}

\end{document}

-
Use \bibliographystyle{plain} –  Marco Daniel Apr 13 '13 at 12:39
@MarcoDaniel But I dont want an alphabetical order. I tried that and it didnt work. –  Makaroni Apr 13 '13 at 12:40
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Marco Daniel Apr 13 '13 at 12:43
@MarcoDaniel I edited the question. Please see detailed explanation. –  Makaroni Apr 13 '13 at 12:54
@MarcoDaniel Oh, sorry for rather trivial and silly question. I just need to change \nocitearticle{article1, article2} to \nocitearticle{article2, article1}. Thanks anyway for quick responce! Edit. I can use your answer as well. –  Makaroni Apr 13 '13 at 12:59

You can use the bibliography style plain. The compilation steps are shown by the rules of arara.

% arara: pdflatex
% arara: bibtex
% arara: pdflatex
% arara: pdflatex
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@ARTICLE{article1,
author  = {AAA},
title = {New Method1},
year    ={2013},
journal = {SuperJournal},
}

@ARTICLE{article2,
author  = {BBB},
title = {New Method2},
year    ={2013},
journal = {SuperJournal},
}
\end{filecontents}

\begin{document}
\cite{article2} and \cite{article1}
\bibliography{\jobname}
\bibliographystyle{plain}
\end{document}


With the result:

-

If the .bib file doesn't have anything strange, that is it contains only @article or @book entries (all kinds of entries are supported, but not @STRING or @COMMENT), the following should do.

We read the .bib file building a list of the keys in reversed order, then issue the relevant \nocite command.

\begin{filecontents*}{\jobname.bib}
@ARTICLE{article1,
author  = {AAA},
title = {New Method1},
year    ={2013},
journal = {SuperJournal},
}

@ARTICLE{article2,
author  = {BBB},
title = {New Method2},
year    ={2013},
journal = {SuperJournal},
}

@ARTICLE{article3,
author  = {CCC},
title = {New Method2},
year    ={2013},
journal = {SuperJournal},
}

@ARTICLE{article4,
author  = {DDD},
title = {New Method2},
year    ={2013},
journal = {SuperJournal},
}

@ARTICLE{article5,
author  = {EEE},
title = {New Method2},
year    ={2013},
journal = {SuperJournal},
}
\end{filecontents*}

\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
{
}
\clist_new:N \g_makaroni_keys_clist

\group_begin:
\char_set_catcode_active:n { \^^A }
{
\group_begin:
\char_set_catcode_active:n { \@ }
\group_begin:
\char_set_lccode:nn { \^^A } { \@ }
\tl_to_lowercase:n
{
\group_end:
\cs_set_eq:NN ^^A \__makaroni_active_at:w
}
\input{#1.bib}
\group_end:
\exp_args:Nx \nocite { \g_makaroni_keys_clist }
}
\group_end:

\cs_new_protected:Npn \__makaroni_active_at:w #1#
{
\__makaroni_process_entry:n
}
\cs_new_protected:Npn \__makaroni_process_entry:n #1
{
}
\cs_new_protected:Npn \__makaroni_add_key:w #1 , #2 \q_stop
{
\clist_gput_left:Nn \g_makaroni_keys_clist { #1 }
}
\ExplSyntaxOff

\begin{document}


The filecontents* environment is just to make the example self contained.
The method is similar to the one employed in usebib.sty. The @ is made active and defined to read up to the first brace; then another macro is called that absorbs the entire entry and calls another one that isolates the key, adding it to the left of a comma list variable. Then, after ending the file to read, a \nocite command is issued with the (expanded) clist contents as its argument.