string fboxsep = "";
string shadow_size = "";
+char const * const known_babel_shorthands[] = { "\"", "|", "-", "~", "=", "/",
+ "~", "*", ":", "_", "x", "'", "`", "<", ">", 0 };
+
char const * const known_ref_commands[] = { "ref", "pageref", "vref",
"vpageref", "prettyref", "nameref", "eqref", 0 };
// verbatim).
if (t.asInput() == "\"") {
string s = "\"";
- // These are known pairs. We put them together in
+ // We put the known shorthand pairs together in
// one ERT inset. In other cases (such as "a), only
// the quotation mark is ERTed.
- if (p.next_token().asInput() == "\""
- || p.next_token().asInput() == "|"
- || p.next_token().asInput() == "-"
- || p.next_token().asInput() == "~"
- || p.next_token().asInput() == "="
- || p.next_token().asInput() == "/"
- || p.next_token().asInput() == "~"
- || p.next_token().asInput() == "*"
- || p.next_token().asInput() == ":"
- || p.next_token().asInput() == "_"
- || p.next_token().asInput() == "x"
- || p.next_token().asInput() == "'"
- || p.next_token().asInput() == "`"
- || p.next_token().asInput() == "<"
- || p.next_token().asInput() == ">") {
+ if (is_known(p.next_token().asInput(), known_babel_shorthands)) {
s += p.next_token().asInput();
p.get_token();
}