Re: Problem with strings and backslashes
- To: mathgroup at smc.vnet.net
- Subject: [mg99746] Re: Problem with strings and backslashes
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Wed, 13 May 2009 05:06:39 -0400 (EDT)
- References: <gub7ej$4h5$1@smc.vnet.net>
LordBeotian wrote: > I'm trying to work with strings wich are LaTeX codes of formulas. I > want to make substitution of particular substrings. The problem is > that Mathematica (5.1) has a strange behaviour with the backslashes. > When it finds "\tau" it removes the "\t" in the output. The same > happen with "\right" which becomes "ight". To make it work properly I > need to manually add on the input an additional backslash at the > beginning of "\tau" and "\right": "\\tau" becames "\tau". But in this > way my work go on too slowly. What can I do? > One answer might be to use some other character - of which there are plenty in Mathematica - instead of the backslash, and then use StringReplace somewhere in your code to change it into the backslash character. David Bailey http://www.dbaileyconsultancy.co.uk