From 7a17610a0041b09785d12759a3eaf2988f67c935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Milde?= Date: Tue, 12 Feb 2019 09:22:55 +0100 Subject: [PATCH] Load "textcomp" and "pmboxdraw" before "(lua)inputenc" to fix #11454. Prevents wrong or missing characters with LuaTeX and 8-bit fonts. Also "uninvert" the corresponding test case and two other no longer failing "unicodesymbols" exports. --- autotests/export/latex/luainputenc-utf8.lyx | 2 +- development/autotests/invertedTests | 10 +++------- src/BufferParams.cpp | 6 ++++++ src/LaTeXFeatures.cpp | 2 -- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/autotests/export/latex/luainputenc-utf8.lyx b/autotests/export/latex/luainputenc-utf8.lyx index 4c37198e38..0fe696bd9f 100644 --- a/autotests/export/latex/luainputenc-utf8.lyx +++ b/autotests/export/latex/luainputenc-utf8.lyx @@ -182,7 +182,7 @@ literal "false" \begin_layout Standard \begin_inset CommandInset include LatexCommand input -filename "unicodesymbols/009-cyrillic-russian.lyx" +filename "unicodesymbols/009-cyrillic_ru.lyx" literal "false" \end_inset diff --git a/development/autotests/invertedTests b/development/autotests/invertedTests index 7e667462c6..a0237f99ef 100644 --- a/development/autotests/invertedTests +++ b/development/autotests/invertedTests @@ -105,9 +105,7 @@ export/export/latex/unicodesymbols/074-76-letterlike-numberforms-arrows_cp862_pd # Arabic: export/export/latex/unicodesymbols/005-7-ipa-modifiers-combining_cp1256_pdf2 export/export/latex/unicodesymbols/008-greek-and-coptic-with-textalpha_cp1256_pdf2 -export/export/latex/unicodesymbols/008-greek-and-coptic_cp1256_pdf2 export/export/latex/unicodesymbols/069-greek-extended-textalpha_cp1256_pdf2 -export/export/latex/unicodesymbols/069-greek-extended_cp1256_pdf2 export/export/latex/unicodesymbols/070-72-general-punctuation-sub-super-currency_cp1256_pdf2 export/export/latex/unicodesymbols/074-76-letterlike-numberforms-arrows_cp1256_pdf2 @@ -187,11 +185,9 @@ export/export/WrongDfnTagHandling_xhtml # contains underscores etc. export/export/latex/LongestLabelWithUnderscore.* -#11454 luainputenc must be loaded after textcomp -export/export/latex/luainputenc-utf8_pdf5_texF -# (The version with Unicode fonts fails because some symbols are missing -# in LatinModern as well as DejaVu. This shows that there are use cases -# for traditional 8-bit fonts.) +# Common Unicode fonts don't support all characters supported by +# lib/unicodesymbols. (This shows that there are use cases for 8-bit fonts +# or GUI support for selecting more than one system font.) export/export/latex/luainputenc-utf8_pdf5_systemF #11455 "Unable to process argument!" with multiple 1.6.x roundtrips diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 011009693b..c194aedd78 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1779,6 +1779,12 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features, } } + // TODO: load textcomp and pmboxdraw before (lua)inputenc (#11454) + if (features.mustProvide("textcomp")) + os << "\\usepackage{textcomp}\n"; + if (features.mustProvide("pmboxdraw")) + os << "\\usepackage{pmboxdraw}\n"; + // handle inputenc etc. writeEncodingPreamble(os, features); diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 875bbe2394..76dc31c0ec 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -958,9 +958,7 @@ char const * simplefeatures[] = { "units", "framed", "soul", - "textcomp", "dingbat", - "pmboxdraw", "bbding", "ifsym", "txfonts",