# How to insert characters with special meaning into a document

I was trying to add the symbol ^ in the document and getting error. How could I do that

\documentclass{article}
\begin{document}
Hello world
\^
\end{document}


I need to add \,$... to document - add comment ## 5 Answers If you write \^, then tex assumes you’re trying to write a circumflex on top of something and looks for that something. The first thing it finds in your code is the \end of \end{document}, in which case, it doesn’t find an \end{document} command (just {document}). You can get around this by giving \^ a “null” argument: \^{}. Or, more cumbersomely, you can write \textasciicircum, for a full-size circumflex (in T1, at least). Different packages offer variants. For instance, the \upp of wsuipa is a little more pointed, from memory. - This is incorrect. \end is a single token which would be the argument of \^ in this case. – David Carlisle Aug 10 '12 at 12:38 \textasciicircum and \^{} are not the same character (given suitable font encoding such as T1) one is a small raised accent character over a null base, The other is (should be) the full sized ascii character – David Carlisle Aug 10 '12 at 13:20 @DavidCarlisle. Thanks very much for those corrections. I’ve worked them into the answer. – Daniel Harbour Aug 10 '12 at 15:25 add comment depending what you want to do \verb|^| \verb|\|  or  \textasciicircum \textasciibackslash \$


Note \textasciibackslash works better after \usepackage[T1]{fontenc} as the default OT1 encoded fonts do not have this character (except tt) so the character is taken from the math fonts in that case).

-
You can insert most of the symbols by escaping them with the \: \$, \&, \%, etc. Some have special instructions: \textbackslash for the backslash. Are you sure you need the ^? Maybe the \wedge is more suitable. For more symbols, have a look at The Comprehensive LaTeX Symbol List - add comment The "circumflex" accent, ^, is generally meant to be placed above some other character, e.g., e or E. If you want to display it by itself, you must add something like a "null" (empty) group: \^{}, \^\null  On methods for displaying some of TeX's other "special-meaning" symbols, see, e.g., Table 1 of the Comprehensive LaTeX symbol list. - add comment \documentclass{article} \begin{document} Hello world$\wedge$, \textbackslash\, \$