# [Tex/LaTex] How does one insert a backslash or a tilde (~) into LaTeX

symbols

• How does one insert a "\" (backslash) into the text of a LaTeX document?
• And how does one insert a "~" (tilde)? (If you insert \~, it will give you a tilde as an accent over the following letter.)

I believe \backslash may be used in math formulae, but not into text itself. Lamport's, Kopka's, and Mittelbach's texts have said as much (but no more), and so left me hanging on how to get a backslash into regular text.

### TL;DR

\textbackslash produces a backslash in text-mode. The math-mode $\sim$ and \texttildelow (from textcomp package) are options for a lower tilde (while \~{} and \textasciitilde produce a raised tilde in text-mode)

\textbackslash and \textasciitilde are found in several places in the document, but the LaTeX 2e ASCII Table (Table 529 as of this writing) and the following discussion are a convenient resource for all ASCII characters. In particular, the discussion notes that \~{} and \textasciitilde produce a raised tilde, whilst the math-mode $\sim$ and \texttildelow are options for a lower tilde; the latter is in the textcomp package, and looks best in fonts other than Computer Modern. If you are typesetting file names or urls, the document recommends the url package.