Spaces:
Running
Running
Update modules/latex2bbox_color.py
Browse files
modules/latex2bbox_color.py
CHANGED
|
@@ -202,6 +202,8 @@ def latex2bbox_color(input_arg):
|
|
| 202 |
log = f"ERROR, Tokenize latex failed: {basename}."
|
| 203 |
logging.info(log)
|
| 204 |
new_latex = latex
|
|
|
|
|
|
|
| 205 |
new_latex = new_latex.replace("< P E R C E N T A G E T O K E N >", "\%")
|
| 206 |
latex = normalize_latex(new_latex)
|
| 207 |
token_list = []
|
|
|
|
| 202 |
log = f"ERROR, Tokenize latex failed: {basename}."
|
| 203 |
logging.info(log)
|
| 204 |
new_latex = latex
|
| 205 |
+
if contains_chinese(new_latex):
|
| 206 |
+
new_latex = new_latex.replace("\\mathrm", "\\text")
|
| 207 |
new_latex = new_latex.replace("< P E R C E N T A G E T O K E N >", "\%")
|
| 208 |
latex = normalize_latex(new_latex)
|
| 209 |
token_list = []
|