From 27ba6f282dc36b5cb500bbd51c2f87fd697d0626 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnter=20Milde?= Date: Tue, 16 Apr 2019 20:17:32 +0200 Subject: [PATCH] Rename legacy input encoding settings. Format incremented to 573 --- development/FORMAT | 3 +++ lib/doc/Development.lyx | 16 +++++++++----- lib/lyx2lyx/lyx_2_4.py | 21 ++++++++++++++++-- src/Buffer.h | 4 ++-- src/BufferParams.cpp | 16 +++++++++----- src/DocIterator.cpp | 2 +- src/PDFOptions.cpp | 9 +++++--- src/frontends/qt4/GuiDocument.cpp | 14 ++++++------ src/frontends/qt4/GuiSymbols.cpp | 4 ++-- src/insets/InsetBibtex.cpp | 2 +- src/output_latex.cpp | 14 ++++++------ src/tex2lyx/Preamble.cpp | 22 +++++++++---------- src/tex2lyx/test/CJK.lyx.lyx | 2 +- src/tex2lyx/test/CJKutf8.lyx.lyx | 2 +- src/tex2lyx/test/DummyDocument.lyx.lyx | 2 +- src/tex2lyx/test/Dummy~Document.lyx.lyx | 2 +- src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx | 4 ++-- src/tex2lyx/test/algo2e.lyx.lyx | 2 +- src/tex2lyx/test/beamer.lyx.lyx | 2 +- .../test/box-color-size-space-align.lyx.lyx | 2 +- src/tex2lyx/test/listpreamble.lyx.lyx | 2 +- src/tex2lyx/test/tabular-x-test.lyx.lyx | 2 +- src/tex2lyx/test/test-insets-basic.lyx.lyx | 2 +- src/tex2lyx/test/test-insets.lyx.lyx | 2 +- src/tex2lyx/test/test-memoir.lyx.lyx | 2 +- src/tex2lyx/test/test-minted.lyx.lyx | 2 +- src/tex2lyx/test/test-modules.lyx.lyx | 2 +- .../test/test-refstyle-theorems.lyx.lyx | 2 +- src/tex2lyx/test/test-scr.lyx.lyx | 2 +- src/tex2lyx/test/test-structure.lyx.lyx | 2 +- src/tex2lyx/test/test.lyx.lyx | 4 ++-- src/tex2lyx/test/verbatim.lyx.lyx | 4 ++-- src/tex2lyx/tex2lyx.cpp | 2 +- src/version.h | 4 ++-- 34 files changed, 105 insertions(+), 74 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index 48309d380d..3b99985ca0 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -7,6 +7,9 @@ changes happened in particular if possible. A good example would be ----------------------- +2019-04-16 Günter Milde + * format incremented to 573: Rename legacy input encoding settings. + 2019-04-07 Kornel Benko * format incremented to 572: Extended Noto fonts. diff --git a/lib/doc/Development.lyx b/lib/doc/Development.lyx index 701b8b1617..dea41b7f1e 100644 --- a/lib/doc/Development.lyx +++ b/lib/doc/Development.lyx @@ -1,5 +1,5 @@ -#LyX 2.3 created this file. For more info see http://www.lyx.org/ -\lyxformat 544 +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 572 \begin_document \begin_header \save_transient_properties true @@ -14,7 +14,7 @@ logicalmkup \language english \language_package default \inputencoding auto -\fontencoding global +\fontencoding auto \font_roman "lmodern" "default" \font_sans "lmss" "default" \font_typewriter "lmtt" "default" @@ -87,6 +87,7 @@ logicalmkup \papercolumns 1 \papersides 2 \paperpagestyle headings +\tablestyle default \tracking_changes false \output_changes false \html_math_output 0 @@ -479,7 +480,7 @@ Add an entry to both format lists (for conversion and reversion) in status collapsed \begin_layout Plain Layout -lib/lyx2lyx/lyx_2_3.py +lib/lyx2lyx/lyx_2_4.py \end_layout \end_inset @@ -582,8 +583,11 @@ src/tex2lyx/TODO.txt It would be nice if you could create a .lyx test file which contains instances of all changed or added features. This could then be used to test lyx2lyx and tex2lyx. - Unfortunately, it has not yet been decided how to collect such examples, - so please ask on the development list if you want to create one. + Test samples are collected under the corresponding subdirectories of +\family typewriter +/autotests +\family default +. \end_layout \begin_layout Enumerate diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 6e69e3605e..024a5381dd 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -283,6 +283,22 @@ def revert_fonts(document, fm, fontmap): ### ############################################################################### +def convert_inputencoding_namechange(document): + " Rename inputencoding settings. " + i = find_token(document.header, "\\inputencoding", 0) + if i == -1: + return + s = document.header[i].replace("auto", "auto-legacy") + document.header[i] = s.replace("default", "auto-legacy-plain") + +def revert_inputencoding_namechange(document): + " Rename inputencoding settings. " + i = find_token(document.header, "\\inputencoding", 0) + if i == -1: + return + s = document.header[i].replace("auto-legacy-plain", "default") + document.header[i] = s.replace("auto-legacy", "auto") + def convert_notoFonts(document): " Handle Noto fonts definition to LaTeX " @@ -1635,10 +1651,11 @@ convert = [ [569, []], [570, []], [571, []], - [572, [convert_notoFonts]] # Added options thin, light, extralight for Noto + [572, [convert_notoFonts]], # Added options thin, light, extralight for Noto + [573, [convert_inputencoding_namechange]], ] -revert = [ +revert = [[572, [revert_inputencoding_namechange]], [571, [revert_notoFonts]], [570, [revert_cmidruletrimming]], [569, [revert_bibfileencodings]], diff --git a/src/Buffer.h b/src/Buffer.h index 4b2ac24192..f1bd1f5e79 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -302,8 +302,8 @@ public: OutputParams const &, OutputWhat output = FullSource) const; /** Export the buffer to LaTeX. - If \p os is a file stream, and params().inputenc is "auto" or - "default", and the buffer contains text in different languages + If \p os is a file stream, and params().inputenc is "auto-legacy" or + "auto-legacy-plain", and the buffer contains text in different languages with more than one encoding, then this method will change the encoding associated to \p os. Therefore you must not call this method with a string stream if the output is supposed to go to a diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index c0f8a60be9..fb176b95f6 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -436,7 +436,7 @@ BufferParams::BufferParams() fonts_sans_scale[1] = 100; fonts_typewriter_scale[0] = 100; fonts_typewriter_scale[1] = 100; - inputenc = "auto"; + inputenc = "auto-legacy"; lang_package = "default"; graphics_driver = "default"; default_output_format = "default"; @@ -1786,6 +1786,8 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features, // get main font encodings vector fontencs = font_encodings(); // get font encodings of secondary languages + // FIXME: some languages (hebrew, ...) assume a standard font encoding as last + // option (for text in other languages). features.getFontEncodings(fontencs); if (!fontencs.empty()) { os << "\\usepackage[" @@ -1799,7 +1801,9 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features, os << "\\usepackage{textcomp}\n"; if (features.mustProvide("pmboxdraw")) os << "\\usepackage{pmboxdraw}\n"; - + + // FIXME: With Thai as document or secondary language, we must load babel + // before inputenc (see lib/languages). // handle inputenc etc. writeEncodingPreamble(os, features); @@ -3245,7 +3249,7 @@ void BufferParams::writeEncodingPreamble(otexstream & os, if (useNonTeXFonts) return; - if (inputenc == "auto") { + if (inputenc == "auto-legacy") { string const doc_encoding = language->encoding()->latexName(); Encoding::Package const package = @@ -3285,7 +3289,7 @@ void BufferParams::writeEncodingPreamble(otexstream & os, else os << "]{inputenc}\n"; } - } else if (inputenc != "default") { + } else if (inputenc != "auto-legacy-plain") { switch (encoding().package()) { case Encoding::none: case Encoding::CJK: @@ -3315,7 +3319,7 @@ void BufferParams::writeEncodingPreamble(otexstream & os, break; } } - if (inputenc == "default" || features.isRequired("japanese")) { + if (inputenc == "auto-legacy-plain" || features.isRequired("japanese")) { // don't default to [utf8]{inputenc} with TeXLive >= 18 os << "\\ifdefined\\UseRawInputEncoding\n"; os << " \\UseRawInputEncoding\\fi\n"; @@ -3433,7 +3437,7 @@ Encoding const & BufferParams::encoding() const // Main encoding for LaTeX output. if (useNonTeXFonts) return *(encodings.fromLyXName("utf8-plain")); - if (inputenc == "auto" || inputenc == "default") + if (inputenc == "auto-legacy" || inputenc == "auto-legacy-plain") return *language->encoding(); if (inputenc == "utf8" && language->lang() == "japanese") return *(encodings.fromLyXName("utf8-platex")); diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index 64dfd54af5..b4883aa2d7 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -745,7 +745,7 @@ Encoding const * DocIterator::getEncoding() const text.outerFont(sl.pit())).language(); // If we have a custom encoding for the buffer, we don't switch // encodings (see output_latex::switchEncoding()) - bool const customenc = bp.inputenc != "auto" && bp.inputenc != "default"; + bool const customenc = bp.inputenc != "auto-legacy" && bp.inputenc != "auto-legacy-plain"; Encoding const * enc = customenc ? &bp.encoding() : lang->encoding(); // Some insets force specific encodings sometimes (e.g., listings in diff --git a/src/PDFOptions.cpp b/src/PDFOptions.cpp index b030baa62e..0b5b139e95 100644 --- a/src/PDFOptions.cpp +++ b/src/PDFOptions.cpp @@ -101,9 +101,12 @@ void PDFOptions::writeLaTeX(OutputParams & runparams, otexstream & os, if (!runparams.hyperref_driver.empty()) opt += runparams.hyperref_driver + ","; - // since LyX uses unicode, also set the PDF strings to unicode strings with the - // hyperref option "unicode" - opt += "unicode=true,"; + // Since LyX uses unicode, also set the PDF strings to unicode strings + // with the hyperref option "unicode". + // (With Xe/LuaTeX and pTeX, unicode=true is the default + // and the option leads to errors with some Japanese document classes) + if (!runparams.isFullUnicode() && !runparams.use_japanese) + opt += "unicode=true,"; // only use the hyperref settings if hyperref is enabled by the user // see bug #7052 diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 26ffc95744..758f9cb5d6 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -3201,11 +3201,11 @@ void GuiDocument::applyView() // language & quotes if (langModule->defaultencodingRB->isChecked()) { - bp_.inputenc = "auto"; + bp_.inputenc = "auto-legacy"; } else { int i = langModule->encodingCO->currentIndex(); if (i == 0) - bp_.inputenc = "default"; + bp_.inputenc = "auto-legacy-plain"; else { QString const enc_gui = langModule->encodingCO->currentText(); @@ -3222,8 +3222,8 @@ void GuiDocument::applyView() } if (!found) { // should not happen - lyxerr << "GuiDocument::apply: Unknown encoding! Resetting to default" << endl; - bp_.inputenc = "default"; + lyxerr << "GuiDocument::apply: Unknown encoding! Resetting to utf8" << endl; + bp_.inputenc = "utf8"; } } } @@ -3719,9 +3719,9 @@ void GuiDocument::paramsToDialog() langModule->dynamicQuotesCB->setChecked(bp_.dynamic_quotes); bool default_enc = true; - if (bp_.inputenc != "auto") { + if (bp_.inputenc != "auto-legacy") { default_enc = false; - if (bp_.inputenc == "default") { + if (bp_.inputenc == "auto-legacy-plain") { langModule->encodingCO->setCurrentIndex(0); } else { string enc_gui; @@ -4087,7 +4087,7 @@ void GuiDocument::paramsToDialog() if (nn >= 0) fontModule->fontsDefaultCO->setCurrentIndex(nn); - if (bp_.fontenc == "auto" || bp_.fontenc == "default") { + if (bp_.fontenc == "auto-legacy" || bp_.fontenc == "auto-legacy-plain") { fontModule->fontencCO->setCurrentIndex( fontModule->fontencCO->findData(toqstr(bp_.fontenc))); fontModule->fontencLE->setEnabled(false); diff --git a/src/frontends/qt4/GuiSymbols.cpp b/src/frontends/qt4/GuiSymbols.cpp index 93f2174062..ea863b4968 100644 --- a/src/frontends/qt4/GuiSymbols.cpp +++ b/src/frontends/qt4/GuiSymbols.cpp @@ -321,8 +321,8 @@ void GuiSymbols::updateView() chosenLE->clear(); string new_encoding = bufferview()->cursor().getEncoding()->name(); - if (buffer().params().inputenc != "auto" && - buffer().params().inputenc != "default") + if (buffer().params().inputenc != "auto-legacy" && + buffer().params().inputenc != "auto-legacy-plain") new_encoding = buffer().params().encoding().name(); if (new_encoding == encoding_) // everything up to date diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index a8965566fb..d20f67187c 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -682,7 +682,7 @@ void InsetBibtex::parseBibTeXFiles(FileNameList & checkedFiles) const if (ienc.empty() || ienc == "general") ienc = to_ascii(params()["encoding"]); - if (!ienc.empty() && ienc != "default" && ienc != "auto" && encodings.fromLyXName(ienc)) + if (!ienc.empty() && ienc != "auto-legacy-plain" && ienc != "auto-legacy" && encodings.fromLyXName(ienc)) encoding = encodings.fromLyXName(ienc)->iconvName(); ifdocstream ifs(bibfile.toFilesystemEncoding().c_str(), ios_base::in, encoding); diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 80af66451d..f4094bdc9e 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -979,10 +979,10 @@ void TeXOnePar(Buffer const & buf, } } - // Switch file encoding if necessary; no need to do this for "default" + // Switch file encoding if necessary; no need to do this for "auto-legacy-plain" // encoding, since this only affects the position of the outputted // \inputencoding command; the encoding switch will occur when necessary - if (bparams.inputenc == "auto" + if (bparams.inputenc == "auto-legacy" && !runparams.isFullUnicode() // Xe/LuaTeX use one document-wide encoding (see also switchEncoding()) && runparams.encoding->package() != Encoding::japanese && runparams.encoding->package() != Encoding::none) { @@ -1339,11 +1339,11 @@ void TeXOnePar(Buffer const & buf, // Information about local language is stored as a font feature. // If this is the last paragraph of the inset and a local_font was set upon entering - // and we are mixing encodings ("auto" or "default" and no XeTeX or LuaTeX), + // and we are mixing encodings ("auto-legacy" or "auto-legacy-plain" and no XeTeX or LuaTeX), // ensure the encoding is set back to the default encoding of the local language. if (runparams.isLastPar && runparams_in.local_font != 0 && runparams_in.encoding != runparams_in.local_font->language()->encoding() - && (bparams.inputenc == "auto" || bparams.inputenc == "default") + && (bparams.inputenc == "auto-legacy" || bparams.inputenc == "auto-legacy-plain") && !runparams.isFullUnicode() ) { runparams_in.encoding = runparams_in.local_font->language()->encoding(); @@ -1643,11 +1643,11 @@ pair switchEncoding(odocstream & os, BufferParams const & bparams, return make_pair(false, 0); // Only switch for auto-selected legacy encodings (inputenc setting - // "auto" or "default"). + // "auto-legacy" or "auto-legacy-plain"). // The "listings" environment can force a switch also with other // encoding settings (it does not support variable width encodings // (utf8, jis, ...) under 8-bit latex engines). - if (!force && ((bparams.inputenc != "auto" && bparams.inputenc != "default") + if (!force && ((bparams.inputenc != "auto-legacy" && bparams.inputenc != "auto-legacy-plain") || runparams.moving_arg)) return make_pair(false, 0); @@ -1668,7 +1668,7 @@ pair switchEncoding(odocstream & os, BufferParams const & bparams, LYXERR(Debug::LATEX, "Changing LaTeX encoding from " << oldEnc.name() << " to " << newEnc.name()); os << setEncoding(newEnc.iconvName()); - if (bparams.inputenc == "default") + if (bparams.inputenc == "auto-legacy-plain") return make_pair(true, 0); docstring const inputenc_arg(from_ascii(newEnc.latexName())); diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index 304b67e19d..a8d521c504 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -544,7 +544,7 @@ Preamble::Preamble() : one_language(true), explicit_babel(false), h_html_math_output = "0"; h_index[0] = "Index"; h_index_command = "default"; - h_inputencoding = "auto"; + h_inputencoding = "auto-legacy"; h_justification = "true"; h_language = "english"; h_language_package = "none"; @@ -735,7 +735,7 @@ void Preamble::handle_package(Parser &p, string const & name, xetex = true; h_use_non_tex_fonts = true; registerAutomaticallyLoadedPackage("fontspec"); - if (h_inputencoding == "auto") + if (h_inputencoding == "auto-legacy") p.setEncoding("UTF-8"); } @@ -1102,15 +1102,15 @@ void Preamble::handle_package(Parser &p, string const & name, h_use_non_tex_fonts = true; xetex = true; registerAutomaticallyLoadedPackage("xunicode"); - if (h_inputencoding == "auto") + if (h_inputencoding == "auto-legacy") p.setEncoding("UTF-8"); } else if (name == "CJK") { - // set the encoding to "auto" because it might be set to "default" by the babel handling + // set the encoding to "auto-legacy" because it might be set to "auto-legacy-plain" by the babel handling // and this would not be correct for CJK - if (h_inputencoding == "default") - h_inputencoding = "auto"; + if (h_inputencoding == "auto-legacy-plain") + h_inputencoding = "auto-legacy"; registerAutomaticallyLoadedPackage("CJK"); } @@ -1128,7 +1128,7 @@ void Preamble::handle_package(Parser &p, string const & name, else if (name == "inputenc" || name == "luainputenc") { // h_inputencoding is only set when there is not more than one // inputenc option because otherwise h_inputencoding must be - // set to "auto" (the default encoding of the document language) + // set to "auto-legacy" (the default encodings of the document's languages) // Therefore check that exactly one option is passed to inputenc. // It is also only set when there is not more than one babel // language option. @@ -1572,8 +1572,8 @@ void Preamble::parse(Parser & p, string const & forceclass, return; while (is_full_document && p.good()) { - if (detectEncoding && h_inputencoding != "auto" && - h_inputencoding != "default") + if (detectEncoding && h_inputencoding != "auto-legacy" && + h_inputencoding != "auto-legacy-plain") return; Token const & t = p.get_token(); @@ -1618,7 +1618,7 @@ void Preamble::parse(Parser & p, string const & forceclass, "% This document must be compiled with XeLaTeX "; if (comment.size() > magicXeLaTeX.size() && comment.substr(0, magicXeLaTeX.size()) == magicXeLaTeX - && h_inputencoding == "auto") { + && h_inputencoding == "auto-legacy") { if (!detectEncoding) cerr << "XeLaTeX comment found, switching to UTF8\n"; h_inputencoding = "utf8"; @@ -2439,7 +2439,7 @@ string Preamble::parseEncoding(Parser & p, string const & forceclass) { TeX2LyXDocClass dummy; parse(p, forceclass, true, dummy); - if (h_inputencoding != "auto" && h_inputencoding != "default") + if (h_inputencoding != "auto-legacy" && h_inputencoding != "auto-legacy-plain") return h_inputencoding; return ""; } diff --git a/src/tex2lyx/test/CJK.lyx.lyx b/src/tex2lyx/test/CJK.lyx.lyx index 2f8a20edc9..266d4ab50d 100644 --- a/src/tex2lyx/test/CJK.lyx.lyx +++ b/src/tex2lyx/test/CJK.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/CJKutf8.lyx.lyx b/src/tex2lyx/test/CJKutf8.lyx.lyx index e8370110c3..e0115ee1f3 100644 --- a/src/tex2lyx/test/CJKutf8.lyx.lyx +++ b/src/tex2lyx/test/CJKutf8.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/DummyDocument.lyx.lyx b/src/tex2lyx/test/DummyDocument.lyx.lyx index 706fe116cb..0e01be3950 100644 --- a/src/tex2lyx/test/DummyDocument.lyx.lyx +++ b/src/tex2lyx/test/DummyDocument.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/Dummy~Document.lyx.lyx b/src/tex2lyx/test/Dummy~Document.lyx.lyx index 5dbcfbfabf..1f26fee5ef 100644 --- a/src/tex2lyx/test/Dummy~Document.lyx.lyx +++ b/src/tex2lyx/test/Dummy~Document.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx index c0ce852af1..f88a7e19de 100644 --- a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx +++ b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true @@ -19,7 +19,7 @@ \maintain_unincluded_children false \language british \language_package default -\inputencoding auto +\inputencoding auto-legacy \fontencoding default \font_roman "default" "Linux Libertine O" \font_sans "default" "Linux Biolinum O" diff --git a/src/tex2lyx/test/algo2e.lyx.lyx b/src/tex2lyx/test/algo2e.lyx.lyx index e5ffea7c6c..f18e438e26 100644 --- a/src/tex2lyx/test/algo2e.lyx.lyx +++ b/src/tex2lyx/test/algo2e.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/beamer.lyx.lyx b/src/tex2lyx/test/beamer.lyx.lyx index eb7210fd0a..81c60c5a3e 100644 --- a/src/tex2lyx/test/beamer.lyx.lyx +++ b/src/tex2lyx/test/beamer.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx index cf9b0d079d..8671944359 100644 --- a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx +++ b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/listpreamble.lyx.lyx b/src/tex2lyx/test/listpreamble.lyx.lyx index ad8148862b..00119a71ca 100644 --- a/src/tex2lyx/test/listpreamble.lyx.lyx +++ b/src/tex2lyx/test/listpreamble.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/tabular-x-test.lyx.lyx b/src/tex2lyx/test/tabular-x-test.lyx.lyx index 301619f638..449c9b4455 100644 --- a/src/tex2lyx/test/tabular-x-test.lyx.lyx +++ b/src/tex2lyx/test/tabular-x-test.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-insets-basic.lyx.lyx b/src/tex2lyx/test/test-insets-basic.lyx.lyx index ab0caf583f..d9102f6438 100644 --- a/src/tex2lyx/test/test-insets-basic.lyx.lyx +++ b/src/tex2lyx/test/test-insets-basic.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-insets.lyx.lyx b/src/tex2lyx/test/test-insets.lyx.lyx index bd82254041..9f98df22eb 100644 --- a/src/tex2lyx/test/test-insets.lyx.lyx +++ b/src/tex2lyx/test/test-insets.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-memoir.lyx.lyx b/src/tex2lyx/test/test-memoir.lyx.lyx index 0e0ddcf0c2..b0d381c586 100644 --- a/src/tex2lyx/test/test-memoir.lyx.lyx +++ b/src/tex2lyx/test/test-memoir.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-minted.lyx.lyx b/src/tex2lyx/test/test-minted.lyx.lyx index 7d8a7daedf..e2a1bffee9 100644 --- a/src/tex2lyx/test/test-minted.lyx.lyx +++ b/src/tex2lyx/test/test-minted.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-modules.lyx.lyx b/src/tex2lyx/test/test-modules.lyx.lyx index b873490e4d..79ff14c5e2 100644 --- a/src/tex2lyx/test/test-modules.lyx.lyx +++ b/src/tex2lyx/test/test-modules.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx index fd08ad3262..8264db5c0c 100644 --- a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx +++ b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-scr.lyx.lyx b/src/tex2lyx/test/test-scr.lyx.lyx index 2f27ce3bd3..24eba4a6d8 100644 --- a/src/tex2lyx/test/test-scr.lyx.lyx +++ b/src/tex2lyx/test/test-scr.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-structure.lyx.lyx b/src/tex2lyx/test/test-structure.lyx.lyx index d55a688f64..16e26dcb13 100644 --- a/src/tex2lyx/test/test-structure.lyx.lyx +++ b/src/tex2lyx/test/test-structure.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test.lyx.lyx b/src/tex2lyx/test/test.lyx.lyx index 760545e5f3..2ec3708335 100644 --- a/src/tex2lyx/test/test.lyx.lyx +++ b/src/tex2lyx/test/test.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true @@ -20,7 +20,7 @@ \maintain_unincluded_children false \language english \language_package none -\inputencoding auto +\inputencoding auto-legacy \fontencoding default \font_roman "default" "default" \font_sans "default" "default" diff --git a/src/tex2lyx/test/verbatim.lyx.lyx b/src/tex2lyx/test/verbatim.lyx.lyx index bff2b84e70..db1231394b 100644 --- a/src/tex2lyx/test/verbatim.lyx.lyx +++ b/src/tex2lyx/test/verbatim.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 572 +\lyxformat 573 \begin_document \begin_header \save_transient_properties true @@ -9,7 +9,7 @@ \maintain_unincluded_children false \language english \language_package none -\inputencoding auto +\inputencoding auto-legacy \fontencoding default \font_roman "default" "default" \font_sans "default" "default" diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp index 0333034245..edcba48578 100644 --- a/src/tex2lyx/tex2lyx.cpp +++ b/src/tex2lyx/tex2lyx.cpp @@ -993,7 +993,7 @@ bool tex2lyx(FileName const & infilename, ostream & os, string encoding, // actual encoding is different (bug 7509). if (encoding.empty()) { Encoding const * enc = 0; - if (preamble.inputencoding() == "auto") { + if (preamble.inputencoding() == "auto-legacy") { ifdocstream is(setEncoding("ISO-8859-1")); // forbid buffering on this stream is.rdbuf()->pubsetbuf(0, 0); diff --git a/src/version.h b/src/version.h index bfdc4212ff..7ed1561ac9 100644 --- a/src/version.h +++ b/src/version.h @@ -32,8 +32,8 @@ extern char const * const lyx_version_info; // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -#define LYX_FORMAT_LYX 572 // kornel: Noto fonts expanded to use more options -#define LYX_FORMAT_TEX2LYX 572 +#define LYX_FORMAT_LYX 573 // gm: rename input encoding settings +#define LYX_FORMAT_TEX2LYX 573 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #ifndef _MSC_VER -- 2.39.2