]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
HTML for stackrel.
[lyx.git] / src / TextClass.cpp
index ee4315054714250efac8484d11a0d55e4aa03e33..6bc0bc0c8e65aded738618c509014955e8c4588b 100644 (file)
@@ -863,7 +863,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;
        }
 }
 
@@ -1361,6 +1367,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