[Tex/LaTex] Inputenc error in bibtex during pdf output

jabreflyx

I'm not very good with tex stuff, and although I'm a capable linux user, latex has always been a problem for me.

My situation.
I'm writing a thesis document.
OS : Debian 8
Lyx : 2.1.2
Jabref : 2.1

When I try to output my Lyx file to PDF just today I have been getting the following error message about inputenc

Package natbib Warning: Citation `ArpaciDusseau14' on page 12
undefined on inpu t line 244.

[12] [13]) [14] (./Memoire_Stage.bbl (./Memoire_Stage.brf)
\tf@brf=\write4 \openout4 = `Memoire_Stage.brf'.

! Package inputenc Error: Keyboard character used is undefined
(inputenc) in inputencoding `latin9'.

See the inputenc package documentation for explanation. Type H
for immediate help. …

                                               l.79 
  You need to provide a definition with \DeclareInputText  or \DeclareInputMath before using this key.

! Package inputenc Error: Keyboard character used is undefined
(inputenc) in inputencoding `latin9'.

See the inputenc package documentation for explanation. Type H
for immediate help. …

                                               l.79

Recent changes are :

I've been using Zotero, and exported a number of my references to bibtex output and then imported them into jabref.

It is not the first time I have done this, previously everything has been fine.

I also recently split my thesis into a multi-document format (it was getting too long to be able to find my way around !), but again my output to pdf has been working up until today.

When I output to pdf from lyx the first window that opens has the following details in it.

Package inputenc Error: Keyboard character used is undefined You need
to provide a definition with \DeclareInputText or \DeclareInputMath
before using this key.

But I don't know how to find these 'strange' characters.
The jabref DB is set to be utf8 format.
I found and deleted the .blg and .blf files (and in fact all the lyx temp files just in case), but no change.

I did perform a copy and paste from a my personal tiddlywiki web note book, but this hasn't caused my problems before.

I've pulled an old version off of my git repo, and it will compile to pdf just fine, but the references I have used are much reduced (I used markers in the doc to mark where my missing references where)

I don't know where to go next to try to solve my problem.

all help is greately appreciated.

David

Best Answer

Make sure that your bibliography and document are using UTF-8 and then declare

\usepackage[utf8]{inputenc}

rather than [latin9].

For UTF-8 Bibliographies you might need bibtex8 or biblatex/biber depending on exactly how much language support you need. (Non English titles etc are not a problem but classic bibtex will not understand non ascii letters so for example if you are using a style that sorts author names, sort order is likely to be wrong if you have names with accented or other non ascii characters).

For modifying the your lyx document to a different langage coding do the following in the menu :

Document -> Settings -> Select the 'langage' options.

Here you can modify the actual default written language for the spell checker. Also you can modify the language encoding. Default is apparently latin-9 (see this wiki article about latin-9 / iso-8859-15. Simply modify it to the 'other' option ans selection of utf8 should solve your problems.

NOTE : I don't know how this will handle the use of split documents (I guess it should pull the utf8 setting from the master).

The alternative is to place the declaration

\usepackage[utf8]{inputenc}

in the preamble (also available as the last option in the settings window) - although as of yet I've not tested this option.