1

I would like to get the old 'in' (\in) symbol in LaTeX. You know, the symbol which is (very similar or equal to) the upright varepsilon. So I think to use in fact the upright greek letter epsilon. For that I need such a character. It is provided for example in the package upgreek, but, if ti was possible, I would like to import only the upvarepsilon glyph intead of using all the package. Whast would be the code for that?

And, there is a better way to get the old in symbol?

I know Importing a Single Symbol From a Different Font, but I don't know how to use it to import the upright epsilon. I have also read the package documentationfrom CTAN, but upgreek has only 4 pages, so it doesn't explain too much about fonts and options. Finally, I have tried to copy the definition line of the \upvarepsilon in my preamble, but it doesn't work, logically.

Anyway, here is the symbol I wan:

enter image description here

Thanks

PD: There are many questions about importing dingle elements from other packages and their hasn't been marked as duplicate.

Dog_69
  • 981

2 Answers2

4

I’ve one book that uses ɛ for the relation “belongs to”, precisely Kelley’s “General Topology”. It’s old-fashioned, though.

You can use \textgreek for this.

\documentclass{article}
\usepackage{amsmath}
\usepackage{textgreek}

\renewcommand{\in}{\mathrel{\text{\textepsilon}}}

\makeatletter
\renewcommand{\notin}{\mathrel{\vphantom{/}\mathpalette\dog@notin\relax}}
\newcommand{\dog@notin}[2]{%
  \ooalign{\hfil$\m@th#1/$\hfil\cr\hfil$\m@th#1\in$\hfil\cr}%
}
\makeatother

\begin{document}

$x\in X$ $y\notin X$

\end{document}

enter image description here

egreg
  • 1,121,712
  • I know how to define the math relation. My problem is in importing the glyph. I was wonder because I found an answer of yours here:https://tex.stackexchange.com/questions/203187/upright-small-greek-via-newtxmath-without-replacing-the-math-font?rq=1. The \epsilon I want is the \varepslion of your last option. However, it doesn't work. Do you know why? Do you think I should change the question and ask why your answer doesn't work? – Dog_69 Feb 07 '18 at 16:05
  • I must also confess that I knew how to define the math relation, but it seems define the \notin command is really difficult and probably I wouldn't know how to do it. So thanks. – Dog_69 Feb 07 '18 at 16:07
  • @Dog_69 With the declaration of a new symbol font it's a bit more efficient, not much to care with today's machines. – egreg Feb 07 '18 at 16:12
  • \egreg: Right. Anyway, I would like to get the symbol of the picture (see the edit). – Dog_69 Feb 07 '18 at 16:17
  • @Dog_69 Find a font that has the shape you'd like. I wouldn't care about the small difference. – egreg Feb 07 '18 at 16:17
2

If you have a math alphabet to spare, you could do this, which will use more proper spacing:

\documentclass{article}
\usepackage[LGR,T1]{fontenc}

\DeclareSymbolFont{greekroman}{LGR}{cmr}{m}{rs}
\DeclareMathSymbol{\in}{\mathrel}{greekroman}{"65}

\begin{document}
\( \varepsilon \in 3 \)
\end{document}
gnucchi
  • 946
  • One question before to mark it as good:How can I know if ''I have a math alphabet to spare''? What do you mean? – Dog_69 Feb 07 '18 at 23:31
  • This explains it a bit, but basically in plain (La)TeX you have a max of 16 uses of \DeclareSymbolFont (including the default 3 or so standard uses). Some packages use a lot of these, some use none. In {Xe,Lua}(La)TeX I think you have practically infinite slots. As long as you don't get the error LaTeX Error: Too many symbol fonts declared you're good. – gnucchi Feb 08 '18 at 10:16
  • I see know. However, your code doesn't compile me. I suppose LGR needs some special font that I haven't got installed. Anyway, your answer is very good. – Dog_69 Feb 08 '18 at 10:59
  • They're probably in the cbfonts package, which comes in a lot of shapes (e.g. the {rs} from above), as we can see in lgrcmr.fd. – gnucchi Feb 08 '18 at 11:08
  • I'll try and I'll post a comment. – Dog_69 Feb 08 '18 at 19:51