X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/131deef1eba442d6e05c2ff6c6f7669b4b9e2b24..refs/heads/main:/texfilter.py?ds=sidebyside diff --git a/texfilter.py b/texfilter.py index 8103c19..e215b18 100644 --- a/texfilter.py +++ b/texfilter.py @@ -11,8 +11,10 @@ from typing import Callable, List, Tuple TexFilters: List[Tuple[str, Callable[[bytes], bytes]]] = [ # Work around `Extra }, or forgotten \endgroup.` - ("FixBareEmph", lambda x: re.sub( - b'(^|\n)(\\\\emph{)', b'\\1\\\\hspace{0pt}\\2', x)), + ("FixBareNesting", lambda x: re.sub( + b'(^|\n)(\\\\(emph|st){)', b'\\1\\\\hspace{0pt}\\2', x)), + ("UnicodeApprox", lambda x: re.sub('≈'.encode('utf-8'), b'$\\approx$', x)), + ("UnicodeTriangle", lambda x: re.sub('◁'.encode('utf-8'), b'$\\lhd$', x)), ]