6

I was trying to find a workaround providing a single line below a glyph in maths mode. That is, I would like to achieve something similar to the maths symbols \leq and \subseteq as opposed to < and \subset, respectively, but with another glyph.

I have tried several workarounds using the accents package (that is, \underaccent) and a combination of \underset and \raisebox. My attempts follow:

\documentclass[11pt]{article}

\usepackage{accents}
\usepackage{amsmath}

\begin{document}

$\subseteq$ $\subset$ \raisebox{0.1em}{$\underaccent{\bar}{\in}$} \raisebox{0.1em}{$\underset{\bar{}}{\in}$} \raisebox{0.1em}{\underline{$\in$}}

\end{document}

In particular, I am looking for the \in symbol with such a single line below.

Any help is much appreciated. Thanks, Rance

EDIT: I apologise, I wasn't specific enough in my original post; I would like a symbol that looks good in the sense that it is in line with its analogues \subseteq and \leq. That is, the single equal line below has rounded edges, and its length matches the width of the \in-glyph precisely. That is what I'd like to achieve. That exactly is why I refrained from using the attempted symbols I provided in my original post.

4

Weren't for the sharp cuts this seems to do what you need.

\documentclass[11pt]{article}

\usepackage{amsmath}

\makeatletter
\newcommand\ineq{}% for safety
\DeclareRobustCommand{\ineq}{\mathrel{\mathpalette\rance@ineq\relax}}
\newcommand{\rance@ineq}[2]{%
  \vcenter{\hbox{%
    $\m@th#1\mkern1.5mu\underline{\mkern-1.5mu\in\mkern-1.5mu}\mkern1.5mu$%
  }}%
}
\makeatother

\begin{document}

$\subseteq$ $\subset$ $\ineq$ $\in$

$\ineq_{\ineq}$

\end{document}

enter image description here

2

accents seems to be using definitions in amsmath, you could simply move it to after \usepackage{amsmath} and then your code would work and would generate the required symbols.

However, there is no need for accents for the last symbol which seems to be what you're looking for. \underline{\in} is sufficient.

\documentclass[11pt]{article}


\usepackage{amsmath}

\begin{document}

you could simply use it like so $\underline{\in}$

\end{document}
  • Thanks for your answer! However, that doesn't look very good compared to \subseteq and \leq. I have edited my original post. – MacRance Jul 4 '17 at 10:53
2

Here are two variants with stackengine:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}

\usepackage{accents}
\usepackage{stackengine}
\newcommand\ineq{\stackMath\mathrel{\stackinset{c}{0.03em}{c}{-1.5ex}{\mathord{\relbar}}{\in}}}
\newcommand\varineq{\stackMath\mathrel{\stackinset{c}{0.03em}{c}{-1.57ex}{\mathord{\relbar}}{\raisebox{0.2ex}{$ \in $}}}}


\begin{document}

 $A\ineq B\subseteq C$

 $A\varineq B\subseteq C$

\end{document} 

enter image description here

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.