TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 8 down vote accepted

Using \string^ seems to work as expected:

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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