5

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} 

enter image description here

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
5
\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} 

enter image description here

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} 

enter image description here

11

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}

enter image description here

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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