# How do I superimpose two math symbols?

I want to create a symbol that superimpose \top and \bot. I have done this

\documentclass[12pt]{article}
\usepackage{amsmath}
\newcommand{\modd}{\top\hspace{-3.17mm}\bot}
\begin{document}
$\modd \top \bot$
\end{document}


But the vertical bar seems too thick. I have detexified the symbol and browsed through the comprehensive list, without success.

• Why not a capital sans-serif I (of the appropriate font)? – Steven B. Segletes May 22 at 10:37
• @StevenB.Segletes Yes, I have tried this but the height should also be the same as the height of \top. I want to create a symbol saying in between top and bottom. – Denis May 22 at 10:40

\documentclass[12pt]{article}
\usepackage{amsmath,stackengine}
\newcommand{\modd}{\ensurestackMath{\stackengine{0pt}{\top}{\bot}{O}{c}{F}{F}{L}}}
\begin{document}
$\modd \top \bot$
\end{document}


If you need it at smaller math styles:

\documentclass[12pt]{article}
\usepackage{amsmath,stackengine,scalerel}
\newcommand{\modd}{\ThisStyle{\ensurestackMath{\stackengine{0pt}%
{\SavedStyle\top}{\SavedStyle\bot}{O}{c}{F}{F}{L}}}}
\begin{document}
$\modd \top \bot$

$\scriptstyle\modd \top \bot$

$\scriptscriptstyle\modd \top \bot$
\end{document}


You guessed a wrong value of the negative space. You needn't guess, TeX can do the work for you.

\documentclass{article}

\makeatletter
\newcommand{\modd}{\mathord{\mathpalette\denis@modd\relax}}
\newcommand{\denis@modd}[2]{\ooalign{$\m@th#1\top$\cr$\m@th#1\bot$\cr}}
\makeatother

\begin{document}

$\modd\top\bot$

\end{document}


See https://tex.stackexchange.com/a/22375/4427 for more information on \ooalign.

• +1 for an answer which does not depend on any packages – user156344 May 22 at 10:56