From 1f1499615ce91cce9badb44de074b7822d8548f6 Mon Sep 17 00:00:00 2001 From: Vincenzo Bevilacqua <48207038+ViBevilacqua@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:56:53 +0100 Subject: [PATCH] FIX: {end_ang} and {radi} not seen as variables 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. --- svg2tikz/tikz_export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svg2tikz/tikz_export.py b/svg2tikz/tikz_export.py index f9b3300..5cc0f6c 100644 --- a/svg2tikz/tikz_export.py +++ b/svg2tikz/tikz_export.py @@ -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})"