# Symbol similar to \pitchfork for tangent component

I want to define a symbol analogous to \pitchfork from amssymb, which I use meaning "transverse". My new symbol will stand for "tangent" and I want it to be a \cap with a horizontal bar over it, tangent to the \cap symbol. I'd like the bar to be the same size as the vertical bar in \pitchfork, if possible.

I've tried to solve this using some examples I found here at TexExchange, but have failed maily for two reasons.

1. I don't know how to make a horizontal bar as wide as the hight of the vertical bar in \pitchfork, neither how to align ir properly with \cap;
2. I don't know how to make it resize properly. I know there's a way using \mathpalette or \mathchoice, but I failed to use them.

Here is my attempt.

\documentclass{article}
\usepackage{amssymb}

\newcommand{\tangent}{\ooalign{$\cap$\cr\raise.80ex\hbox{$\mkern2mu -$}\cr\raise.80ex\hbox{$\mkern-4mu -$}\cr}}

\newcommand{\Tangent}{\mathrel{\mathpalette{\ooalign{$\cap$\cr\raise.80ex\hbox{$\mkern2mu -$}\cr\raise.80ex\hbox{$\mkern-4mu -$}\cr}}}}

\begin{document}

$\pitchfork \tangent$

\end{document}


This implementation uses a corrected minus sign for the horizontal bar (so that it fills its bounding box) horizontally scaled to match the height of the pitchfork and lowered so it's tangent to the intersection symbol.

Also the \cap symbol is scaled down. The two parts don't superimpose perfectly, but it shouldn't be a problem.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{color}

\makeatletter
\newcommand{\tangent}{\mathrel{\vphantom{\cap}\mathpalette\@tangent\relax}}
\newcommand{\@tangent}[2]{%
\vbox{\offinterlineskip
\sbox\z@{$#1\pitchfork$}%
\ialign{##\cr
\raisebox{-0.37\height}[0pt][0pt]{%
\resizebox{\ht\z@}{\height}{$\m@th\mspace{-1.5mu}-\mspace{-1.5mu}$}%
}\cr
\hidewidth\scalebox{1}[0.89]{$\m@th#1\cap$}\hidewidth\cr
}%
}%
}
\makeatother

\begin{document}

{\ooalign{$\pitchfork$\cr\hidewidth\textcolor{red}{$\tangent$}\cr}}

$\pitchfork \tangent$

$\scriptstyle \pitchfork \tangent$

\sbox0{$\pitchfork$}\the\ht0

\sbox0{$\tangent$}\the\wd0

\end{document}


As you see the difference between height of pitchfork and width of the “tangent” symbol is very small, 0.00031pt, about 10−4mm

• Thanks a lot, it looks good! I won't use \scriptscriptstyle so much, so it's not a big problem. Oct 17 '18 at 21:47
• I just noticed that the "\cap" symbol in \pitchfork is not as tall al the actual \cap symbol. Is there a way to fix that? Oct 17 '18 at 21:48
• @PedroG.Mattos Now it should be OK Oct 17 '18 at 22:02
• Just out of curiosity... I've noticed that my PDF viewer sometimes displays superimposed symbols like these out of alignment. When I zoom into the symbols, they are perfectly aligned, just as above. Why is this so? Oct 18 '18 at 1:36
• @PedroG.Mattos Distinct glyphs may be snapped to the raster in different ways at low resolutions. Oct 18 '18 at 7:33