TransWikia.com

LyX can't import UTF8 properly

TeX - LaTeX Asked on March 24, 2021

I’m using TeXLive 2020 on Debian Testing, and LyX 2.3.5.2. I wrote some notes for a course I’m teaching, in LaTeX, using UTF8 encoding (default). When importing to LyX, I cannot compile it to PDF because it imports the characters wrong; I attach screencap of this at the end.

I have repeatedly set UTF8 as the default enconding for documents at Document>Settings>Language, but this changes don’t seem to persist; I also added usepackage[utf8]{inputenc} to the default preamble, and LyX saves this into its settings, but on Importing from LaTeX source, I get the same characters shown in the screencap.

I use LyX because it is a nice environment for student who don’t know LaTeX yet, and don’t have time to learn it during the course. They have reacted positively to LyX, and they use it for their turn-ins. So I give them the notes in LyX so they can edit them for their own use.

EDIT: I tried the solution on this question, but I still get the funny characters.

EDIT2: Added forgotten screencap.

Any ideas? Thanks!

enter image description here

One Answer

It turns out that I have to add usepackage[utf8]{inputenc} to my TEX file preamble so LyX knows what encoding to use when importing; I had forgotten to add this line because it is no longer necessary.

EDIT: I noticed the line was commented out at the time of importing from LyX.

Answered by mathbekunkus on March 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP