When a \nocite{*}
appears in the document, all entries in the .bib
database are automatically inserted in the bibliography, with the same order as specified by the chosen bibliography style, in the case of IEEEtran it's "unsorted".
Find the offending command and remove it, or place it at the end, where it won't influence the "unsorted" order of explicit citations. Of course, using \nocite{*}
in such a document requires organizing the .bib
file in some sensible order, so I'd recommend not using it. If you want to have some entry in the bibliography that wasn't cited in the document, use
\nocite{<key1>,<key2>,...}
just before the \bibliography{command}
, where the keys are ordered as you wish.
This is not a proper solution, but it works...
Add a "fake" key
field
key = {zzzz}
in all your @Misc
entries.
In this way the key
field is used for sorting (and zzzz
comes after all the other entries, I suppose), but it is not printed in the bibliography. BTW, I don't know any ALTeditor
field.
So, changing your bibliography MWE to
@Misc{wikianglais,
key = {zzzz},
title = {\url{http://www.wikipedia.org/wiki/Blackjack}},
month = {mai},
year = {2013}
}
@Book{Thorp,
author = {Edward O. Thorp},
ALTeditor = {},
title = {Beat the dealer},
publisher = {Vintage Books Edition},
year = {1966},
month = {février}
}
@Book{Braun,
author = {Julian H. Braun},
ALTeditor = {•},
title = {How to play winning Blackjack},
publisher = {Data House Pub. Co},
year = {1980}
}
should be enough.
A MWE just to test it:
\documentclass{report}
\usepackage[colorlinks]{hyperref}
\begin{filecontents}{\jobname.bib}
@Misc{wikianglais,
key = {zzzz},
title = {\url{http://www.wikipedia.org/wiki/Blackjack}},
month = {mai},
year = {2013}
}
@Book{Thorp,
author = {Edward O. Thorp},
ALTeditor = {},
title = {Beat the dealer},
publisher = {Vintage Books Edition},
year = {1966},
month = {février}
}
@Book{Braun,
author = {Julian H. Braun},
ALTeditor = {•},
title = {How to play winning Blackjack},
publisher = {Data House Pub. Co},
year = {1980}
}
\end{filecontents}
\begin{document}
\cite{wikianglais} \cite{Thorp} \cite{Braun}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
Best Answer
Here's a solution that should work with any bib file, including one in which the entries have been sorted in reverse alphabetical order.
First, insert the following instruction at the top of the bib file:
At first blush, the
\noop
instruction would seem to be pointless as it doesn't do anything with its argument. While this is true for the LaTeX typesetting run, it is not true for the BibTeX sorting phase. In fact, for the sorting phase of its job, BibTeX will replace\noop{abc}
withabc
and consider "abc
" to be a part of the material that needs to be sorted alphabetically.Second, assuming you have fewer than 26*26=676 entries in the bib file, insert
\noop{aa}
,\noop{ab}
, ...,\noop{az}
,\noop{ba}
,\noop{bb}
, ... instructions immediately (without space) before the surname of the first author in theauthor
field of each and every entry:(If you have more than 676 entries, just expand the string length of the argument of
\noop
suitably, e.g, toaaaa
,aaab
, etc.)Third, be sure to use a bibliography style file that sorts the bib entries alphabetically. The point of the
\noop
instructions should now be clear: For sorting purposes, the relevant surnames are "aaMiller", "abAnderson", and "acJohnson", and hence the three entries will be sorted in the same way they occur in the bib file (rather than Anderson followed by Johnson followed by Miller). Later, when LaTeX does its typesetting thing, it discards theaa
,ab
, etc prefixes, and the names will be typeset correctly.