Kill dollar signs and \mathcal in the output text.
#!/usr/bin/env python3
"""Creates a webpage with all entries of a .bib file"""
#!/usr/bin/env python3
"""Creates a webpage with all entries of a .bib file"""
__author__ = "Stefan Huber"
__email__ = "shuber@sthu.org"
__author__ = "Stefan Huber"
__email__ = "shuber@sthu.org"
# OTHER DEALINGS IN THE SOFTWARE.
# OTHER DEALINGS IN THE SOFTWARE.
+import os, sys, getopt, re
- return text.replace('{', '').replace('}', '').replace('\\', '')
+ # Get rid of matching dollar signs
+ text = re.sub(r'\$([^\$]*)\$', r'\1', text)
+ return text.replace('\mathcal', '').replace('{', '').replace('}', '').replace('\\', '')
def format_field_span(type, value):
return "<span class=bibentry_" + type + ">" + format_latex(value) + "</span>"
def format_field_span(type, value):
return "<span class=bibentry_" + type + ">" + format_latex(value) + "</span>"