I was wondering if anyone can show me how to write ~ in Latex as I am new to Latex and trying to write my statistics notes in a neat format. I've surfed around the web, but could not find it.
Asked
Active
Viewed 817 times
1
Dr. Manuel Kuehner
- 22,451
PandaNinja
- 35
-
For figuring out how to write a symbol, http://detexify.kirelabs.org/classify.html is extremely useful too. – chsk May 09 '21 at 19:54
1 Answers
4
- Next time, you can check https://en.wikipedia.org/wiki/Wikipedia:LaTeX_symbols for example.
~can be written using\sim(in math mode) or\texttildelow(in text mode,\usepackage{textcomp}). The "normal way"\textasciitildestill seems to give a strange output.- I found another example:
\raisebox{-0.9ex}{\~{}}, see here (German). - For more information, see (1) Correctly typesetting a tilde, (2) How does one insert a backslash or a tilde (~) into LaTeX?, (3) https://golatex.de/viewtopic.php?t=8385 (German), and/or (4) https://www.ctan.org/pkg/comprehensive.
Reaction on the comment of user chsk ("Just out of curiosity, what do you mean by "\textasciitilde still seems to give a strange output"? –").
\documentclass{article}
\begin{document}
\texttt{\textbackslash textasciitilde}: Text \textasciitilde{} Text
\end{document}
Dr. Manuel Kuehner
- 22,451
-
1
-
Just out of curiosity, what do you mean by "
\textasciitildestill seems to give a strange output"? – chsk May 09 '21 at 19:56 -
-
Thanks --- how's that strange, though? This is how a tilde traditionally was rendered on both typewriters and (later) computers, and very likely this is what not just DEK but anyone who used TeX expected to see when TeX was made. – chsk May 10 '21 at 18:43
-
@chsk Then replace "strange" with "too high IMHO" :). In my experience, which is limited, people nowadays expect something closer to
\sim. Feel free to edit my question if you think that it needs modification. This way just a thoughtless comment from me. – Dr. Manuel Kuehner May 10 '21 at 19:28 -
1
