4

I'm looking for the proper extension symbol in topology. The closest symbol I found was $a\frown b$ except that I need the frown to be much less wide (is should not if not barely increase the space between ab), and to be exactly at the top limit of a/o/p/e etc, but not as high as an accent.

when hand written it should look like this (unlike my drawing it should be perfectly symmetrical left/right, and the curve regular (a circle arc)):

top extension

Is there a package with this symbol ? if not how can I create it from a \frown ?


EDIT: $a^{\smallfrown}b$ is an improvement, except for the spacing, which is asymmetrical (too big on the right)

1
  • 1
    What should happen to the height of the extension symbol when used with letters like "b"? Should it overlap on the top of the "b"?
    – Vincent
    Mar 12, 2020 at 2:16

4 Answers 4

9

The approach here is a little complicated. Why?

  1. need to get the symbol centered between the two glyphs, even if the two glyphs are of different widths

  2. Need to make work across math styles.

  3. Need to make the accent glyph leave the spacing unchanged in the underlying glyphs.

  4. Need to auto-adjust vertical placement depending on height of underlying glyphs.

The MWE:

\documentclass{article}
\usepackage{amssymb,stackengine,scalerel}
\begin{document}
\newcommand\ext[2]{%
 \ThisStyle{
  \setbox0=\hbox{\ooalign{$\SavedStyle#1$\cr$\SavedStyle#2$}}
  \setbox2=\hbox{$\SavedStyle#1$}
  \setbox4=\hbox{$\SavedStyle#2$}
  \kern-\wd0\kern\wd2
  \ensurestackMath{
  \stackengine{-1.6\LMpt}{\makebox[\wd0][r]{$\SavedStyle#1$}
    \makebox[\wd0][l]{$\SavedStyle#2$}}
    {\kern1\LMpt\SavedStyle\scaleobj{.6}{\smallfrown}}{O}{c}{F}{F}{S}
  \kern-\wd0\kern\wd4}
 }
}

$ximaeijx$

$x\ext{i}{m}\ext{a}{e}\ext{i}{j}x$

$\scriptstyle x\ext{i}{m}\ext{a}{e}\ext{i}{j}x$

$\scriptscriptstyle x\ext{i}{m}\ext{a}{e}\ext{i}{j}x$
\end{document}

enter image description here


ADDENDUM:

A perhaps better and certainly shorter way to get an essentially similar result, achieved by merely vertical lapping the scaled \smallfrown between the two arguments:

\documentclass{article}
\usepackage{amssymb,stackengine,scalerel}
\newcommand\ext[2]{%
 \ThisStyle{\setbox0=\hbox{$\SavedStyle#1#2$}#1
  \tclap[\dimexpr\ht0-.5\LMpt]
  {$\kern1\LMpt\SavedStyle\scaleobj{.6}{\smallfrown}$}#2}
}
\begin{document}
$ximaeijx$

$x\ext{i}{m}\ext{a}{e}\ext{i}{j}x$

$\scriptstyle x\ext{i}{m}\ext{a}{e}\ext{i}{j}x$

$\scriptscriptstyle x\ext{i}{m}\ext{a}{e}\ext{i}{j}x$
\end{document}
6

One can just add a switch to the simpler-wick package. (These look like Wick contractions except that they are round.)

\documentclass[fleqn]{article}
\usepackage[sep=3pt,offset=0.5ex]{simpler-wick}
\newif\ifWickRound
\WickRoundfalse
\pgfkeys{
  /simplerwick/round/.code={\WickRoundtrue},
}

\makeatletter
\def\swick@end#1#2{
  \swick@setfalse@#1
  \tikzexternaldisable
  \begin{tikzpicture}[remember picture, baseline=(swick-close#1.base)]
    \node[use as bounding box, inner sep=0pt, outer sep=0pt] (swick-close#1) {$\displaystyle #2$};
  \end{tikzpicture}
  \tikz[remember picture, overlay]
{
\ifWickRound
    \draw[white,line width=2pt,postaction={draw,black,thin}] 
        let \p1=(swick-open#1.north),\p2=(swick-close#1.north),
        \n1={max(\y1,\y2)+1pt}
    in (\x1,\n1) to[out=60,in=120] (\x2,\n1);
\else
    \draw ($(swick-open#1.north) + (0, 3pt)$) 
          -- ($(swick-open#1.base) + (0, \swick@offset) + #1*(0, \swick@sep)$) 
          -- ($(swick-close#1.base) + (0, \swick@offset) + #1*(0, \swick@sep)$) 
          -- ($(swick-close#1.north) + (0, 3pt)$);
\fi}
\tikzexternalenable}
\makeatother

\begin{document}
\[\wick[round]{\c1x\c1y+3\c2x\c3y+2\c2 x+\c3z}\]
\end{document}

enter image description here

Please note that the appearance is very easy to modify. If you give feedback I'll be happy to adjust it to your needs.

ADDENDUM: This modifies the appearance according to your comment. (I am not sure if I interpret it correctly, though. Of course one can change the line width.)

\documentclass[fleqn]{article}
\usepackage[sep=3pt,offset=0.5ex]{simpler-wick}
\newif\ifWickRound
\WickRoundfalse
\pgfkeys{
  /simplerwick/round/.code={\WickRoundtrue},
}

\makeatletter
\def\swick@end#1#2{
  \swick@setfalse@#1
  \tikzexternaldisable
  \begin{tikzpicture}[remember picture, baseline=(swick-close#1.base)]
    \node[use as bounding box, inner sep=0pt, outer sep=0pt] (swick-close#1) {$\displaystyle #2$};
  \end{tikzpicture}
  \tikz[remember picture, overlay]
{
\ifWickRound
    \draw[white,line width=2pt,postaction={draw,black,thin,line cap=butt}] 
        let \p1=(swick-open#1.north west),\p2=(swick-close#1.north west),
        \p3=(swick-open#1.north east),\p4=(swick-close#1.north east),
        \n1={max(\y1,\y2)+1pt},\n2={0.2*\x1+0.8*\x3},\n3={0.8*\x2+0.2*\x4}
    in (\n2,\n1) to[out=60,in=120] (\n3,\n1);
\else
    \draw ($(swick-open#1.north) + (0, 3pt)$) 
          -- ($(swick-open#1.base) + (0, \swick@offset) + #1*(0, \swick@sep)$) 
          -- ($(swick-close#1.base) + (0, \swick@offset) + #1*(0, \swick@sep)$) 
          -- ($(swick-close#1.north) + (0, 3pt)$);
\fi}
\tikzexternalenable}
\makeatother

\begin{document}
\[\wick[round]{\c1x\c1y+3\c2x\c3y+2\c2 x+\c3z}\]
\end{document}

enter image description here

2
  • 1. Can the tip of the symbol start/end not at the center of the letters, but closer to the vertical edge (say at 4/5 of the character width) ? 2. Can the tip of the arc be not squared but round ? 3. Can the arc thickness be tuned ?
    – Soleil
    Mar 12, 2020 at 12:43
  • @Soleil I added something. One can tune the line width but I do not know what line width you have in mind.
    – user194703
    Mar 12, 2020 at 13:08
0

Another alternative, built from the exponent.

\documentclass{article}
\usepackage{amssymb}
\newcommand\extt[2]{\ensuremath{#1^{\smallfrown}\mkern-2mu #2}}

\begin{document}
\[\extt{a}{b}, \extt{j}{i}, \extt{i}{j},\extt{k}{i}, \extt{A}{B}, \extt{P}{q}, \extt{q}{P}\]
\end{document}

result

0

I add my simple solution using mathabx package that it provides to get the command \wideparen for the arc on the letters.

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}
\usepackage{mathabx}


\begin{document}
\begin{align}
oa\wideparen{ab}def &\quad  yh\wideparen{imn}ryri\\
ppf\wideparen{la}abc\wideparen{gg}&\quad \wideparen{im}r
\end{align}

\begin{align}
\scriptstyle{oa\wideparen{ab}def} &\quad  yh\wideparen{imn}ryri\\
ppf\wideparen{la}abc\wideparen{gg}&\quad \scriptstyle{\wideparen{im}r}
\end{align}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .