2

This is a question about using UTF-8 symbols (e.g. å, Ä, Ö) in the LyX version of ClassicThesis. Using such symbols in the main document lyx files work without any changes at all to the ClassicThesis settings. However, in my use case, I also need my bibliography to be formatted with UTF-8, and my bib file is formatted as UTF-8.

I'm trying to use the LyX ClassicThesis class version 4.1 (https://code.google.com/p/classicthesis/downloads/detail?name=ClassicThesis-LyX-v4.1.zip) with LyX 2.1.2. My bibliography file is formatted in UTF-8, and this works fine in other Lyx documents as long as I set the inputenc of those documents to UTF-8. However, this does not work for the classicthesis style.

I have made the following changes to the classicthesis-config.tex file:

%\PassOptionsToPackage{utf8}{inputenc}  % latin9 (ISO-8859-9) = latin1+"Euro sign"                        
\usepackage[utf8]{inputenc}                                                                               

%\PassOptionsToPackage{ngerman,american,swedish}{babel}   % change this to your language(s)               
% Spanish languages need extra options in order to work with this template                                
%\PassOptionsToPackage{spanish,es-lcroman}{babel}                                                         
% \usepackage{babel}                                                                                      
\usepackage[swedish,american]{babel}

I did not do any changes to input encoding in the lyx document settings for the individual lyx files in the classicthesis folder. If I use this changed classicthesis-config.tex file, I get a number of errors like:

! Package inputenc Error: Unicode char \u8:�sv not set up for use with LaTeX.

from every part of the main document where I have used e.g. å, ä, ö or í.

If I use the original classicthesis-config.tex file, I instead get errors associated with unicode chars in my UTF-8-formatted bibtex bibliography. However, UTF-8 characters inside the .lyx documents then works fine.

What am I doing wrong?

  • 2
    \usepackage[utf8{inputenc} has a missing ] and would generate multiple errors. Do you really have that? (I don't see how inputenc would be included at all) – David Carlisle Feb 10 '15 at 15:32
  • Thanks for pointing that out, @DavidCarlisle. It was lost in editing on stackexchange, and was included in the classicthesis-config.tex file on my system. As you say, if it was not included, I would have gotten some kind of message about it. – RidiculeSwarm Feb 11 '15 at 7:41
2

The issue of being unable to use utf8 with LyX has something to do with ClassicThesis not using/supporting [biblatex]? See: https://code.google.com/p/classicthesis/issues/detail?id=36 Apparenlty biber-biblatex deals with a full range of UTF-8 and ClassicThesis uses natbib. PLease correct me if I am wrong...

  • 2
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Paul Gessler Feb 18 '15 at 4:09
  • I don't think that biblatex should be the reason here. I frequently use UTF-8 in both text and bibliography format without biblatex. – RidiculeSwarm Feb 19 '15 at 15:25
0

I encountered a similar problem. Look in classicthesis-config.tex for :

\PassOptionsToPackage{%
backend=biber, %instead of bibtex
%backend=bibtex,
bibencoding=utf8,%
}{biblatex}
\usepackage{biblatex}

In my case the bibencoding was set to ascii (bibencoding=ascii), so I changed it to utf8. The default in classicthesis 4.2 is ascii.

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.