From 37e7f18392109225ca5c257d14eda2f89a938370 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Mon, 7 May 2012 14:39:54 +0100 Subject: Correctly remove $ at end of latex commands Previously, a string like '$\alpha$' would retain the final $ when displayed on a label. --- tikzit/src/common/NSString+LatexConstants.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tikzit/src/common/NSString+LatexConstants.m b/tikzit/src/common/NSString+LatexConstants.m index d2d0ed8..bd598b7 100644 --- a/tikzit/src/common/NSString+LatexConstants.m +++ b/tikzit/src/common/NSString+LatexConstants.m @@ -176,7 +176,9 @@ static NSSet *texModifiers = nil; if (c=='\\') { state = 1; } else { - [buf appendFormat:@"%C", c]; + if (c!='$') { + [buf appendFormat:@"%C", c]; + } state = 0; } -- cgit v1.2.3