########################################################################## ## # The Coq Proof Assistant / The Coq Development Team ## ## v # INRIA, CNRS and contributors - Copyright 1999-2018 ## ## here def htmlize(notation): """Translate notation to a dominate HTML tree""" top = tags.span(_class='notation') with top: TacticNotationsToHTMLVisitor().visit(parse(notation)) return top def htmlize_str(notation): """Translate notation to a raw HTML document""" # ‘pretty=True’ introduces spurious spaces return htmlize(notation).render(pretty=False) def htmlize_p(notation): """Like `htmlize`, wrapped in a ‘p’. Does not return: instead, must be run in a dominate context. """ with tags.p(): htmlize(notation)