Questions tagged [tilde]

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

Filter by
Sorted by
Tagged with
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 ...
2 votes
1 answer
29 views

How to prioritize tilde (non-breaking space) over hyphen (breaking space)

I am using a tilde in the defined \quoteboxtable because I do not want a line break to occur between the dash and the name of the person being quoted. However, justification of the line is taking ...
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 ...
1 vote
1 answer
32 views

How to check for the presence of a tilde (~) at the end of a text string?

How do I get to 'true'? \documentclass{minimal} \usepackage{xstring} \begin{document} \IfEndWith{string~}{\textasciitilde}{true}{false} \IfEndWith{string~}{\textasciitilde{}}{true}{false} \...
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, \...
2 votes
1 answer
46 views

How do I get the Chinese tilde "哇~~~" to look right?

哇~~~,你太棒了! This usage of the Chinese tilde ~ needs to look the above: the tilde has the same width as a Chinese character, and is in the center vertically. However, it comes out looking like: (I'm ...
0 votes
2 answers
168 views

Write n with tilde above, as in El Nino

I'm trying to write "El Niño" in text mode within a paragraph. I'm currently doing it like El Ni$\mathrm{\tilde{n}}$o, which is frankly ridiculous. Can anybody explain how to do this more ...
3 votes
2 answers
220 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{\...
0 votes
0 answers
45 views

LaTeX/Special Characters with natbib [duplicate]

I'm trying to reference a source with the authors name including a tilde and a accent: Castañón When I put the following line as text it works but when I use the same line in my myreferences.bib (...
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 ...
0 votes
0 answers
33 views

Lowering superscript to match elements without tilde

Consider: \[ \mathrm{A}^{+}\tilde{\mathrm{A}}^{+} \] \[ \mathrm{Aa}^{+}\tilde{\mathrm{Aa}}^{+} \] Is there a simple way to lower the final plus-sign, so that it aligns with the first three? (This is ...
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.
2 votes
2 answers
203 views

Is there difference between using ‘~’ and Unicode non-breaking space?

Does (Lua)LaTeX treat these two character the same or is there some difference? I've got used to write Unicode NBSPs using Shift-Space shortcut and it is easier for me to use this instead of the tilde ...
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: ...
0 votes
1 answer
55 views

How to add a tilde "~" in between two letters (\alpha and l)? I attached my text below:

\documentclass[a4paper, pointlessnumbers, %draft, parskip=half, automark ]{scrartcl} \setlength{\parindent}{0pt} \usepackage[a4paper, left=2.2cm, right=2.2cm, top=2.5cm, ...
0 votes
1 answer
87 views

How to insert a vertically centered tilde into a URL?

I need to insert a vertically centered tilde into a URL in text mode (not inside the \url or \href commands). I've tried the solution proposed here but I can't get it to work. Any ideas? Here is my ...
1 vote
2 answers
65 views

siunitx explicit-sign not for all numbers in column

One have the table that align according decimal point by siunitx package, and sign before all numbers is tilde (\sim). How remove tilde for number 7 only, without break the alignment? (I tried to add $...
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 ...
2 votes
2 answers
353 views

How to make tilde symbol in the center on the line text?

\documentclass{article} \usepackage[left=3cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage{listings} \lstset{basicstyle=\ttfamily\footnotesize,breaklines=true,numbers=left,mathescape} \begin{...
0 votes
0 answers
60 views

Vertically position tilde in LaTeX [duplicate]

I would like to have a tilde like this: ~some text But it seems hard / impossible to easily achieve that in LaTeX. Is it possible to have a "vertically centred" tilde which also looks like ...
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/...
2 votes
3 answers
63 views

Vertically scale accent, but keep distance to symbol equal

I need a \tilde which is a little more noticeable, why I tried this answer in combination with scalebox. However, together with the vertical scaling, also the vertical distance between the symbol and ...
0 votes
1 answer
72 views

How do I make the tilde encompass two variables?

I want to put a tilde above $ \tilde{L_1}^{T}\omega_1 $ such that it encompasses these two variable. How do I do that? My approach here puts two separate \tilde on L_1 and the transpose T $$\frac{\...
1 vote
1 answer
403 views

Handling tilde for the home directory in latex, Windows 10, MiKTeX 2.9

I am seeking to include in a latex run a range of files off different paths; I am working in MiKTeX 2.9 under Windows 10. I am unable to get \string~ to point to %USERPROFILE%. A MWE to illustrate is: ...
1 vote
2 answers
1k views

Accent marks in LyX

I recently started using LyX since it's faster than plain latex but I'm having trouble adding accent marks (´ and ~) to my words (I speak spanish). I'm used to using \' and \~ like in plain latex but ...
0 votes
0 answers
330 views

How to get an inverted (or reversed) tilde on a math symbol?

How can we get a reversed (or inverted) tilde on top of a math symbol, in math-mode? I'm sure that this reversed tilde does exist in LaTeX (I strongly believe I have seen it before), but I'm yet ...
2 votes
2 answers
1k views

Writing a \sim with the letter a centered above

I want something like \sim^a but with the 'a' in the top center not like a power.
0 votes
1 answer
209 views

nice tilde in listings with indent working

I am trying to have a nice tilde when using the listings package Inspired by an answer here: The correct way to type tilde? I tried the following solution: \documentclass{article} \usepackage[T1]{...
2 votes
3 answers
703 views

How to get tilde enclosed in parenthesis

Quick and simple question (actually surprised I couldn't find it on Stackexchange already): How can I typeset (in math mode) quantities with a tilde on top that is enclosed in parentheses? Something ...
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 ...
1 vote
0 answers
48 views

Redefining inline math, so it always proceeded by a non breaking space (~)

I don't like when inline math is typeset at the beginning of a new line. Is there a way to redefine the dollar sign so that Text text $i$. Text, $i$ text $i$ text. is automatically translated to ...
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 ...
2 votes
2 answers
168 views

\tilde in parenthesis

How could this command be done? I mean a \tilde.
2 votes
1 answer
154 views

Defining `\subsetcong` and `\subsetsim` via proper tilde over and under `\subset`

I'd like to define a new command \subsetcong that would typeset a tilde over \subseteq to make it look similar to how tilde is over = in \cong. And also, I'd like to define \subsetsim to mean a \...
0 votes
1 answer
698 views

Can we have x with tilde on top?

Basically, I want to have a X with tilde ontop of X. I tried to follow: \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} $\backsim\ \sim\ \thicksim$ \end{document} ...
3 votes
1 answer
860 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 ...
0 votes
2 answers
181 views

Listings with color OR tilde, not both

Trying to get a listing block with a command prompt that has both color and a proper formatting. I can get the proper format with a simple black typeset, but not with color...the tilde (signifying ...
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 ...
2 votes
1 answer
79 views

How can I write in a equation "~" with more aesthetics?

I know that \tilde{a} in a equation shows: but when I write \tilde{V^{\mu}},\tilde{V}^{\mu} in a equation, it shows: and I am searching something like that: They are similar, but they are not the ...
6 votes
3 answers
845 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 ...
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,...
2 votes
1 answer
53 views

Tilde in listings using lineskip and a command breaks "onehalfspace"

I'm trying to produce an inline code snippet that starts with a ~. Using onehalfspacing per university requirement and lineskip=-1pt for subjectively better legibility, packing the \lstinline inside ...
1 vote
1 answer
645 views

hyperref with tilde

How can I make the tilde appear in the url in the following document? I know that this has been asked many times before but googling has -not- helped me in my case. The following document does not ...
2 votes
1 answer
80 views

Babel and listings cause problem with hard spaces in sectioning headers in classicthesis

Problematic MWE: \documentclass[headinclude,footinclude]{scrbook}%\documentclass[headinclude,footinclude,a4paper]{scrbook} \usepackage{classicthesis}%\usepackage[style=arsclassica]{classicthesis} \...
2 votes
1 answer
427 views

Unbreakable spacing with tilde causes longer line

I am working on my thesis, but I came to a problem with unbreakable space in latex using tilde. It does an unbreakable space, but puts both words on previous line so the line is longer and at the end ...
2 votes
0 answers
741 views

tilde above letter without changing font

I am writing a paper and am using a template where the author's names are in capitals, such as: \textsc{Robert Robertson$^1$\thanks{Corresponding Author: robert@gmail.com}, James Jameson$^1$, Will ...
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-...
1 vote
1 answer
516 views

Can tilde symbol expanded to a whole word [duplicate]

I am new to using the tilde symbol in latex using the \tilde. It appears above one letter only. It seems to be this can be overlooked. Can I expand it somehow to be clearer? can the symbol be expanded ...
1 vote
1 answer
1k views

Big tilde over regular text, not in math mode?

I am looking for ways to put tilde over regular text. In math mode, we can put tilde above letters by $\widetilde{ASK}$. Is there a way to do the same thing for regular text longer than three letters? ...
153 votes
1 answer
442k 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.