#include "MathSupport.h"
#include "Buffer.h"
+#include "BufferParams.h"
#include "Encoding.h"
#include "Lexer.h"
}
else if (t.cs().size()) {
- bool const is_user_macro =
- buf && (mode_ & Parse::TRACKMACRO
+ bool const no_mhchem =
+ (t.cs() == "ce" || t.cs() == "cf") && buf
+ && buf->params().use_mhchem == BufferParams::package_off;
+ bool const is_user_macro = no_mhchem ||
+ (buf && (mode_ & Parse::TRACKMACRO
? buf->usermacros.count(t.cs()) != 0
- : buf->getMacro(t.cs(), false) != 0);
+ : buf->getMacro(t.cs(), false) != 0));
latexkeys const * l = in_word_set(t.cs());
if (l && !is_user_macro) {
if (l->inset == "big") {