0

I am writing my thesis with LyX and managing my references with Zotero. My document class is Book (Standard Class) and the style format is Biblatex. I am having a problem with my biblatex bibliography. From Zotero, I export the bibliography in Biblatex (UTF-8) into a .bib file.

This is part of my .bib file: File right from Zotero

If I insert a citation, for example, "Martín Martínez 2013" what I get is all the accents wrong: LyX wrong encoding

But, I discovered that if I open the .bib file with Bibdesk, and modify anything, it re-encodes (I suppose) the file, and then from LyX I do get the right citation. This is my -bib file after editing with Bibdesk: File afer Bibdesk editing

Seems to me an encoding problem. I have followed this topic Biblatex encoding, but is still not working. Any ideas? I can survive with this rudimentary method but I would like to solve it. Thanks.

Update 1: When I try to compile the LyX file without having edited the .bib, I get an error. This is the LaTeX log:

Package biblatex Warning: The following entry could not be found
(biblatex)                in the database:
(biblatex)                touring_club_italiano_napoli_1931
(biblatex)                Please verify the spelling and rerun
(biblatex)                LaTeX afterwards.

And in the Biber log:

[640] Utils.pm:395> WARN - I didn't find a database entry for 'touring_club_italiano_napoli_1931' (section 0)

Update 2: I am adding a minimal example and the .bib file. When exporting my file to LaTeX (plain) I have had two warnings:

  1. Said something about blank spaces in my Bibtex route. It will be unable to find the bibtex biliography. I did not copied the text and now I am unable to reproduce this warning. Is strange because I am not using Bibtex...
  2. Something about the figures

And If I try to open the .tex file with TeXShop I have also another warning:

  1. This file will open with encoded characters in IsoLatin9. Unable to open the file with Unicode (UTF-8) encoding because the file was not saved with this encoding. (Translation is mine from Spanish)

Minimal example:

%% LyX 2.3.6.2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,oneside,spanish]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{graphicx}
\usepackage{setspace}
\onehalfspacing
\usepackage{babel}
\addto\shorthandsspanish{\spanishdeactivate{~<>}}

\usepackage[style=authoryear]{biblatex} \addbibresource{\string"Texto/Capítulo 2/CAPITULO II.bib\string"} \begin{document} \parencite[104]{hernandez_redondo_diego_2000} \printbibliography

\end{document}

And this is my .bib file from Zotero:

@article{hernandez_redondo_diego_2000,
    title = {Diego de Siloe, aprendiz destacado en el taller de Felipe Bigarny},
    abstract = {El hallazgo de un documento conservado en el Archivo de la Real Chancillería de Valladolid, permite constatar la presencia del joven Diego de Siloe en el taller de Felipe de Bigarny en los años precedentes a su viaje a Italia, donde trabajó con Bartolomé Ordóñez. La reclamación de Diego de Siloe de una cantidad que le adeudaba Felipe de Bigarny, dio lugar a un pleito cuyas sucesivas sentencias confirman la participación de Siloe en los trabajos de la sillería de la catedral de Burgos, al tiempo que permiten deducir algunos datos inéditos en la biografía de ambos artistas.},
    pages = {101--116},
    number = {5},
    journaltitle = {Locus Amoenus},
    author = {Hernández Redondo, José Ignacio},
    date = {2000},
    langid = {spanish},
    file = {Redondo - Diego de Siloe, aprendiz destacado en el taller de.pdf:/Users/eacosta/Zotero/storage/PF7HNQBC/Redondo - Diego de Siloe, aprendiz destacado en el taller de.pdf:application/pdf},
}
  • Welcome to TeX.SE! – Mensch Oct 23 '21 at 18:19
  • Is the problem only with LyX's view? When you compile to PDF, are the accents wrong there too? – scottkosty Oct 23 '21 at 19:20
  • I don't know, if I do not edit the .bib file I can not compile to PDF, I get an error (please, see my updated post). @scottkosty – Eduardo Oct 23 '21 at 20:05
  • Can you post a minimal example please? Please read here: https://wiki.lyx.org/FAQ/MinimalExample – scottkosty Oct 23 '21 at 23:27
  • 1
    Have you checked that your LyX document is set up for UTF-8 (Unicode)? Go to to the Document Settings, Language and check what it says under "Encoding". In case "Language default" is selected, it might help to check "Other" and select "Unicode (utf8)" specifically. – moewe Oct 24 '21 at 06:32
  • @moewe It was checked "Language default" and I've changed it to "Unicode (utf8)" but it hasn't changed anything. I still have all my citations with the accents wrong. – Eduardo Oct 24 '21 at 07:34
  • @scottkosty I've added to my post the minimal example. Thank you. – Eduardo Oct 24 '21 at 08:51
  • How are you exporting your data from Zotero? Looks like it is exported as ISO-8859-1, not UTF-8. – Ingmar Oct 23 '21 at 19:08
  • The option I use is the default one: "Unicode (UTF-8)". There are two more options: "Unicode (UTF-8 without BOM)" and "Western". – Eduardo Oct 23 '21 at 19:16
  • Is the example after setting the document to UTF-8? Because it explicitly sets encoding to ISO via \usepackage[latin9]{inputenc}. That should be \usepackage[utf8]{inputenc} – adam.smith Oct 24 '21 at 12:22
  • @adam.smith This is the file once exported to LaTeX and opened with TeXShop in order to copy the text for the post. TeXShop was unable to read the UTF8 and therefore has changed it to Latin9, as it stated in the warning message. – Eduardo Oct 24 '21 at 12:55
  • I don't use LyX, but here are a couple of things that I know: (1) When you save the .bib file in BibDesk, it converts accented Unicode characters to TeX; there is a setting for this in BibDesk's preferences. (2) In Terminal.app you can check the character encoding of a file by entering the command: file -I [filename], which you can use to check the encoding of your exported LaTeX, and you can use iconv to convert the encoding if necessary. – Big Mac Oct 24 '21 at 14:55
  • Answers to a couple of similar questions (https://tex.stackexchange.com/q/439288 and https://tex.stackexchange.com/q/447891) suggest using the Better BibTeX extension for Zotero instead of using Zotero's built-in BibLaTeX export. This seems to be very good advice. – Big Mac Oct 24 '21 at 15:15
  • @BigMac Yeah, I think the problem is Zotero exportation. Let me try that plugin. Btw, I love this community, so kind! – Eduardo Oct 24 '21 at 17:18
  • Problem solved thanks to the Zotero plugin! Thank you everyone :) – Eduardo Oct 24 '21 at 21:04

0 Answers0