I want to type a caret in my document that looks like a typed caret---not a hat, not a wedge, not a hat over an invisible space character. I'm aware of the answer at How to typset the symbol “^” (caret/circumflex/hat) and none of them look like a^b. How can I get that in Latex? How can I get a^b?

  • Welcome to the site. You tell us what does not look like a^b, but could you provide a pointer to an image that shows what you do hope to achieve? Otherwise, we are just guessing. – Steven B. Segletes Sep 1 '16 at 18:37
  • I really thought I covered that. Every option in the answer I mentioned above looks very different from a simple typewritten a^b. Either the caret is high and small, or it is clearly the mathematical wedge symbol. – djvbmcBaw Sep 1 '16 at 18:38
  • 3
    I want to achieve something that looks exactly like a^b as you are reading it here on this comment. – djvbmcBaw Sep 1 '16 at 18:39
  • I am old enough to remember typewriters, but there are many here who are probably too young for that. Even so, I can't visualize a typewritten carat in a distinct way, given the decades since I used one. Okay, I just read your intervening comment. – Steven B. Segletes Sep 1 '16 at 18:40
  • 1
    Thank you for asking questions that may clarify the matter for others who might read this. – djvbmcBaw Sep 1 '16 at 18:45

Maybe this?

The {1.5} governs the horizontal stretch of the nominal ^ character, the [2] the vertical stretch. The {-1ex} governs the vertical placement of the result, and the overall object takes up the space given by {\ \,}. One can revise at will.

  \stackengine{0pt}{\ \,}{\scalebox{1.5}[2]{\raisebox{-1ex}{\string^}}}{O}{c}{F}{T}{L}}
a\specialcaret b

enter image description here

| improve this answer | |
  • Oh, that is intriguing. I wish I could understand the code you used to create it. I'll have to see if I can make it work myself. But thank you! – djvbmcBaw Sep 1 '16 at 18:51
  • 1
    @djvbmcBaw I have provided some explanation on how to modify it to suit. It is up to each font designer to decide how it should look, I suppose. It is hard because we are going against the wishes of the font designer on how it should look. – Steven B. Segletes Sep 1 '16 at 18:53
  • 1
    That worked really well. I tested it in my document. It looks like I typed a caret and I meant a caret. Latex should not make it so hard to achieve that. You should be able to escape a caret somehow so that it just prints a caret. – djvbmcBaw Sep 1 '16 at 18:55
  • 1
    I mention this because a person with your expertise may perhaps be able to understand what I'm saying and even fix the problem. If you don't see what I'm talking about with regard to the way carets look in Latex-typeset documents, then go over to Word and compare. Look at what a caret is supposed to look like. Try to duplicate that in any simple way in Latex. I'm not insisting on something contrary to the font. I'm trying to make it look like a caret in-font. That's all. Thanks again. – djvbmcBaw Sep 1 '16 at 19:15
  • 1
    @djvbmcBaw I wouldn't rely on anything produced by Word. The shape of a caret is defined by the font designer. Perhaps you need a different font to meet your aesthetics. – Peter Wilson Sep 2 '16 at 18:13

After toying with several options, I achieved what I actually wanted. I wanted what looked like math typed on a typewriter with no fancy typesetting. Ironically, Latex makes that difficult. Here is an example of what worked:

{\fontfamily{pcr}\selectfont compute the integral of \verb!e^(-x^2)! from 1 to 5}

Note the use of \verb!...! allowing me to use the carat symbol as a caret. Also, I had to put this


in the preamble so the verbatim text would inherit the font of the surrounding text. I learned the latter trick here: How to globally set \verb font style to match the default document style?.

| improve this answer | |

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.