diff options
Diffstat (limited to 'scripts/myemph.py')
-rwxr-xr-x | scripts/myemph.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/myemph.py b/scripts/myemph.py index 92f6202b4..0514df317 100755 --- a/scripts/myemph.py +++ b/scripts/myemph.py @@ -1,11 +1,14 @@ #!/usr/bin/env python from pandoc import toJSONFilter, rawInline +"""Pandoc filter that causes emphasis to be rendered using +the custom macro '\myemph{...}' rather than '\emph{...}' +in latex. Other output formats are unaffected. +""" + def myemph(k, v, f): if k == 'Emph' and f == 'latex': - v.insert(0, rawInline("latex", "\\myemph{")) - v.append(rawInline("latex", "}")) - return v + return [rawInline("latex", "\\myemph{")] + v + [rawInline("latex","}")] if __name__ == "__main__": toJSONFilter(myemph) |