From d15388ba989b2f7ca3478d429c9a74fe2ff510b5 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 15 Mar 2015 10:29:07 +0100 Subject: [PATCH] Allow to disable inputenc loading via 'Provides inputenc 1' --- src/BufferParams.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 47c65cea26..403da2fe6b 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -2825,7 +2825,8 @@ void BufferParams::writeEncodingPreamble(otexstream & os, // inputenc must be omitted. // see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129680.html if ((!encodings.empty() || package == Encoding::inputenc) - && !features.isRequired("japanese")) { + && !features.isRequired("japanese") + && !features.isProvided("inputenc")) { os << "\\usepackage["; set::const_iterator it = encodings.begin(); set::const_iterator const end = encodings.end(); @@ -2856,7 +2857,9 @@ void BufferParams::writeEncodingPreamble(otexstream & os, break; case Encoding::inputenc: // do not load inputenc if japanese is used - if (features.isRequired("japanese")) + // or if the class provides inputenc + if (features.isRequired("japanese") + && features.isProvided("inputenc")) break; os << "\\usepackage[" << from_ascii(encoding().latexName()) << "]{inputenc}\n"; -- 2.39.2