LaTeX fragments in smu ====================== Subject: [PATCH] Do not process math inside LaTeX delimiters --- smu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/smu.c b/smu.c index ebded4d..fb7a32e 100644 --- a/smu.c +++ b/smu.c @@ -76,6 +76,9 @@ static Tag surround[] = { { "**", 1, "", "" }, { "_", 1, "", "" }, { "*", 1, "", "" }, + /* LaTeX delimiters */ + { "$$", -1, "$$", "$$" }, + { "$", -1, "$", "$" }, }; static const char *replace[][2] = { @@ -667,7 +670,9 @@ dosurround(const char *begin, const char *end, int newblock) { l++; } - if (surround[i].process) + if (surround[i].process < 0) + fwrite(start, sizeof(char), stop - start, stdout); + else if (surround[i].process) process(start, stop, 0); else hprint(start, stop); -- 2.50.1 References ---------- * https://github.com/karlb/smu