Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to specify encoding that is used by Lyx when it generates LaTeX source for preview or export. That is not a big problem Document->Settings->Language->Encoding->Other->Select encoding from combo box will do just that. But it will also add command \usepackage[selectedEncoding]{inputenc} to preamble of generated document.

How do I prevent that? I want all my LaTeX documents to be generated in UTF-8 but I do not want that inputenc declaration in preamble.

share|improve this question
1  
Why this automatic inputenc declaration is it a problem? – Paul Gaborit Dec 26 '12 at 2:01
@Paul Gaborit Because LaTeX class of the document may also declare inputenc therefore there is option clash possible. See tex.stackexchange.com/questions/88177/… – drasto Dec 26 '12 at 14:42
2  
A LaTeX class should not impose specific encoding. – Paul Gaborit Dec 26 '12 at 14:45
@Paul Gaborit Thank you for this! This is what I needed to hear (hope this is not your subjective opinion). Apparently Lyx also expect LaTeX classes to not to impose specific encodings. Would you mind answering my question tex.stackexchange.com/questions/88177/… in this manner? It might be accepted answer. – drasto Dec 26 '12 at 14:59

1 Answer

up vote 1 down vote accepted

You more or less answered your own question:

enter image description here

By selecting Language Default (no inputenc) as encoding, LyX will not add \usepackage[<encoding>]{inputenc} to the preamble.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.