I am using LyX and am trying to import my references a BibLaTeX file. I am getting the following error when I try to compile: Package inputenc error: Keyboard character used is undefined. It then tells me I need to provide a definition with \DeclareInputText.

I've narrowed down the problem to entries in my bibliography that contain hyphens (ex: the word "well-off" in a title) and apostrophes (an author named O'Dea). Does anyone know how I can get LyX to recognize these characters?

The error log gives me a bunch of these over and over again:

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 <return>  for immediate help.
  • are you sure your bibliography is encoded in latin9 rather than UTF-8 Mar 27 '21 at 18:00
  • 2
    If the underlying LaTeX distribution is not quite old, the default input encoding is utf8. Maybe removing latin9 would help?
    – Bernard
    Mar 27 '21 at 18:01
  • 1
    Please don't add the answer to your problem in the question. Instead post an answer and accept it. (Ideally you'd include the exact sequence of steps you did to make the answer helpful for other people as well.) The idea of a Q&A site like TeX.SX is to have a strict separation between question and answer, so that people can find the answer easily and vote on how useful it is.
    – moewe
    Mar 28 '21 at 11:37

Thanks to David and Bernard for their helpful comments. The issue was that LyX's input encoding setting was on "Language default" which was latin9. Once I changed this to utf8 (Document->Settings->Language, under the "Encoding" section), it worked.

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.