1

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

  • Your description inplies that you have told latex you are using a legacy 8bit encoding, latin-9, but exported the bibliography as utf-8. Best to save your document as utf-8 as well and use \usepackage[utf8]{inputenc} not latin9 – David Carlisle May 11 '16 at 19:14
  • @Carlisle I'm not sure if bibtex can handle utf-8. Can it? Should one use bibtex8 instead? Even better, biblatex & biber. – PhilipPirrip May 11 '16 at 19:26
  • @DavidCarlisle I have just descovered that I can change the language setting in lyx (document -> Settings -> Language. and then select other and utf8. However I never set it to latin9, where may that have come from? Put that as an answer and I will be happy to accept it. – DaveM May 11 '16 at 19:38
  • @PhilipPirrip hmm true (or biber/biblatex) – David Carlisle May 11 '16 at 19:44
  • 1
    \usepackage[latin9]{inputenc} is LyX's standard setting for new documents. The solution? Save your bib database as TeX ASCII, or latin9. It has to match your document's character encoding. – PhilipPirrip May 11 '16 at 19:58
3

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.

  • Thanks, this has solved my problem. Made an edit for other users to find this setting via the LyX gui. – DaveM May 12 '16 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.