]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
* src/LaTeXFeatures.cpp: simplify greektext definition. Patch by G. Milde (bug #6458)
[lyx.git] / src / TextClass.cpp
index ee4315054714250efac8484d11a0d55e4aa03e33..6d13d7de0a26b0d92aae8e9d2ce9476f365521f2 100644 (file)
@@ -837,7 +837,10 @@ void TextClass::readClassOptions(Lexer & lexrc)
                        break;
                case CO_OTHER:
                        lexrc.next();
-                       options_ = lexrc.getString();
+                       if (options_.empty())
+                               options_ = lexrc.getString();
+                       else
+                               options_ += ',' + lexrc.getString();
                        break;
                case CO_HEADER:
                        lexrc.next();
@@ -863,7 +866,13 @@ void TextClass::readCiteFormat(Lexer & lexrc)
                        break;
                lexrc.eatLine();
                definition = lexrc.getString();
-               cite_formats_[etype] = definition;
+               char initchar = etype[0];
+               if (initchar == '#')
+                       continue;
+               if (initchar == '!' || initchar == '_')
+                       cite_macros_[etype] = definition;
+               else
+                       cite_formats_[etype] = definition;
        }
 }
 
@@ -1135,7 +1144,8 @@ bool TextClass::load(string const & path) const
                       << to_utf8(makeDisplayPath(layout_file.absFilename()))
                       << "'\n(Check `" << name_
                       << "')\nCheck your installation and "
-                       "try Options/Reconfigure..." << endl;
+                         "try Options/Reconfigure..." 
+                      << endl;
        }
 
        return loaded_;
@@ -1361,6 +1371,16 @@ string const & DocumentClass::getCiteFormat(string const & entry_type) const
 }
 
 
+string const & DocumentClass::getCiteMacro(string const & macro) const
+{
+       static string empty;
+       map<string, string>::const_iterator it = cite_macros_.find(macro);
+       if (it != cite_macros_.end())
+               return it->second;
+       return empty;
+}
+
+
 /////////////////////////////////////////////////////////////////////////
 //
 // PageSides