def format_latex(text):
# Get rid of matching dollar signs
text = re.sub(r'\$([^\$]*)\$', r'\1', text)
- return text.replace('\mathcal', '').replace('{', '').replace('}', '').replace('\\', '')
+ return text.replace('\mathcal', '').replace('{', '').replace('}', '').replace('\\', '').replace('~', ' ').replace('--', '–')
def format_field_span(type, value):
return "<span class=bibentry_" + type + ">" + format_latex(value) + "</span>"