Jose' Matos wrote: > > Should I prepare a patch with another file format change? > > Â Yes.
Patch attached. Please review. Am I right that norhing has to be done on lyx2lyx reversion? Jürgen
Index: development/FORMAT =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/FORMAT,v retrieving revision 1.42 diff -p -u -r1.42 FORMAT --- development/FORMAT 28 Sep 2005 09:40:46 -0000 1.42 +++ development/FORMAT 12 Oct 2005 12:33:44 -0000 @@ -1,6 +1,11 @@ LyX file-format changes ----------------------- +2005-10-12 Jürgen Spitzmüller <[EMAIL PROTECTED]> + + * format incremented to 245. The \quotes_times parameter + has been removed. + 2005-09-24 Jürgen Spitzmüller <[EMAIL PROTECTED]> * format incremented to 244. Rename '\InsetSpace \,' Index: lib/lyx2lyx/LyX.py =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/LyX.py,v retrieving revision 1.26 diff -p -u -r1.26 LyX.py --- lib/lyx2lyx/LyX.py 28 Sep 2005 14:29:23 -0000 1.26 +++ lib/lyx2lyx/LyX.py 12 Oct 2005 12:33:49 -0000 @@ -46,7 +46,7 @@ format_relation = [("0_10", [210], ["0. ("1_1_6fix3", [218], ["1.1.6fix3","1.1.6fix4","1.1"]), ("1_2", [220], ["1.2.0","1.2.1","1.2.3","1.2.4","1.2"]), ("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3"]), - ("1_4", range(222,245), ["1.4.0cvs","1.4"])] + ("1_4", range(222,246), ["1.4.0cvs","1.4"])] def formats_list(): @@ -481,7 +481,6 @@ class NewFile(LyX_Base): "\\paragraph_separation indent", "\\defskip medskip", "\\quotes_language english", - "\\quotes_times 2", "\\papercolumns 1", "\\papersides 1", "\\paperpagestyle default", Index: lib/lyx2lyx/lyx_1_4.py =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyx_1_4.py,v retrieving revision 1.53 diff -p -u -r1.53 lyx_1_4.py --- lib/lyx2lyx/lyx_1_4.py 28 Sep 2005 09:40:48 -0000 1.53 +++ lib/lyx2lyx/lyx_1_4.py 12 Oct 2005 12:33:54 -0000 @@ -2258,6 +2258,13 @@ def remove_paperpackage(file): file.header[i] = "\\papersize default" +def remove_quotestimes(file): + i = find_token(file.header, '\\quotes_times', 0) + if i == -1: + return + del file.header[i] + + ## # Convertion hub # @@ -2286,9 +2293,11 @@ convert = [[222, [insert_tracking_change [241, [convert_ert_paragraphs]], [242, [convert_french]], [243, [remove_paperpackage]], - [244, [rename_spaces]]] + [244, [rename_spaces]], + [245, [remove_quotestimes]]] -revert = [[243, [revert_space_names]], +revert = [[244, []], + [243, [revert_space_names]], [242, []], [241, []], [240, [revert_ert_paragraphs]], Index: src/buffer.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v retrieving revision 1.628 diff -p -u -r1.628 buffer.C --- src/buffer.C 28 Sep 2005 09:40:49 -0000 1.628 +++ src/buffer.C 12 Oct 2005 12:43:34 -0000 @@ -144,7 +144,7 @@ extern BufferList bufferlist; namespace { -int const LYX_FORMAT = 244; +int const LYX_FORMAT = 245; } // namespace anon Index: src/bufferparams.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/bufferparams.C,v retrieving revision 1.100 diff -p -u -r1.100 bufferparams.C --- src/bufferparams.C 17 Jul 2005 11:17:12 -0000 1.100 +++ src/bufferparams.C 12 Oct 2005 12:43:36 -0000 @@ -105,25 +105,6 @@ QuotesLangTranslator const & quoteslangt } -// Quote times -typedef Translator<int, InsetQuotes::quote_times> QuotesTimesTranslator; - - -QuotesTimesTranslator const init_quotestimestranslator() -{ - QuotesTimesTranslator translator(1, InsetQuotes::SingleQ); - translator.addPair(2, InsetQuotes::DoubleQ); - return translator; -} - - -QuotesTimesTranslator const & quotestimestranslator() -{ - static QuotesTimesTranslator translator = init_quotestimestranslator(); - return translator; -} - - // Paper size typedef Translator<std::string, PAPER_SIZE> PaperSizeTranslator; @@ -307,7 +288,6 @@ BufferParams::BufferParams() { paragraph_separation = PARSEP_INDENT; quotes_language = InsetQuotes::EnglishQ; - quotes_times = InsetQuotes::DoubleQ; fontsize = "default"; /* PaperLayout */ @@ -460,10 +440,6 @@ string const BufferParams::readToken(LyX string quotes_lang; lex >> quotes_lang; quotes_language = quoteslangtranslator().find(quotes_lang); - } else if (token == "\\quotes_times") { - int qtimes; - lex >> qtimes; - quotes_times = quotestimestranslator().find(qtimes); } else if (token == "\\papersize") { string ppsize; lex >> ppsize; @@ -663,9 +639,7 @@ void BufferParams::writeFile(ostream & o << string_paragraph_separation[paragraph_separation] << "\n\\defskip " << getDefSkip().asLyXCommand() << "\n\\quotes_language " - << string_quotes_language[quotes_language] << '\n' - << "\\quotes_times " - << quotestimestranslator().find(quotes_times) + << string_quotes_language[quotes_language] << "\n\\papercolumns " << columns << "\n\\papersides " << sides << "\n\\paperpagestyle " << pagestyle << '\n'; Index: src/text3.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v retrieving revision 1.310 diff -p -u -r1.310 text3.C --- src/text3.C 7 Oct 2005 12:00:40 -0000 1.310 +++ src/text3.C 12 Oct 2005 12:43:41 -0000 @@ -958,12 +958,10 @@ void LyXText::dispatch(LCursor & cur, Fu cur.insert(new InsetQuotes(c, bufparams.quotes_language, InsetQuotes::SingleQ)); - else if (arg == "double") + else cur.insert(new InsetQuotes(c, bufparams.quotes_language, InsetQuotes::DoubleQ)); - else - cur.insert(new InsetQuotes(c, bufparams)); cur.posRight(); } else Index: src/tex2lyx/preamble.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tex2lyx/preamble.C,v retrieving revision 1.31 diff -p -u -r1.31 preamble.C --- src/tex2lyx/preamble.C 18 Jul 2005 13:07:16 -0000 1.31 +++ src/tex2lyx/preamble.C 12 Oct 2005 12:43:47 -0000 @@ -82,7 +82,6 @@ string h_tocdepth = "3"; string h_paragraph_separation = "indent"; string h_defskip = "medskip"; string h_quotes_language = "english"; -string h_quotes_times = "2"; string h_papercolumns = "1"; string h_papersides = string(); string h_paperpagestyle = "default"; @@ -233,7 +232,7 @@ void handle_package(string const & name, void end_preamble(ostream & os, LyXTextClass const & /*textclass*/) { os << "#LyX file created by tex2lyx 0.1.2\n" - << "\\lyxformat 243\n" + << "\\lyxformat 245\n" << "\\begin_document\n" << "\\begin_header\n" << "\\textclass " << h_textclass << "\n" @@ -257,7 +256,6 @@ void end_preamble(ostream & os, LyXTextC << "\\paragraph_separation " << h_paragraph_separation << "\n" << "\\defskip " << h_defskip << "\n" << "\\quotes_language " << h_quotes_language << "\n" - << "\\quotes_times " << h_quotes_times << "\n" << "\\papercolumns " << h_papercolumns << "\n" << "\\papersides " << h_papersides << "\n" << "\\paperpagestyle " << h_paperpagestyle << "\n"