From: Georg Baum Date: Fri, 21 Oct 2011 21:11:37 +0000 (+0000) Subject: Increase tex2lyx output format to 388. X-Git-Tag: 2.1.0beta1~2549 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a1030cc59995787edd6fce24411699de5b0622ac;p=lyx.git Increase tex2lyx output format to 388. 379: Nothing to do (html output changes) 380: Nothing to do (empty lyx2lyx conversion) 381: Nothing to do (empty lyx2lyx conversion) 382: Activated already prepared notefontcolor code 383: Nothing to do (empty lyx2lyx conversion) 384: Nothing to do (empty lyx2lyx conversion) 385: Nothing to do (empty lyx2lyx conversion) 386: Nothing to do (empty lyx2lyx conversion) 387: Nothing to do (empty lyx2lyx conversion) 388: Nothing to do (empty lyx2lyx conversion) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39912 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt index f3d46de5ba..0b46ee6ca8 100644 --- a/src/tex2lyx/TODO.txt +++ b/src/tex2lyx/TODO.txt @@ -67,7 +67,6 @@ Format LaTeX feature LyX feature 362 applemac encoding \encoding 363 horizontal longtable alignment InsetTabular 364 branch file name suffix \filename_suffix -365 custom paragraph indentation \paragraph_indentation 366 relative lengths for parskip \defskip 367 relative lengths for h and v space InsetHSpace, InsetVSpace 368 glue lengths InsetHSpace @@ -79,4 +78,12 @@ Format LaTeX feature LyX feature 376 update .aux of unincluded children \maintain_unincluded_children 377 multirow.sty InsetTabular 378 revision info InsetInfo +380 ? InsetPreview +381 \xymatrix@!{0,R,C} InsetMathXYMatrix +382 note_fontcolor InsetNote +384 document font color \fontcolor +385 shaded box background color \boxbgcolor +386 LyX version InsetInfo +388 page sizes A0-3, A6, B0-3, B6, \papersize + JIS B0-6 diff --git a/src/tex2lyx/preamble.cpp b/src/tex2lyx/preamble.cpp index bc42a3d4fb..c9c0ec48c6 100644 --- a/src/tex2lyx/preamble.cpp +++ b/src/tex2lyx/preamble.cpp @@ -53,7 +53,7 @@ string h_inputencoding = "auto"; namespace { //add this to known_languages when updating to lyxformat 266: -// "armenian" +// "armenian" (needs special handling since not supported by standard babel) //add these to known_languages when updating to lyxformat 268: //"chinese-simplified", "chinese-traditional", "japanese", "korean" // Both changes require first that support for non-babel languages (CJK, @@ -61,7 +61,7 @@ namespace { // add turkmen for lyxformat 383 /** * known babel language names (including synonyms) - * not in standard babel: arabic, arabtex, belarusian, serbian-latin, thai + * not in standard babel: arabic, arabtex, armenian, belarusian, serbian-latin, thai * not yet supported by LyX: kurmanji * please keep this in sync with known_coded_languages line by line! */ @@ -77,8 +77,9 @@ const char * const known_languages[] = {"acadian", "afrikaans", "albanian", "ngerman", "ngermanb", "norsk", "nynorsk", "polutonikogreek", "polish", "portuges", "portuguese", "romanian", "russian", "russianb", "samin", "scottish", "serbian", "serbian-latin", "slovak", "slovene", "spanish", -"swedish", "thai", "turkish", "ukraineb", "ukrainian", "uppersorbian", -"UKenglish", "USenglish", "usorbian", "vietnam", "welsh", 0}; +"swedish", "thai", "turkish", "turkmen", "ukraineb", "ukrainian", +"uppersorbian", "UKenglish", "USenglish", "usorbian", "vietnam", "welsh", +0}; /** * the same as known_languages with .lyx names @@ -96,21 +97,21 @@ const char * const known_coded_languages[] = {"french", "afrikaans", "albanian", "ngerman", "ngerman", "norsk", "nynorsk", "polutonikogreek", "polish", "portuguese", "portuguese", "romanian", "russian", "russian", "samin", "scottish", "serbian", "serbian-latin", "slovak", "slovene", "spanish", -"swedish", "thai", "turkish", "ukrainian", "ukrainian", "uppersorbian", -"uppersorbian", "english", "english", "vietnamese", "welsh", 0}; +"swedish", "thai", "turkish", "turkmen", "ukrainian", "ukrainian", +"uppersorbian", "uppersorbian", "english", "english", "vietnamese", "welsh", +0}; /// languages with english quotes (.lyx names) const char * const known_english_quotes_languages[] = {"american", "bahasa", "bahasam", "brazilian", "canadian", "chinese-simplified", "english", "esperanto", "hebrew", "irish", "korean", "portuguese", "scottish", "thai", 0}; -//add this to known_french_quotes_languages when updating to -//lyxformat 383: "turkmen" /// languages with french quotes (.lyx names) const char * const known_french_quotes_languages[] = {"albanian", "arabic_arabi", "arabic_arabtex", "basque", "canadien", "catalan", "french", "galician", "greek", "italian", "norsk", "nynorsk", "polutonikogreek", -"russian", "spanish", "spanish-mexico", "turkish", "ukrainian", "vietnamese", 0}; +"russian", "spanish", "spanish-mexico", "turkish", "turkmen", "ukrainian", +"vietnamese", 0}; /// languages with german quotes (.lyx names) const char * const known_german_quotes_languages[] = {"austrian", "bulgarian", @@ -215,6 +216,8 @@ string h_paperpagestyle = "default"; string h_listings_params; string h_tracking_changes = "false"; string h_output_changes = "false"; +string h_html_math_output = "0"; +string h_html_be_strict = "false"; string h_margins; @@ -727,13 +730,13 @@ void end_preamble(ostream & os, TextClass const & /*textclass*/) << "\\cite_engine " << h_cite_engine << "\n" << "\\use_bibtopic " << h_use_bibtopic << "\n" << "\\paperorientation " << h_paperorientation << '\n'; - if (LYX_FORMAT >= 382 && !h_notefontcolor.empty()) + if (!h_notefontcolor.empty()) os << "\\notefontcolor " << h_notefontcolor << '\n'; os << h_margins << "\\secnumdepth " << h_secnumdepth << "\n" << "\\tocdepth " << h_tocdepth << "\n" << "\\paragraph_separation " << h_paragraph_separation << "\n"; - if (LYX_FORMAT < 365 || h_paragraph_separation == "skip") + if (h_paragraph_separation == "skip") os << "\\defskip " << h_defskip << "\n"; else os << "\\paragraph_indentation " << h_paragraph_indentation << "\n"; @@ -745,6 +748,8 @@ void end_preamble(ostream & os, TextClass const & /*textclass*/) os << "\\listings_params " << h_listings_params << "\n"; os << "\\tracking_changes " << h_tracking_changes << "\n" << "\\output_changes " << h_output_changes << "\n" + << "\\html_math_output " << h_html_math_output << "\n" + << "\\html_be_strict " << h_html_be_strict << "\n" << "\\end_header\n\n" << "\\begin_body\n"; // clear preamble for subdocuments @@ -1023,11 +1028,8 @@ void parse_preamble(Parser & p, ostream & os, if (name == "\\parindent" && content != "") { if (content[0] == '0') h_paragraph_separation = "skip"; - else if (LYX_FORMAT >= 365) - h_paragraph_indentation = translate_len(content); else - h_preamble << "\\setlength{" << name - << "}{" << content << "}"; + h_paragraph_indentation = translate_len(content); } else if (name == "\\parskip") { if (content == "\\smallskipamount") h_defskip = "smallskip"; @@ -1090,8 +1092,7 @@ void parse_preamble(Parser & p, ostream & os, string const color = p.getArg('{', '}'); string const space = p.getArg('{', '}'); string const value = p.getArg('{', '}'); - if (LYX_FORMAT >= 382 && - color == "note_fontcolor" && space == "rgb") { + if (color == "note_fontcolor" && space == "rgb") { RGBColor c(RGBColorFromLaTeX(value)); h_notefontcolor = X11hexname(c); } else { diff --git a/src/tex2lyx/tex2lyx.h b/src/tex2lyx/tex2lyx.h index 3b09e14db4..b2a67b49f8 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 = 378; +int const LYX_FORMAT = 388; /// path of the master .tex file extern std::string getMasterFilePath();