mirror of https://github.com/eyhc1/rendercv.git
don't escape backslashes
This commit is contained in:
parent
9a01531229
commit
b28193fe68
|
@ -69,12 +69,13 @@ def escape_latex_characters(sentence: str) -> str:
|
||||||
|
|
||||||
# Handle backslash and curly braces separately because the other characters are
|
# Handle backslash and curly braces separately because the other characters are
|
||||||
# escaped with backslash and curly braces:
|
# escaped with backslash and curly braces:
|
||||||
sentence = sentence.replace("{", ">>{")
|
# --don't escape curly braces as they are used heavily in LaTeX--:
|
||||||
sentence = sentence.replace("}", ">>}")
|
# sentence = sentence.replace("{", ">>{")
|
||||||
# don't escape backslash as it is used heavily in LaTeX:
|
# sentence = sentence.replace("}", ">>}")
|
||||||
|
# --don't escape backslash as it is used heavily in LaTeX--:
|
||||||
# sentence = sentence.replace("\\", "\\textbackslash{}")
|
# sentence = sentence.replace("\\", "\\textbackslash{}")
|
||||||
sentence = sentence.replace(">>{", "\\{")
|
# sentence = sentence.replace(">>{", "\\{")
|
||||||
sentence = sentence.replace(">>}", "\\}")
|
# sentence = sentence.replace(">>}", "\\}")
|
||||||
|
|
||||||
# Loop through the letters of the sentence and if you find an escape character,
|
# Loop through the letters of the sentence and if you find an escape character,
|
||||||
# replace it with its LaTeX equivalent:
|
# replace it with its LaTeX equivalent:
|
||||||
|
|
Loading…
Reference in New Issue