1

What is the EASIEST solution to sort the citation in order ? Currently mine showing [1] then [5] then [4]..... So many threads asking about the same problem but doesnt work for me. My code below. I Using natbib.

\documentclass[pdftex,12pt,a4paper]{report}
\usepackage{titlesec}
\titleformat{\chapter}{\bfseries\huge}{\thechapter.}{20pt}{\huge}

\usepackage[top=3cm, bottom=3cm, left=3.5cm, right=3cm]{geometry}

% graphics images
\usepackage[pdftex]{graphicx}
\usepackage[toc,page]{appendix}
\usepackage{slashbox}

% 1.5 line spacing
\usepackage{setspace}
\usepackage{tabu}
\usepackage{tabularx}
\onehalfspacing

% maths symbols
\usepackage{amsmath}
%\usepackage[math-style = upright]{unicode-math}

% table package
\usepackage{multirow}

% citation style
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}%
\makeatletter
\let\Hy@linktoc\Hy@linktoc@none
\makeatother

\usepackage[square,sort,comma,numbers]{natbib}
\usepackage{amsfonts}

%\renewcommand{\chaptername}{}

\usepackage{tikz,colortbl}
\usetikzlibrary{calc}
\usepackage{zref-savepos}

\usepackage[bf,small,tableposition=top]{caption}
\usepackage{subfig}
\usepackage{float}
\usepackage{url}
\usepackage{pdfpages}

\begin{document}

% cover
%\input{cover_report.tex}
\includepdf[pages=1]{CoverPage}

% title page
%\input{title_report.tex}

% abstract
\setcounter{page}{1}
\pagenumbering{roman}
\input{abstract.tex}

% acknowledgement
\input{acknowledgements.tex}

% table of content
\tableofcontents
\addcontentsline{toc}{chapter}{Contents}

% list of tables
%\listoftables
%\addcontentsline{toc}{chapter}{List of Tables}

% list of figures
%\listoffigures
%\addcontentsline{toc}{chapter}{List of Figures}

% intro chapter
\cleardoublepage
\pagenumbering{arabic}
\input{intro.tex}
\input{literature.tex}
\input{dataset.tex}
%\input{propose.tex}
\input{module_design.tex}
\input{training.tex}
\input{results.tex}
\input{conclusion.tex}

% references
%\bibliographystyle{plainnat}
\bibliographystyle{ksfh_nat}
\bibliography{fyp}

% appendix
%\input{appendix.tex}
\end{document}
5
  • Sorting is determined by your citation style: I've not come across ksfh_nat before, but taking a quick look it's a sorted style.
    – Joseph Wright
    Commented Jul 17, 2016 at 11:35
  • ok so you can tell me how i can fix it ? I downloaded a template from my school so i have not used latex before
    – Kong
    Commented Jul 17, 2016 at 11:54
  • The easiest and tiniest changes that needs to be done iso i can cite in order of appearnance
    – Kong
    Commented Jul 17, 2016 at 11:55
  • 2
    Ok i managed toget it working. I went to sharelatex.com/learn/Natbib_bibliography_styles and used unsrtnat
    – Kong
    Commented Jul 17, 2016 at 11:58
  • 4
    I'm voting to close this question as off-topic because solved in comments Commented Nov 24, 2016 at 15:49

0

Browse other questions tagged .