}
+bool is_display_math_env(string const & name)
+{
+ CommandMap::const_iterator it = known_math_environments.find(name);
+ if (it != known_math_environments.end())
+ if (!it->second.empty())
+ return it->second.back() == displaymath;
+ return false;
+}
+
+
void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode)
{
while (p.good()) {
//
if (t.cat() == catMath) {
if (mode == MATHTEXT_MODE) {
- // we are inside some text mode thingy, so opening new math is allowed
+ // we are inside some text mode thing, so opening new math is allowed
Token const & n = p.get_token();
if (n.cat() == catMath) {
// TeX's $$...$$ syntax for displayed math
t.cat() == catAlign ||
t.cat() == catActive ||
t.cat() == catParameter)
- os << t.character();
+ os << t.cs();
else if (t.cat() == catBegin) {
os << '{';