3

I'm very new to Texmaker and BibTeX. Need to get references in the order of appearances in my article, but it keeps showing order of authors. I've found similar questions and tried to change abbrv to unset, but it doesn't work. Really appreciate for help!

I'm using thesis template and as you can see, I've already change style from abbrv to unsrt

\documentclass[master=eelt,masteroption=ei]{kulemt}
\setup{title={The best master thesis ever},
  author={First Author\and Second Author},
  promotor={Prof.\,dr.\,ir.\ Knows Better},
  assessor={Ir.\,Kn. Owsmuch\and K. Nowsrest},
  assistant={Ir.\ An~Assistent \and A.~Friend}}
% The following \setup may be removed entirely if no filing card is wanted
\setup{filingcard,
  translatedtitle=,
  udc=621.3,
  shortabstract={Here comes a very short abstract, containing no more than 500
    words. \LaTeX\ commands can be used here. Blank lines (or the command
    \texttt{\string\pa r}) are not allowed!
    \endgraf \lipsum[2]}}
% Uncomment the next line for generating the cover page
%\setup{coverpageonly}
% Uncomment the next \setup to generate only the first pages (e.g., if you
% are a Word user.
%\setup{frontpagesonly}

% Choose the main text font (e.g., Latin Modern)
\setup{font=lm}

% If you want to include other LaTeX packages, do it here. 

% Finally the hyperref package is used for pdf files.
% This can be commented out for printed versions.
\usepackage[pdfusetitle,colorlinks,plainpages=false]{hyperref}

%%%%%%%
% The lipsum package is used to generate random text.
% You never need this in a real master thesis text!
\IfFileExists{lipsum.sty}%
 {\usepackage{lipsum}\setlipsumdefault{11-13}}%
 {\newcommand{\lipsum}[1][11-13]{\par And some text: lipsum ##1.\par}}
%%%%%%%

%\includeonly{chap-n}
\begin{document}

\begin{preface}
  I would like to thank everybody who kept me busy the last year,
  especially my promotor and my assistants. I would also like to thank the
  jury for reading the text. My sincere gratitude also goes to my wive and
  the rest of my family.
\end{preface}

\tableofcontents*

\begin{abstract}
  The \texttt{abstract} environment contains a more extensive overview of
  the work. But it should be limited to one page.

  \lipsum[1]
\end{abstract}

% A list of figures and tables is optional
%\listoffigures
%\listoftables
% If you only have a few figures and tables you can use the following instead
\listoffiguresandtables
% The list of symbols is also optional.
% This list must be created manually, e.g., as follows:
\chapter{List of Abbreviations and Symbols}
\section*{Abbreviations}
\begin{flushleft}
  \renewcommand{\arraystretch}{1.1}
  \begin{tabularx}{\textwidth}{@{}p{12mm}X@{}}
    LoG   & Laplacian-of-Gaussian \\
    MSE   & Mean Square error \\
    PSNR  & Peak Signal-to-Noise ratio \\
  \end{tabularx}
\end{flushleft}
\section*{Symbols}
\begin{flushleft}
  \renewcommand{\arraystretch}{1.1}
  \begin{tabularx}{\textwidth}{@{}p{12mm}X@{}}
    42    & ``The Answer to the Ultimate Question of Life, the Universe,
            and Everything'' according to \cite{h2g2} \\
    $c$   & Speed of light \\
    $E$   & Energy \\
    $m$   & Mass \\
    $\pi$ & The number pi \\
  \end{tabularx}
\end{flushleft}

% Now comes the main text
\mainmatter

\include{intro}
\include{chap-1}
\include{chap-2}
% ... and so on until
\include{chap-n}
\include{conclusion}

% If you have appendices:
\appendixpage*          % if wanted
\appendix
\include{app-A}
% ... and so on until
\include{app-n}

\backmatter
% The bibliography comes after the appendices.
% You can replace the standard "abbrv" bibliography style by another one.

**\bibliographystyle{unsrt}
\bibliography{references}**

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
  • Welcome TeX.SX! Would you mind preparing a short MWE? As normally unsrt should order by appearance. – moewe Oct 17 '13 at 21:27
  • 3
    Replace Line 55 \bibliographystyle{plain} to \bibliographystyle{unsrt} and dowload sample.bib in same folder and run pdflatex, bibtex pdflatex and pdflatex in TeXmaker. Is the output what you want ? – texenthusiast Oct 17 '13 at 21:31
  • Unfortunately, your MWE is not so minimal that I could try it on my PC, but if you use unsrt the bibliography should be sorted by appearance. Do you get any errors? – moewe Oct 17 '13 at 21:48
  • I didn't get any errors. When I run bibtex, it shows: – April Xu Oct 17 '13 at 21:56
  • Process exited normally. – April Xu Oct 17 '13 at 21:57
  • Did you use the proper order of command calls as described by texenthusiast above? If that does not help either, consider creating a shorter MWE (or here): get rid of all the \setups and example paragraphs, \inlcudes etc.; create some sample citations with filecontents and describe exactly what you get and what you expected. – moewe Oct 17 '13 at 22:01
  • 1
    please trim down your MWE to a simple example that can reproduce your situation. what does kulemt.cls contain related to bibliography ? Please run my above example to get a feel of problem. – texenthusiast Oct 17 '13 at 22:01
  • I run your sample and that is exactly what I need now! After changing plain to unsrt, the order of references changes. But as I said in the beginning. I've already tried changing \bibliographystyle{abbrv} to \bibliographystyle{unsrt}. And nothing happens. I'm not very clear about what you said about kulemt.cls – April Xu Oct 17 '13 at 22:11
  • Just to be clear: after changing plain to unsrt you have to save the file, run latex again, then bibtex again and then latex 2 more times. Did you do all that? – Dan Oct 17 '13 at 22:17
  • @AprilXu I mean your custom \documentclass{kulemt}. @Dan TeXmaker saves before proceeding to run pdflatex. Guess: Remove the .aux files generated and rerun pdflatex bibtex pdflatex pdflatex sequence – texenthusiast Oct 17 '13 at 22:17
  • @texenthusiast The point was to run all the programs listed. I don't know what TeXmaker does with regard to bibtex. Does it automatically run bibtex and then latex a couple of times more? Certainly at least latex + bbtex + latex is required to see any changes. – Dan Oct 17 '13 at 22:23
  • 1
    Thanks so much!!! It works! Just remove the .aux files and rerun. – April Xu Oct 17 '13 at 22:26
  • I like texstudio better, and biblatex moreso than bibtex. – Nicholas Hamilton Oct 17 '13 at 22:30
  • Use TeXmaker Tools->Cleanto clear off the auxiliary files and converted my useful comments to answer – texenthusiast Oct 17 '13 at 22:40

1 Answers1

2

enter image description here

Related Q's

Force TeXworks to refresh bib file

Package natbib Error: Bibliography not compatible with author-year citations