Skip to content

Commit

Permalink
FIX: {end_ang} and {radi} not seen as variables
Browse files Browse the repository at this point in the history
The formatted string literal (f-string) started at line 1152 is interrupted by the line break. So on line 1153 the variables end_ang, radi and the escape characters {} were not recognised correctly, but were recognised as constant strings, generating the error "Package PGF Math Error: Unknown function `end_ang'/'radi' (in 'end_ang'/'radi')" in LaTeX.
Adding the f-string alias f before the string on line 1153 solves the problem.
  • Loading branch information
ViBevilacqua authored Jan 4, 2024
1 parent 5069a1e commit 1f14996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion svg2tikz/tikz_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ def convert_path_to_tikz(self, path):
if ang != 0.0:
s += (
"{" + f"[rotate={ang}] arc({start_ang}"
":{end_ang}:{radi})" + "}"
f":{end_ang}:{radi})" + "}"
)
else:
s += f"arc({start_ang}:{end_ang}:{radi})"
Expand Down

0 comments on commit 1f14996

Please sign in to comment.