0

everybody. I am having the following error in Lyx when trying to view the PDF.

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

I think is due to have copied text from a photocopy (PDF with OCR) recently, because these last months it worked well. Thanks to the log I know where the error is: in line 3546 and line 5442. But my problem is that I don't know how to look for a specific line. Lyx is not showing me the lines numbered. Thank you.

Edit 1


I am adding the Biber log

[0] Config.pm:311> INFO - This is Biber 2.16
[0] Config.pm:314> INFO - Logfile is 'Tesis_copia_ERRORES_II.blg'
[89] biber-darwin:340> INFO - === Fri Jan 21, 2022, 11:48:58
[111] Biber.pm:415> INFO - Reading 'Tesis_copia_ERRORES_II.bcf'
[202] Biber.pm:952> INFO - Found 5 citekeys in bib section 0
[234] Biber.pm:4340> INFO - Processing section 0
[246] Biber.pm:4531> INFO - Looking for bibtex format file '54_Users_eacosta_Library_Mobile_Documents_com_a___dos_2017-2022_Doctorado_Texto_Mi_biblioteca.bib' for section 0
[261] bibtex.pm:1689> INFO - LaTeX decoding ...
[628] bibtex.pm:1494> INFO - Found BibTeX data source '54_Users_eacosta_Library_Mobile_Documents_com_a___dos_2017-2022_Doctorado_Texto_Mi_biblioteca.bib'
[714] UCollate.pm:68> INFO - Overriding locale 'es-ES' defaults 'variable = shifted' with 'variable = non-ignorable'
[714] UCollate.pm:68> INFO - Overriding locale 'es-ES' defaults 'normalization = NFD' with 'normalization = prenormalized'
[714] Biber.pm:4168> INFO - Sorting list 'nyt/global//global/global' of type 'entry' with template 'nyt' and locale 'es-ES'
[720] bbl.pm:654> INFO - Writing 'Tesis_copia_ERRORES_II.bbl' with encoding 'latin9'
[723] bbl.pm:757> INFO - Output to Tesis_copia_ERRORES_II.bbl

and part of the LaTeX log

