Questions tagged [tilde]

{tilde} is for questions about handling the special tilde character.

Filter by
Sorted by
Tagged with
184 votes
8 answers
137k views

Correctly typesetting a tilde

How do I set the tilde (~) character correctly in LaTeX? There’s a question discussing that on Stack Overflow, with a lot of answers. But dare I say it? They all suck: \textasciitilde is too high, \...
153 votes
1 answer
443k views

tilde over a symbol Phi

Please suggest me a way to put tilde over a symbol phi. I can easily put it over a letter but coming to the case of symbols, it is giving problems. Thanks in advance.
  • 1,531
52 votes
2 answers
175k views

How do I draw a tilde in math mode? [duplicate]

Possible Duplicate: How does one insert a backslash or a tilde into LaTeX? I have tried using \text{\~{}} to draw a tilde in math mode. However, this only produces a superscript tilde. I have ...
  • 3,857
51 votes
4 answers
49k views

URL with tilde character?

I'm trying to make a URL with a tilde character (~) in it: \usepackage{url} ... \url{http://lyle.smu.edu/~tspell/jaws} It looks right in the resulting PDF, but when clicking on it the browser goes ...
30 votes
1 answer
25k views

Why is this n with tilde disappearing in a BibTeX reference?

Working with the following abridged line in a BibTeX entry: author = {J. Pe\~{n}a} For some reason results in a BibTeX compilation to: J.~P. {n}a With a period and a space appearing and the tilde ...
28 votes
1 answer
20k views

Tilde and slash in LaTeX

I am getting strange errors in LaTeX: perhaps you should insert a `~' before "\ref" missing `\ ' after "i.e." missing `\ ' after "i.e." I understand that the first expects me to put a tilde before ...
  • 5,417
25 votes
3 answers
11k views

How to insert a nice tilde in a lstlisting?

How do I insert a nice tilde that is centered in the middle in a lstlisting? I found another thread about tildes but I can't apply it because the method described there only works outside of ...
24 votes
1 answer
5k views

What does the tilde character (~) do in math mode?

What effect does the tilde character ~ have in math mode? Is it the same non-breaking space that it is in text mode? Is it bad style to use ~ in math mode? I've seen it used in some examples but ...
  • 2,521
20 votes
3 answers
12k views

How to use tilde or space in includepdf filename?

