I want to design a new element symbol. How can I add the red line and blue line (different codes \myin \mynotin ) to my code?

enter image description here enter image description here

\def\h {1.3ex} % cup and cap height
\def\w {1.2ex} % cup and cap width
\def\lw{0.12ex} % cup and cap line width
\def\spp{0.7269ex} % space before and after

  \tikz[line width=\lw,line cap=round,rotate=#1,baseline=-0.4ex]
  {\draw (-0.5*\w,0.5*\h) -- (-0.5*\w,0.5*\w-0.5*\h)
  arc (-180:0:0.5*\w) -- (0.5*\w,0.5*\h);}
  • hm, $\in$, $\notin$? or should be symbol elements colored as shown on image?
    – Zarko
    Commented Oct 3, 2021 at 15:26
  • No. color is not a problem @zarko
    – suarez
    Commented Oct 3, 2021 at 15:28
  • why you like to draw this symbols if they already exist? I do not understand your intention :-(
    – Zarko
    Commented Oct 3, 2021 at 15:31
  • I use in different fonts @Zarko
    – suarez
    Commented Oct 3, 2021 at 15:32
  • Which fonts you use (that not support basic math symbols)?
    – Zarko
    Commented Oct 3, 2021 at 15:35

2 Answers 2


It is not entirely clear, what is your problem. Exercise with drawing symbols as pictures (not recommended for use in documents) or to have symbols appropriate size.

Anyway, the standard use of your symbols:


text $\in$, $\notin$

gives good match sizes of symbols and text:

enter image description here

If this is not your problem/concern, please edit your question and clarify, what you like to have.

  • I want to re-encode the element symbol. I wrote some of the code but I couldn't create the middle line.
    – suarez
    Commented Oct 3, 2021 at 16:20

This produces your desired effect:


$a \mynotin\ S$ 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .