Consider the following example:





  \texttt{Table[A/(A - r*X) - (1 + r)\^{}\variable{k}, \{\variable{k}, 1, 10\}]}



If I copy the code and paste it into Mathematica, the rendering of the ^ is wrong; see the following picture:


How do I get an output which I can paste (directly) into Mathematica without having to change ^ manually?


Using \string^ seems to work as expected:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.