{/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Info: Redefining \. on input line 51.
LaTeX Info: Redefining \% on input line 51.
[2]

! 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. ...

l.52

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

And here there is a MWE

#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass book
\begin_preamble

\end_preamble \use_default_options true \maintain_unincluded_children false \language spanish \language_package auto \inputencoding auto \fontencoding global \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype false \use_dash_ligatures true \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize 12 \spacing onehalf \use_hyperref false \papersize default \use_geometry false \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 1 \use_package esint 1 \use_package mathdots 1 \use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine biblatex \cite_engine_type authoryear \biblio_style plain \biblio_options url = false \biblatex_bibstyle authoryear \biblatex_citestyle authoryear \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification true \use_refstyle 1 \use_minted 0 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \is_math_indent 0 \math_numbering_side default \quotes_style french \dynamic_quotes 0 \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header

\begin_body

\begin_layout Chapter La implantación de la red parroquial y la evolución de la liturgia \begin_inset Argument 1 status open

\begin_layout Plain Layout La implantación de la red parroquial... \end_layout

\end_inset

\begin_inset CommandInset label LatexCommand label name "chap:La implantación de la red parroquial"

\end_inset

\end_layout

\begin_layout Section Organización litúrgica \begin_inset CommandInset label LatexCommand label name "sec:Organización-litúrgica"

\end_inset

\end_layout

\begin_layout Standard Es el caso de catedrales por las que pasó como la seo de Barcelona, Burgos, Plasencia o Sevilla. Los coros frente a la capilla mayor se encontraban conectados a este espacio mediante un pasillo conocido como la \begin_inset Quotes fld \end_inset

via sacra \begin_inset Quotes frd \end_inset

que solía estar cerrado con unas cancelas para permitir el paso directo entre los oficiantes y el coro. La conexión entre los celebrantes en el coro y aquellos en la capilla mayor no era simplemente acústica, también era necesariamente tangible: durante la celebración de la eucaristía los oficiantes en la capilla mayor se acercaban al coro a dar la paz a estos otros, \begin_inset Foot status open

\begin_layout Plain Layout «Luego el diacono la da [la paz] al subdiacono: el qual acompañado del acolito va al coro: y por semejanza da paz a todos los del coro por su orden…»

\begin_inset CommandInset citation LatexCommand citep after "172r" key "de_santa_maria_manual_1598" literal "false"

\end_inset

\end_layout

\end_inset

por lo que, para evitar que los clérigos tuviesen que hacerse paso entre la muchedumbre, la via sacra se situaba a ambos lados aislada mediante un pasillo.

\end_layout

\begin_layout Standard Este entremado de cáncelas y vallas interrumpían la visión de los fieles e importunaban a las procesiones que se realizaban por el interior. Algunas de estas cancelas desaparecieron \begin_inset CommandInset citation LatexCommand citep key "rodriguez_g_de_ceballos_liturgia_1991,stabenow_introduzione_2006,pomar_rodil_feligreses_2016" posttextlist "rodriguez_g_de_ceballos_liturgia_1991 44 stabenow_introduzione_2006 12 pomar_rodil_feligreses_2016 82" literal "false"

\end_inset

o en otros casos se hicieron practicables \begin_inset CommandInset citation LatexCommand citep key "rodriguez_g_de_ceballos_liturgia_1991,carrero_santamaria_espacio_2019" posttextlist "rodriguez_g_de_ceballos_liturgia_1991 45-46 carrero_santamaria_espacio_2019 137" literal "false"

\end_inset

, como en las iglesias de ... \end_layout

\begin_layout Standard \begin_inset CommandInset bibtex LatexCommand bibtex btprint "btPrintCited" bibfiles "Mi biblioteca"

\end_inset

\end_layout

\end_body \end_document

Edit 2


I think the problem is that the bibliography is not encoded in UTF8, because if I change the encoding in my document to UTF8 I get errors again, now these:

! Package inputenc Error: Unicode character ṭ (U+1E6D)
(inputenc)                not set up for use with LaTeX.

I am using Zotero and the Better BibTeX plugin. How do I set the encoding for the exported bibliography in Zotero?

Edit 3 (solution)


I solved the problem changing the document encoding to UTF8. [Document/Properties/Language/Encoding/Other: Unicode (utf8)]. Now the error log of LaTeX told me who was the problematic character, but it was not in my text (LyX) it was in my bibliography (Zotero). So I went to Zotero, searched for that character, found it and killed it.

  • Hi and welcome to TeX.SX. First, you should know that a LYX file is just a text file that you can open with a text editor and look into - this might give you line numbers. However, This will probably not help you find the error: Latex is infamously bad at giving proper error output, see this question: https://tex.stackexchange.com/questions/125399/how-to-trace-latex-errors-efficiently/125404 – Elad Den Jan 16 '22 at 11:29
  • Also, keep in mind the the engine that gives you the error is referring to an auxiliary file lyx used to compile and run pdflatex on, rather than to your lyx file. In short - the line number you get in the error message is not useful at all... – Elad Den Jan 16 '22 at 11:31
  • Do you really still use latin9? Nowadays utf8 is/should be the default everywhere. (This doesn't mean that you should convert to utf8 in a rush, this can go wrong, but it would avoid such copy&paste errors). – Ulrike Fischer Jan 16 '22 at 11:50
  • @EladDen sorry but this is nonsense. Line numbers are mostly very useful as soon as you know how to identify the file they refer too. – Ulrike Fischer Jan 16 '22 at 11:52
  • @UlrikeFischer we seem to disagree on what "mostly" means – Elad Den Jan 17 '22 at 13:13
  • @EladDen I haven't touched anything in my document properties, so the problem might be something that I have copied and pasted. But yes, at the specific lines (I've opened the file with TeXShop) there is nothing wrong. – Eduardo Jan 17 '22 at 16:06
  • @UlrikeFischer I don't know why is it talking about latin9 encoding. From the beginning, last year, I am using the predetermined encoding (my language is set to Spanish), so I think it might be using UTF-8. In fact, I've never told LyX what encoding did I want. – Eduardo Jan 17 '22 at 16:06
  • As looking in the specific lines hasn't changed anything, I still have the problem when generating the PDF. Any ideas how to solve this? – Eduardo Jan 18 '22 at 12:49
  • @Eduardo, It would be very hard to determine the problem based on your description. A Minimal Working Example(MWE) would aid us in this – Elad Den Jan 19 '22 at 08:27
  • @EladDen Added, hope this helps clarifying my problem. Thanks. – Eduardo Jan 21 '22 at 11:02
  • Well, in this case LyX does not generate a line mapping so you're mostly out of luck, I guess... (apart from the "binary search" option) – user202729 Jan 21 '22 at 11:43
  • @user202729 If I follow those instructions and change the encoding to "Unicode (utf8) I get the following errors instead: "! Package inputenc Error: Unicode character ṭ (U+1E6D) (inputenc) not set up for use with LaTeX." – Eduardo Jan 21 '22 at 14:54
  • Guess it's easier now. Search for the character in the LyX file and kill it. – user202729 Jan 21 '22 at 15:00
  • @EladDen By the way, I suspect the main issue here is that there's no LyX source-to-generated-TeX mapping. The generated file is (should be) relatively simple, there should be no problem with line report. – user202729 Jan 21 '22 at 15:53
  • SOLVED! The problematic character was in the bibliography (Zotero). One of the magazines has this character instead of a normal "t", so every time I cited the author it generated an error. In any case, to summarize: 1- I did not change anything in my document properties and I long cited the author but the problem emerged a few days ago 2- I don't know why my default encoding was set to Latin9, instead of UTF8. 3- In the LaTeX log, lines where the error was produced were no use. I looked for that specific line and there was nothing there wrong. – Eduardo Jan 21 '22 at 17:23
  • For point 3 it's more likely you are probably looking for the wrong file. compiling - How to easily determine the full name of the latex file when a build error occurs? - TeX - LaTeX Stack Exchange (if you can invoke LaTeX stand alone at all, that is. It probably points to that line in some auxiliary generated file) – user202729 Jan 22 '22 at 03:27

0 Answers0