I'm trying to include a pdf in a document, using pdfpages package, but I'm having troubles when filename contains tilde or space. e.g. \includepdf[pages=-]{C:/Users/MYUSER~1/AppData/Local/Temp/...
  • 537
19 votes
2 answers
14k views

moderncv : \homepage - can't handle a tilde

I'm using the latest version of moderncv from CTAN. When I set : \homepage {homepage: my.homepage.url/~username/} The tilde doesn't show up. So I tried: \usepackage{textcomp} \homepage {homepage: ...
  • 365
17 votes
2 answers
17k views

Sub tilde in LaTeX

In LaTeX, \tilde{x} puts a ~ on top of the x. How can I put a ~ below the x?
  • 2,409
16 votes
8 answers
6k views

Why is tilde not available out of the box in TeX?

Today I need to type ~ in my document, but apparently it does not get rendered properly. I just got a blank space. I searched on the web and I found the same problem here. However, its solutions show ...
13 votes
3 answers
18k views

Double-tilde over symbol

I am trying to get a double tilde symbol over a letter but I can't find a well suiting solution. I tried $\tilde{\tilde{z}}$ and $\overset{\approx}{z}$ but both solution look a bit off. I am ...
  • 133
13 votes
3 answers
7k views

Tilde below letter + subscript creates unwanted spacing

I use a tilde below a letter as a symbol for a vector. Redefining the \vec-command delivers a good output, but subscripts are a pain. I'm using the following code: \documentclass[10pt,a4paper]{...
  • 1,009
12 votes
2 answers
11k views

What is the difference between ~ (tilde) and \, (backslash comma) for a nonbreaking space? [duplicate]

Regarding tiny nonbreaking spaces, is there a difference between using a ~ (tilde) and using \, (backslash comma)? If so, what is the difference, in terms of length, properties, situations where you ...
11 votes
2 answers
2k views

How come the tilde ~ sometimes does not behave like non-breaking space?

This is again one of the behaviors that are quite difficult to catch in a reconstructible (and simple) example, so one has to resort to animations. Basically, the issue is this: the tilde (~) is ...
  • 16.5k
11 votes
2 answers
3k views

Automatically spacing the tilde (~) symbol as a prefix number using the `siunitx` package

I'm trying to work out if there is a way to get siunitx to natively handle the ~ symbol (\sim) in the same way that it can handle the < and > operators before a number, as I would like to be able ...
  • 841
10 votes
4 answers
7k views

How to get a bold wide tilde?

If I type \boldmath $\widetilde T$\unboldmath I get where unfortunately the tilde above the T is a little flimsy for my taste. Is there a better way to do this? I found a paper that has something,...
  • 5,444
9 votes
4 answers
2k views

Norm of "a" looks different from Norm of "b" in math mode

I run into the following little problem in the LaTeX math mode: $ \left \|\tilde{a} \right \| + \left \| \tilde{b} \right \| $ when trying this in the Latex Equation Editor, it looks a bit weird: ...
  • 192
8 votes
1 answer
613 views

how to get PSTricks QR codes to handle tildes properly?

I am getting bitten by the same problem from one of my previous questions: tildes are not handled properly. But now it's the PSTricks QR code package that's not working, and none of the suggestions ...
  • 1,344
8 votes
1 answer
249 views

How to make ~ work for en-dashes?

I have a German LaTeX-document that tries to implement German en-dash line-breaking rules with ~ like this: \documentclass[twocolumn,a4paper]{scrartcl} \usepackage[T1]{fontenc} \usepackage{german} \...
  • 2,364
7 votes
2 answers
2k views

tilde in hyperref url with \usepackage[T1]{fontenc}

By default, LaTeX typesets tildes "too high", but the hyperref package ordinarily corrects this behaviour for URLs (it vertically centers tildes, as expected). However \usepackage[T1]{fontenc} seems ...
  • 73
7 votes
1 answer
2k views

Using tilde `~` in csname in Beamer

In beamer, I would like to be able to use the tilde character ~ in the name of a command sequence. I tried with adjusting catcodes. While this was successful with the standard article class, it failed ...
  • 51.8k
7 votes
2 answers
1k views

Why is docstrip putting extra macro calls in a hyperlink inside a footnote that has a tilde?

Here's a minimal example of Docstrip putting extra macro bits into a \href call inside a footnote when the URL has a tilde: % \iffalse \documentclass[a4paper]{ltxdoc} \usepackage{hyperref} \begin{...
  • 1,344
7 votes
3 answers
5k views

How to draw an isomorphism arrow in tikz-cd

I want to show an arrow for an isomorphism in a commutative diagram. Currently I'm using \ar[rr, dotted, "\textasciitilde", "\funcname{f}''"'] but there is two much vertical space between the Tilde ...
  • 1,257
7 votes
1 answer
3k views

Customize the width of \widetilde on letters H, K, M, N, W, and X

For example either $\widetilde{\bm{H}}$ or $\widetilde{\boldsymbol{H}}$ would result rather huge tilde over the letter H, K, M, N, W, and X, please see the following alphabet: I can understand ...
  • 2,981
6 votes
3 answers
848 views

Spacing around \tilde{=}

How can I get proper spacing when using tilde over operator symbols? \begin{align*} x &= y\\ x &\tilde{=} b \end{align*} Yields: But I would like the tilde version to have the same kind of ...
  • 161
6 votes
4 answers
995 views

The use of "tilde" changes the proximity to the set theory symbol (ref img)

I just want to format a simple set theory example. But the following is annoying: See how close the cap gets to the 'A' because of the tilde sign? I've used sim for the tilde sign. Any suggestions?
  • 295
6 votes
1 answer
6k views

What does symbol ~ do in Latex?

I noticed this symbol in an example. Including or excluding this from the source doesn't change anything. However, if I include \~, it puts a ~ on the first letter of the next word. So, what could be ...
6 votes
1 answer
286 views

redefine ~ only within the scope of a \newcommand

I'd like to create a command (\newcommand) that does some decoration around a text (basically drawing a box around the text), for technical reports: Eg like: Use \pdobj{frob}{noz zle} for ...
  • 347
6 votes
3 answers
797 views

How to get spacing in math mode without just repeating fixed spaces (tilde ~)?

I'm looking for a way to move text in my equation, instead of just shoving multiple ~~~~ until it's in the right position. I'm quite new to LaTeX, what exactly would be the command? I'm also looking ...
  • 261
5 votes
1 answer
2k views

Problem with ẽ tilde and UTF8

I have a problem with the following character ẽ: e with tilde I am using UTF-8 encoding and I get the following error ! Package inputenc Error: Unicode char \u8:ẽ not set up for use with LaTeX. ...
5 votes
1 answer
1k views

Problem with url link-`~` is replaced by %257E

I am adding a url in my document using \url{}. The link, however doesn't lead to where it is suppossed to lead. My code is \documentclass{article} \usepackage{hyperref} \begin{document} \url{...
  • 12k
5 votes
1 answer
518 views

Textcase, Listings, and Tilde

Consider the following MWE: \documentclass{scrreprt} \usepackage{textcase} \RequirePackage{listings} \usepackage[american]{babel} \begin{document} \MakeTextLowercase{A~B} \end{document} LaTeX ...
4 votes
2 answers
4k views

How to show tilde in superscript

I would like to show a tilde in the superscript of a letter. For example F^{\tilde{}} But it does not look good. Any suggestions? Thanks and regards!
  • 5,523
4 votes
4 answers
2k views

How to show ~(tilde) in footnote? [duplicate]

Possible Duplicate: Correctly typesetting a tilde I can show ~(tilde) in normal text, using text as follows, \begin{quote} \verb|~| \end{quote} But the problem is when I try to put this in ...
  • 1,097
4 votes
1 answer
114 views

ConTeXt: Replace tokens in document title option

Background Macros are autogenerated for a book's title and author name. The title can sometimes include TeX-specific tokens, such as ~ and ldots{}. Problem When setting the document properties, the ...
4 votes
1 answer
3k views

How to insert LaTeX symbols? [duplicate]

Possible Duplicate: How does one insert a backslash or a tilde into LaTeX? I tried inserting symbols in latex. e.g.: \texttildelow It didn't work. But symbols like \textasciitilde work....
4 votes
1 answer
224 views

problem with tilde and squaring overlined symbols, stix2

I have problem with the following math text: As you can see, the tilde over S is not actually wide, but it's squared nicely. On the other hand, the overline over the X is okay, but the deuce is ...
  • 43
4 votes
1 answer
4k views

Tilde in verbatim

I am writing a manual for an R file in which expressions like this are common: lm.1 <- lm(y ~ x1 + x2) I will be enclosing code samples in a verbatim environment but this doesn't work properly ...
  • 2,294
3 votes
1 answer
1k views

Hyphenation with Acronyms

I have difficulties getting hyphenation right in long acronyms with user-defined hyphenation rules when trying to prevent line breaks between the long and the short form. \documentclass{article} \...
  • 197
3 votes
1 answer
869 views

Half of approx symbol

I would like to use half of the \approx approx symbol as an accent above a variable instead of \sim. This is due to formatting reasons, see The symbols are almost equivalent, however \sim is ...
  • 937
3 votes
2 answers
222 views

How to write a tilde with vertical line?

I want to write an tilde with an vertical line like thank you for your help :) Where i found it: Solution: \documentclass{article} \usepackage{stackengine,amssymb} \def\vTilde{\mathbin{\...
  • 33
3 votes
2 answers
691 views

tilde in a url in the address portion of a letter

I am trying to include my website address in the address block of a letter. My webaddress has a tilde character, and my usual solution, $\sim$, to the tilde formatting problem is not working. The ...
3 votes
1 answer
777 views

Tilde in author field changes S letter with Estonian babel

Bibtex generates fallowing code to bbl file. \bibitem{Bell_1964} J.~S. Bell, \enquote{On the {Einstein-Podolsky-Rosen} paradox,} Physics \textbf{1}. and similarly \bibitem{BellSpeakableAndNot} J.~...
  • 299
3 votes
3 answers
2k views

LaTeX superscripts problem with widetilde

I tried to put a superscript (squared) with a \xi variable in the \widetilde : $\widetilde{\xi}^2 = (\widetilde{\xi})^2 \neq \widetilde{\xi^2}$ gives Which seems to be se same things, whereas it is ...
3 votes
2 answers
530 views

Is there a good way to write URLs with tilde without using url or hyperref packages?

I want to write URLs, but the stylesheet cannot be used with url or hyperref packages. Then if I copy the urls from my pdf file and paste them to the browser, tilde symbols become %2(+a weird ...
user avatar
3 votes
1 answer
36 views

Lowering elements in subscript to match elements with tilde

Consider: \[ x_{a}^{+}\qquad x_{\tilde{a}}^{+} \] Is there a simple way to make the first "a" the same height as the second one? The problem doesn't occur when the superscripts are removed.
3 votes
1 answer
288 views

Make superscript lower for letter with tilde

Is there any way to have the t in my superscript further down? $\widetilde{\boldsymbol{W}}^t$ is the code for the second W^t, and $\boldsymbol{W}^t$ is the code for the first W^t in the screen-...
3 votes
2 answers
419 views

Is there a way to adjust the vertical position of accent above a greek letter in math mode?

I'm trying to write phi with a wide tilde on top in order to indicate an estimate in statistics, but the tilde are by default clear above the letter, like so: I'm wondering if there is a way to ...