7

I want to draw a "separating implication" symbol by using Latex.

This is an operator in Separation Logic and it looks like below:

enter image description here

enter image description here

It should be a minus symbol (-) combining with an asterisk (*), but how to remove completely space between them?

I try \mathrel{{-}{*}} but it does not work.

Henri Menke
  • 109,596
Trung Ta
  • 595

2 Answers2

10

Is this okay?

\documentclass{article}
\newcommand\sepimp{\mathrel{-\mkern-6mu*}}
\begin{document}
$P\sepimp Q$
$\scriptstyle P\sepimp Q$
$\scriptscriptstyle P\sepimp Q$
\end{document}

enter image description here

Henri Menke
  • 109,596
  • 1
    I would use \mathbin here as this seems to be a binary operator. – LaRiFaRi Jan 15 '15 at 08:11
  • Do you mind explaining what \mathrel does? What's the difference between our answers, and why does yours look/work better? – Ryan Jan 15 '15 at 08:22
  • @Ryan \mathrel makes the enclosed symbol to behave like a relation when it comes to inserting math glue. \mathbin does the same but makes to argument a binary operator. See also http://tex.stackexchange.com/a/38984/10995 – Henri Menke Jan 15 '15 at 09:13
  • @LaRiFaRi: The ordinary implication symbol \to is also a \mathrel, so this makes the spacing consistent. – Emil Jeřábek Jan 15 '15 at 14:31
3

Quick text version:

\documentclass{article}

\newcommand{\sep}{--\kern-.25em\raisebox{-.62ex}{*}\ }

\begin{document}
    P \sep Q
\end{document

enter image description here

Math mode version:

\newcommand{\sep}{-\kern-.6em\raisebox{-.659ex}{*}\ }

enter image description here

Ryan
  • 2,914