]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
Only show Accept/Reject Change options if relevant
[lyx.git] / src / TextClass.cpp
index eb79e13eaef1710cc55b5896e4ae554033525155..25965c6762ef367d3324964e449dac2aff422b00 100644 (file)
@@ -62,7 +62,7 @@ namespace lyx {
 // You should also run the development/tools/updatelayouts.py script,
 // to update the format of all of our layout files.
 //
-int const LAYOUT_FORMAT = 63; //spitz: new tags CiteFramework, MaxCiteNames, extended InsetCite syntax.
+int const LAYOUT_FORMAT = 66; //spitz: New layout tag AutoNests
 
 
 // Layout format for the current lyx file format. Controls which format is
@@ -152,7 +152,7 @@ TextClass::TextClass()
          opt_enginetype_("authoryear|numerical"), opt_fontsize_("10|11|12"),
          opt_pagestyle_("empty|plain|headings|fancy"), pagestyle_("default"),
          columns_(1), sides_(OneSide), secnumdepth_(3), tocdepth_(3),
-         outputType_(LATEX), outputFormat_("latex"),
+         outputType_(LATEX), outputFormat_("latex"), has_output_format_(false),
          defaultfont_(sane_font),
          titletype_(TITLE_COMMAND_AFTER), titlename_("maketitle"),
          min_toclevel_(0), max_toclevel_(0), maxcitenames_(2),
@@ -445,8 +445,10 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
                        break;
 
                case TC_OUTPUTFORMAT:
-                       if (lexrc.next())
+                       if (lexrc.next()) {
                                outputFormat_ = lexrc.getString();
+                               has_output_format_ = true;
+                       }
                        break;
 
                case TC_OUTPUTTYPE:
@@ -1177,7 +1179,7 @@ bool TextClass::readCiteFormat(Lexer & lexrc)
                char initchar = etype[0];
                if (initchar == '#')
                        continue;
-               if (initchar == '!' || initchar == '_') {
+               if (initchar == '!' || initchar == '_' || prefixIs(etype, "B_")) {
                        if (type & ENGINE_TYPE_AUTHORYEAR)
                                cite_macros_[ENGINE_TYPE_AUTHORYEAR][etype] = definition;
                        if (type & ENGINE_TYPE_NUMERICAL)