I am preparing a draft in two column format, but unfortunately I have a major problem: I have written my references in a separately text file and called that art-bib
, also I have used of
\begin{thebibliography}{}
\include{art-bib}
\end{thebibliography}
for summons that.
Although it calls references, but in such an arrangement on which had written reference file and not the order of calling them. For example:
The first sentence~\cite{ref5} and after that the second sentence~\cite{ref10} and so on..
It writes to me as:
The first sentence [5] and after that the second sentence [10] and so on..
I expect I have :
The first sentence [1] and after that the second sentence [2] and so on..
Best Answer
If you compile the following example
LaTeX produces
Using
\input{art-bib}
, whereart-bib.tex
contains the bibliographic data, is the same. Don't call\include
for this in any case: it is wrong.LaTeX does no sorting whatsoever. You can do this without using BibTeX, provided you add some macros and type in the bibliographic data in a different way.
This is not provided by the LaTeX kernel, because BibTeX is much better at it. Prepare a file
art-bib.bib
containingThen your document can be
Let's say your main file is named
myarticle.tex
. Upon compilation withpdflatex myarticle
, you runbibtex myarticle
and againpdflatex
(twice if the terminal tells you to).The output will be essentially the same. The big advantage is that the data in
art-bib.bib
is reusable in several different formats, as specified by the bibliography style you select with the\bibliographystyle
command.Note that the above type of sorting is only possible with the order of citation. Alphabetical sorting by author can only be obtained with BibTeX or its successors
biblatex
/Biber.