]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathParser.h
hopefully fix tex2lyx linking.
[lyx.git] / src / mathed / MathParser.h
index 30b274133eca89bec0e7a802384c26719edf514a..a64b85d66e3f9f74046e739f70ac2b3220fd8a1e 100644 (file)
@@ -14,6 +14,7 @@
 #define MATH_PARSER_H
 
 #include "support/types.h"
+#include "support/docstring.h"
 
 #include <string>
 #include <vector>
@@ -31,34 +32,46 @@ class LyXLex;
 class latexkeys {
 public:
        /// name of the macro or primitive
-       std::string name;
+       docstring name;
        /// name of a inset that handles that macro
-       std::string inset;
-       /// position of the ting in a font
-        std::vector<char_type> draw;
+       docstring inset;
+       /**
+        * The string or symbol to draw.
+        * This is a string of length 1 if \p name is a known symbol, and
+        * the corresponding font is available. In this case it is
+        * NO UCS4 STRING! The only "character" of the string simply denotes
+        * the code point of the symbol in the font. Therefore you have to
+        * be very careful if you pass \c draw to any function that takes a
+        * docstring argument.
+        * If \p name is a known symbol, but the corresponding font is not
+        * available, or if it is a function name, then \c draw contains a
+        * regular UCS4 string (actuallay \c draw == \c name) that is painted
+        * on screen.
+        */
+       docstring draw;
        /// operator/..., fontname e
-       std::string extra;
-       /// how is this called as XML entity?
-       std::string xmlname;
+       docstring extra;
+       /// how is this called as XML entity in MathML?
+       docstring xmlname;
        /// required LaTeXFeatures
-       std::string requires;
+       docstring requires;
 };
 
 
 /// check whether this is a well-known (La)TeX macro or primitive
-latexkeys const * in_word_set(std::string const & str);
+latexkeys const * in_word_set(docstring const & str);
 
 /// parse formula from a string
-bool mathed_parse_normal(MathAtom &, std::string const &);
+bool mathed_parse_normal(MathAtom &, docstring const &);
 /// ... a stream
 bool mathed_parse_normal(MathAtom &, std::istream &);
 /// ... the LyX lexxer
 bool mathed_parse_normal(MathAtom &, LyXLex &);
 /// ... the LyX lexxer
-void mathed_parse_normal(InsetMathGrid &, std::string const &);
+void mathed_parse_normal(InsetMathGrid &, docstring const &);
 
 /// parse a single cell from a string
-void mathed_parse_cell(MathArray & ar, std::string const &);
+void mathed_parse_cell(MathArray & ar, docstring const &);
 /// ... a stream
 void mathed_parse_cell(MathArray & ar, std::istream &);