commit 69d10bd4c8261bb32d74606e4dd1235892d3042b
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Mar 15 10:29:07 2015 +0100

    Allow to disable inputenc loading via 'Provides inputenc 1'

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index fc425f9..5f2d6ae 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -2822,7 +2822,8 @@ void BufferParams::writeEncodingPreamble(otexstream & os,
                // inputenc must be omitted.
                // see 
http://www.mail-archive.com/[email protected]/msg129680.html
                if ((!encodings.empty() || package == Encoding::inputenc)
-                   && !features.isRequired("japanese")) {
+                   && !features.isRequired("japanese")
+                   && !features.isProvided("inputenc")) {
                        os << "\\usepackage[";
                        set<string>::const_iterator it = encodings.begin();
                        set<string>::const_iterator const end = encodings.end();
@@ -2853,7 +2854,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";

Reply via email to