14

Does anybody know if there is a "mirror" tilde accent command in any package? That is, the "wiggling" of the tilde accent going in the other direction.

Something like defining this \backtilde command:

\newcommand{\backtilde}[1]{\overset{\backsim}{#1}}

but not quite. The kerning, sizes, etc... are not the same as with the \tilde{} command.

Related to this: a mirror version of the \vec{} accentuation.

1
  • 1
    Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with {} on it). Finally, you can also use backticks ` to mark your inline code as I did in my edit. Commented Oct 28, 2013 at 15:03

3 Answers 3

14

The accents package turns out to be useful:

\documentclass{article}
\usepackage{accents,graphicx}

\newcommand{\backtildeacc}{%
  \raisebox{-1.25ex}[.3ex][0pt]{\reflectbox{\normalfont\char"7E}}%
}
\newcommand{\btilde}[1]{\accentset{\backtildeacc}{#1}}

\begin{document}
$\tilde{A}\btilde{A}$

\fboxsep=0pt
\fbox{$\btilde{A}$}\fbox{$\tilde{A}$}
\end{document}

enter image description here

Note If the T1 encoding is used, one needs "03 instead of "7E. The various lengths might need to be adjusted for different font families. For instance, 0.21ex is the right height instead of 0.3ex with lmodern.

6
  • 2
    You might want to accept this (or another) answer by clicking the check mark next to the up/down voting buttons. Commented Oct 28, 2013 at 16:08
  • I just found out that if my document also has the line \usepackage[T1]{fontenc}, \btilde is too wide. (Actually, I might prefer that wider variant, but it does not match the normal \tilde.) And if additionally there is the line \usepackage{lmodern}, the \btilde is typeset too low, like a strike through the letter. Is there a way to have a \btilde which consistently produces the mirrored counterpart of \tilde, whether those additional packages are loaded or not? Commented Dec 17, 2022 at 18:06
  • @azimut Sorry, I don't think you can automate the thing: as you can see, there are a few lengths set in the code. Commented Dec 17, 2022 at 18:08
  • The strange thing is that \usepackage[T1]{fontenc} is the culprit. If I load lmodern without [T1]fontenc, the btilde works as expected. Commented Dec 17, 2022 at 18:13
  • @azimut When T1 is used, we need "03 instead of "7E. And slightly shorter height when lmodern is the font, 0.21ex instead of 0.3ex. Commented Dec 17, 2022 at 20:38
1

Try \backsim from the amssymb package. See the image below

enter image description here

3
  • 1
    I did. This is the command I proposed within my question, but the results are not equivalent. Commented Oct 28, 2013 at 15:10
  • Oh, sorry. What do you mean by other direction? Commented Oct 28, 2013 at 15:11
  • The direction is OK, is just if you compare putting a \overset{\backsim}{A} with \tilde{A} you will see the difference. Commented Oct 28, 2013 at 15:13
1

You can scale your backsim like this:

\documentclass{article}

\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}
\[\tilde{A}\]

\[\overset{\backsim}{A}\]

\[\overset{\scalebox{0.5}{$\backsim$}}{A}\]
\end{document}

Still not totally the same, but it could be used as workaround...

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.