I'm trying to typeset some computer code which involves a caret (for powers); for example
\verb!x^3+x^2-1!
The trouble here is that the caret produced is rather flat. I could use a wedge instead:
\newcommand{\pwr}{${}^\wedge}$}
\texttt{x\pwr 3+x\pwr 2-1}
but the wedge here is too pointy, as well as being the wrong weight for the typewriter font. What I want to know is: is there a symbol, which comes halfway between caret and wedge in shape, and is the same weight as a typewriter caret (so can be used within \texttt{}
)?
I've tried replacing \verb!^!
with {{}\large\textasciicircum}
and this sort of works, but is still clearly not an optimum solution.