LyXCitations in order by appearance: doesn't work

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
flops
Posts: 1
Joined: Mon Mar 24, 2014 1:55 pm

Citations in order by appearance: doesn't work

Post by flops »

Hi,
I’m using Lyx 2.0, everything works fine but I'm in trouble with the library. I want to have the citations in order by appearance in the text.

For example:
Jbjb[1] jbibihz[2].

Library:
[1] Author1
[2] Author 2

But in the moment, my library is in an alphabetic order and in the text the numbers are like this:
Dssfg[3]oihdovn[1]jbiub[2].

I’m using natbib and the style “unsrt”. But “unsrt” doesn’t alter the problem. :cry:


My source code is as follows:
...........................................................................

%% LyX 2.0.6 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[twoside,ngerman,11pt]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=4.5cm,bmargin=3.5cm,lmargin=3.5cm,rmargin=5cm,headheight=1cm,headsep=1.5cm,footskip=1.5cm}
\setcounter{secnumdepth}{3}
\setlength{\parskip}{6pt}
\setlength{\parindent}{0pt}
\usepackage{setspace}
\onehalfspacing
\usepackage[dot]{bibtopic}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\bibliographystyle{unsrt}
\usepackage[numbers,sort&compress]{natbib}

\AtBeginDocument{
\def\labelitemii{\(\circ\)}
\def\labelitemiii{\(\cdot\)}
}

\makeatother

\usepackage{babel}
\begin{document}
afegbab\cite{TaeWanKim.2011}zglivf\cite{KamilaKoichumanova.2013}egadsvafdb\cite{R.R.Davda.2005}\bibliographystyle{unsrt}
\begin{btSect}{C:/literatur2}
\btPrintCited
\end{btSect}

\end{document}
..............................................................................

I hope somebody can help me and I mentioned everything what is important!
Thank you
flops

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Citations in order by appearance: doesn't work

Post by kaiserkarl13 »

You have two \bibliographystyle commands (which is illegal), and no \bibliography command. Fix those problems and it will probably work.

Don't ignore error messages! They're there to help.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Citations in order by appearance: doesn't work

Post by scottkosty »

Note that BibTeX errors were not reported by LyX 2.0.x. They are now reported by LyX 2.1. We expect this to be a little rough on users as we've already gotten complaints that "may document compiled in 2.0.x and in 2.1 I'm getting errors", but it is clearly the right thing to do.
Post Reply