From 16935917deb6a1fdbc7e3c43504cd8ac89542cd7 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sat, 22 Oct 2011 10:59:39 +0000 Subject: [PATCH] Increase tex2lyx output format to 393. 389: Nothing to do (html output changes) 390: Nothing to do (empty lyx2lyx conversion) 391: Nothing to do (empty lyx2lyx conversion) 392: Activated already prepared required arguments code 393: Renamed OptArg inset to Argument git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39915 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/TODO.txt | 3 +++ src/tex2lyx/tex2lyx.h | 2 +- src/tex2lyx/text.cpp | 14 +++++++------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt index 0b46ee6ca8..9c564b583e 100644 --- a/src/tex2lyx/TODO.txt +++ b/src/tex2lyx/TODO.txt @@ -86,4 +86,7 @@ Format LaTeX feature LyX feature 386 LyX version InsetInfo 388 page sizes A0-3, A6, B0-3, B6, \papersize JIS B0-6 +390 forward/reverse search \forward_search, \forward_macro +391 decimal alignment in tables InsetTabular +392 new beamer format InsetLayout diff --git a/src/tex2lyx/tex2lyx.h b/src/tex2lyx/tex2lyx.h index b2a67b49f8..9d0e4a1923 100644 --- a/src/tex2lyx/tex2lyx.h +++ b/src/tex2lyx/tex2lyx.h @@ -165,7 +165,7 @@ extern bool noweb_mode; /// Did we recognize any pdflatex-only construct? extern bool pdflatex; /// LyX format that is created by tex2lyx -int const LYX_FORMAT = 388; +int const LYX_FORMAT = 393; /// path of the master .tex file extern std::string getMasterFilePath(); diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 449e500348..1f2d542014 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -577,7 +577,7 @@ void output_command_layout(ostream & os, Parser & p, bool outer, p.next_token().character() != '[') break; p.get_token(); // eat '[' - begin_inset(os, "OptArg\n"); + begin_inset(os, "Argument\n"); os << "status collapsed\n\n"; parse_text_in_inset(p, os, FLAG_BRACK_LAST, outer, context); end_inset(os); @@ -585,12 +585,12 @@ void output_command_layout(ostream & os, Parser & p, bool outer, ++optargs; } unsigned int reqargs = 0; - while (LYX_FORMAT >= 392 && reqargs < context.layout->reqargs) { + while (reqargs < context.layout->reqargs) { eat_whitespace(p, os, context, false); if (p.next_token().cat() != catBegin) break; p.get_token(); // eat '{' - begin_inset(os, "OptArg\n"); + begin_inset(os, "Argument\n"); os << "status collapsed\n\n"; parse_text_in_inset(p, os, FLAG_BRACE_LAST, outer, context); end_inset(os); @@ -1219,7 +1219,7 @@ void parse_environment(Parser & p, ostream & os, bool outer, context.check_layout(os); need_layout = false; } - begin_inset(os, "OptArg\n"); + begin_inset(os, "Argument\n"); os << "status collapsed\n\n"; parse_text_in_inset(p, os, FLAG_BRACK_LAST, outer, context); end_inset(os); @@ -1227,7 +1227,7 @@ void parse_environment(Parser & p, ostream & os, bool outer, ++optargs; } unsigned int reqargs = 0; - while (LYX_FORMAT >= 392 && reqargs < context.layout->reqargs) { + while (reqargs < context.layout->reqargs) { eat_whitespace(p, os, context, false); if (p.next_token().cat() != catBegin) break; @@ -1236,7 +1236,7 @@ void parse_environment(Parser & p, ostream & os, bool outer, context.check_layout(os); need_layout = false; } - begin_inset(os, "OptArg\n"); + begin_inset(os, "Argument\n"); os << "status collapsed\n\n"; parse_text_in_inset(p, os, FLAG_BRACE_LAST, outer, context); end_inset(os); @@ -2078,7 +2078,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, if (p.next_token().cat() != catEscape && p.next_token().character() == '[') { p.get_token(); // eat '[' - begin_inset(os, "OptArg\n"); + begin_inset(os, "Argument\n"); os << "status collapsed\n"; parse_text_in_inset(p, os, FLAG_BRACK_LAST, outer, context); end_inset(os); -- 2.39.5