Skip to content

Special characters in bib-file encoded incorrectly #2

@apragsdale

Description

@apragsdale

I've been struggling with this for a little while now - my bib file has special characters (say author names with accents or umlauts, etc), which are encoded in the .bib file as follows, for example:

@ARTICLE{Skov2020-jc,
  title     = "The nature of Neanderthal introgression revealed by 27,566
               Icelandic genomes",
  author    = "Skov, Laurits and Coll Maci{\`a}, Mois{\`e}s and
               Sveinbj{\"o}rnsson, Gar{\dh}ar and Mafessoni, Fabrizio and
               Lucotte, Elise A and Einarsd{\'o}ttir, Margret S and Jonsson,
               Hakon and Halldorsson, Bjarni and Gudbjartsson, Daniel F and
               Helgason, Agnar and Schierup, Mikkel Heide and Stefansson, Kari",
  journal   = "Nature",
  publisher = "nature.com",
  volume    =  582,
  number    =  7810,
  pages     = "78--83",
  month     =  jun,
  year      =  2020,
  language  = "en"
}

These are usually handled by setting \usepackage[T1]{fontenc} in the preamble.

However, these get converted to rich text in the bib entries in the auto-generated tex file, and latex fails with Undefined control sequence when it encounters those non-ascii encoded characters in the bib entries.

I can't figure out how to enforce Rmarkdown to not convert characters to rich text. In Rstudio, I've tried Tools -> General options -> Code -> Saving and then setting Default text encoding to ASCII, but did not seem to change the behavior. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions