7

This question already has an answer here:

I would like to write something of the sort. It's a form of an accent but I do not know how to write letters instead of just dots or a tilde.

Thank youenter image description here

marked as duplicate by Andrew, barbara beeton, Ronny, Stefan Kottwitz Nov 10 '16 at 6:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Welcome to TeX.SX! just to be clear, it's a \tau with e-m written on top of it? – ebosi Nov 2 '16 at 10:47
  • yes actually its a \matcal{T} but \tau is the same – Mark Pace Nov 2 '16 at 11:24
  • @Werner The other question seem to treat only the \mathrel case... – yo' Nov 2 '16 at 16:38
  • 1
    @yo': The answers there use \mathrel. The question is about "put[ting] text over symbols", and \tau is a symbol in my opinion. – Werner Nov 2 '16 at 16:41
9

Here are three additional possibilities. They vary in (a) the symbol used to connect "e" and "m" -- a mathematical minus sign or a simple dash -- and (b) the size of the superscript material -- \scriptsize or \tiny. Not knowing what "e-m" stands for, I don't dare offer an opinion on which form is best.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\overset{\mathit{e-m}}{\mathcal{T}}$
$\overset{\textit{e-m}}{\mathcal{T}}$
$\overset{\textit{\tiny e-m}}{\mathcal{T}}$
\end{document}
  • 1
    Thanks! used $\overset{\textit{\tiny e-m}}{\mathcal{T}}$ – Mark Pace Nov 2 '16 at 14:06
  • 5
    @MarkPace - Glad my code is useful. Just out of idle curiosity: What does this composite symbol signify? – Mico Nov 2 '16 at 14:08
13
\documentclass{article}
\usepackage{stackengine,graphicx}
\begin{document}
$\ensurestackMath{\stackengine{.5pt}{\tau}{\scriptscriptstyle e-m}
  {O}{c}{F}{F}{S}}$
or
$\ensurestackMath{\stackengine{1pt}{\tau}{\scalebox{.5}{$\scriptscriptstyle e-m$}}
  {O}{c}{F}{F}{S}}$
\end{document}

enter image description here

With a definition like \newcommand\overtext[2]{\ensurestackMath{\stackengine{1pt}{#1}% {\scalebox{.5}{$\scriptscriptstyle #2$}}{O}{c}{F}{F}{S}}}, a simple invocation of $\overtext{\tau}{e-m}$ accomplishes the task.

If the overset is actually text over a long tilde...

\documentclass{article}
\usepackage{stackengine,graphicx,scalerel,wasysym}
\newcommand\overtext[2]{%
  \savestack\tmp{$\scriptscriptstyle \reallywidealttilde{#2}$}
  \ensurestackMath{\stackengine{.5pt}{#1}%
    {\scalebox{.5}{\tmp}}{O}{c}{F}{F}{S}}}
\newcommand\reallywidealttilde[1]{\ThisStyle{%
  \setbox0=\hbox{$\SavedStyle#1$}%
  \stackengine{.5pt}{$\SavedStyle#1$}{%
    \stretchto{\scaleto{\SavedStyle\mkern.2mu\AC}{.5150\wd0}}{.6\ht0}%
  }{U}{c}{F}{T}{S}}}
\begin{document}
$\overtext{L}{e-m}$ versus $\overtext{L}{x}$ versus $\overtext{L}{Ax^2 + Bx + C}$
\end{document}

enter image description here

The \reallywidealttilde macro is based on my answer at Big tilde in math mode.

  • I think it is a L, with a tilde accent and e-m over the tilde, instead of a tau. – Astrinus Nov 2 '16 at 10:55
  • I vote for the tau. I didn't known stackengine package, does it work only in math mode or there is an equivalent for normal text? Thank you! – CarLaTeX Nov 2 '16 at 11:03
  • @CarLaTeX stackengine can operate in both math and text mode, or mixed mode, if one is careful. – Steven B. Segletes Nov 2 '16 at 11:04
  • @CarLaTeX I have provided your version, as well. Note if you need alignment fields as part of a stack, the tabstackengine package provides a front end to stackengine to do so. – Steven B. Segletes Nov 2 '16 at 11:10
  • 1
    The version is @Astrinus's one, not mine, :) – CarLaTeX Nov 2 '16 at 11:11
6

I see it as L with a tilde, but it can easily be changed to tau.

\documentclass{article}
\usepackage{stackengine}
\newcommand\tauem{\widetilde{\rule{4pt}{0pt}L\rule{4pt}{0pt}}\raisebox{1.1em}{\kern-15pt\tiny\ensuremath{e-m}}}
\begin{document}
$A\tauem B$
\end{document}

enter image description here

  • Thank you what I used was this: \newcommand\tauem{{\rule{4pt}{0pt}\mathcal{T}\rule{4pt}{0pt}}\raisebox{1.1em}{\kern-15pt\tiny\ensuremath{e-m}}} $\tauem$ – Mark Pace Nov 2 '16 at 14:04
6

This only works in normal style, but I'd avoid using such symbols in subscripts or superscripts anyway.

\documentclass{article}
\usepackage{amsmath}

\newlength{\overtildewd}
\newlength{\overtildewdaux}
\newcommand{\overtilde}[2]{%
  \begingroup
  \settowidth\overtildewd{$\scriptscriptstyle#1$}%
  \settowidth\overtildewdaux{$\textstyle#2$}%
  \ifdim\overtildewdaux>\overtildewd\setlength{\overtildewd}{\overtildewdaux}\fi
  \overset{\scriptscriptstyle#1}{%
    \widetilde{\makebox[\overtildewd]{$\textstyle#2$}}%
  }%
  \endgroup
}

\begin{document}
\[
\overtilde{e}{L}\qquad\overtilde{e-m}{L}
\]
\end{document}

This measures the text above the tilde and the base, getting the widest. Then \widetilde is applied to a box containing the base set centered in a box with the required width, and we apply \overset for setting the part above the tilde.

enter image description here

If the symbol is just a T (maybe calligraphic), there's not much more than \overset; you might just want to make the upper material smaller.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\overset{e-m}{\mathcal{T}}\qquad
\overset{\scriptscriptstyle e-m}{\mathcal{T}}
\]

\end{document}

enter image description here

  • 1
    check the comments -- the base letter is supposed to be \mathcal{T} – barbara beeton Nov 2 '16 at 12:50
  • 2
    @barbarabeeton Thanks, interpreting that picture was difficult. – egreg Nov 2 '16 at 12:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.