I was interested in using a custom symbol. So, I played around with some numbers in a MWE (because it was much faster to compile) before trying it out in my original document. I wound up with the following. (The parameters were just found by experimentation.)
\documentclass{minimal}
\usepackage{graphicx}
\newcommand{\ineq}{\mathrel{\mkern -3mu \in \mkern -16mu \makebox[0.5em]{\raisebox{-.225em}{\scalebox{1.68}[1]{\_}}}}}
\begin{document}
$x\ineq y$
\end{document}
Then, I added this to the document I wanted to actually use it in, but it didn't quite look so nice. Below, I've included the same MWE as before, but now with most font-related commands that appear in the preamble of the document intended for final use. (These lines were inserted between \documentclass{minimal} and \usepackage{graphicx}.)
\documentclass{minimal}
\usepackage[utf8]{luainputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[tracking=true]{microtype}
\usepackage{avant}
\usepackage{mathptmx}
\usepackage{graphicx}
\newcommand{\ineq}{\mathrel{\mkern -3mu \in \mkern -16mu \makebox[0.5em]{\raisebox{-.225em}{\scalebox{1.68}[1]{\_}}}}}
\begin{document}
$x\ineq y$
\end{document}
Now, I could just redefine the symbol with parameters modified so that things look right with this new preamble, but this solution is less than ideal because, every time I want to reuse the symbol in a different setup, I will have to go back and play with the numbers again. It would be best if I could define a single command that was robust enough to display 'correctly' in almost any environment. Is it possible to do something like this?






minimalto begin with. Andmathptmxis not the best math font package: it's essentially a 20th century hack for getting an almost decent Times-like font with math support. – egreg Mar 30 '17 at 21:46mathptmx? Somewhat confused. But please provide complete code we can compile and do not useminimal. – cfr Mar 30 '17 at 21:51minimal. – cfr Mar 30 '17 at 22:20