6

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.

1

2 Answers 2

9

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

4
  • 1
    I would use \mathbin here as this seems to be a binary operator.
    – LaRiFaRi
    Jan 15, 2015 at 8: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, 2015 at 8: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 tex.stackexchange.com/a/38984/10995 Jan 15, 2015 at 9:13
  • @LaRiFaRi: The ordinary implication symbol \to is also a \mathrel, so this makes the spacing consistent. Jan 15, 2015 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

2
  • I think it is meant to be a math operator. Jan 15, 2015 at 8:13
  • @HenriMenke Yep, just realized that, and edited.
    – Ryan
    Jan 15, 2015 at 8:17

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.