]> git.lyx.org Git - features.git/commitdiff
Increase tex2lyx output format to 405.
authorGeorg Baum <georg.baum@post.rwth-aachen.de>
Sat, 22 Oct 2011 17:25:34 +0000 (17:25 +0000)
committerGeorg Baum <georg.baum@post.rwth-aachen.de>
Sat, 22 Oct 2011 17:25:34 +0000 (17:25 +0000)
402: Nothing to do (tex2lyx does not support bibtotoc)
403: Nothing to do (the old code already used the new layouts, bug #7780)
404: Nothing to do (write new prettyref syntax)
405: Nothing to do (empty lyx2lyx conversion)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39920 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/TODO.txt
src/tex2lyx/preamble.cpp
src/tex2lyx/tex2lyx.h
src/tex2lyx/text.cpp

index 8cb0e6929bc37afecc31992c2edeb572aa5413f2..36400ff17042bfd4eab7189a16eb2657ce8e9aca 100644 (file)
@@ -95,4 +95,7 @@ Format LaTeX feature                        LyX feature
 399    automatic mathdots loading           \use_mathdots
 400    other rules than \lyxline            InsetLine
 401    feyn.sty                             InsetMathDiagram
+402    \addcontentsline                     InsetBibtex bibtotoc option
+404    refstyle.sty                         InsetRef
+405    author hash                          \author
 
index cbdbb5de6ea146a6b945c84ca221594df16934d9..9346049d01f2aa9083eaa14def712c36714aa284 100644 (file)
@@ -205,6 +205,8 @@ string h_use_mathdots            = "0";
 string h_cite_engine             = "basic";
 string h_use_bibtopic            = "false";
 string h_paperorientation        = "portrait";
+string h_suppress_date           = "false";
+string h_use_refstyle            = "0";
 string h_notefontcolor;
 string h_secnumdepth             = "3";
 string h_tocdepth                = "3";
@@ -734,7 +736,9 @@ void end_preamble(ostream & os, TextClass const & /*textclass*/)
           << "\\use_mathdots " << h_use_mathdots << "\n"
           << "\\cite_engine " << h_cite_engine << "\n"
           << "\\use_bibtopic " << h_use_bibtopic << "\n"
-          << "\\paperorientation " << h_paperorientation << '\n';
+          << "\\paperorientation " << h_paperorientation << '\n'
+          << "\\suppress_date " << h_suppress_date << '\n'
+          << "\\use_refstyle " << h_use_refstyle << '\n';
        if (!h_notefontcolor.empty())
                os << "\\notefontcolor " << h_notefontcolor << '\n';
        os << h_margins
index 546c9211a8af3bf9b990730a2de5b425cf346c7a..551fb998ed0294e86f323ffbaf540e2cb1a8c8ad 100644 (file)
@@ -166,7 +166,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 = 401;
+int const LYX_FORMAT = 405;
 
 /// path of the master .tex file
 extern std::string getMasterFilePath();
index 930b318c53e8e7e2360c98079c49f7c882c74c50..75c5745c958e2a273c441c696940da4fe02e114e 100644 (file)
@@ -109,6 +109,9 @@ string parse_text_snippet(Parser & p, unsigned flags, const bool outer,
 char const * const known_ref_commands[] = { "ref", "pageref", "vref",
  "vpageref", "prettyref", "eqref", 0 };
 
+char const * const known_coded_ref_commands[] = { "ref", "pageref", "vref",
+ "vpageref", "formatted", "eqref", 0 };
+
 /*!
  * natbib commands.
  * The starred forms are also known except for "citefullauthor",
@@ -2471,7 +2474,10 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        string const opt = p.getOpt();
                        if (opt.empty()) {
                                context.check_layout(os);
-                               begin_command_inset(os, "ref", t.cs());
+                               char const * const * where = is_known(t.cs(),
+                                       known_ref_commands);
+                               begin_command_inset(os, "ref",
+                                       known_coded_ref_commands[where - known_ref_commands]);
                                os << "reference \""
                                   << convert_command_inset_arg(p.verbatim_item())
                                   << "\"\n";