7

I'm trying to use this symbol in a LaTeX document I'm writing but I can't for the life of me, find how to write it in LaTeX:

enter image description here

The symbol means that two expressions are logicically equivalent (i.e. A |==| B)Can anybody identify the missing symbol?

Todd Davies
  • 1,389

3 Answers3

5

Without the use of packages, you could do this:

\documentclass{article}
\def\logequiv{\mathrel{\vert\mkern-3mu{=}\mkern-3mu{=}\mkern-3mu\vert}}
\begin{document}
$ A \logequiv B$
\end{document}

enter image description here

If you didn't like the height of the \verts, you could do this instead:

\documentclass{article}
\def\logequiv{\mathrel{%
  \rule{.3pt}{1.3ex}\mkern-1mu{=}\mkern-8mu{=}\mkern-2mu\rule{.3pt}{1.3ex}}}
\begin{document}
$ A \logequiv B$
\end{document}

enter image description here

  • Nice. Could you explain us why -3mu? Is the length of some symbol? – Sigur Jan 09 '14 at 20:24
  • 2
    @Sigur The \mkern with a negative argument removes the natural space between the two symbols. The mu is the unit of mathematical kerning. I just played with the actual numbers until I ate up all the space. My experience is that symbols have a natural space around them in integer units of mu, though I could be wrong. – Steven B. Segletes Jan 09 '14 at 20:26
  • @Sigur I should add that, in both math and text kerning, the kern has no glue, and will therefore not stretch or shrink depending on the line length, unlike (for example) \hspace. Therefore, the (m)kern is the proper way to combine symbols together. – Steven B. Segletes Jan 09 '14 at 20:37
  • I think this might be flawed; what happens when the text size of the document isn't the default size but is changed to say 14pt? Wouldn't the spacing change? – Todd Davies Jan 09 '14 at 21:15
  • @ToddDavies It is true that the solution is tailored to a particular font size. Different versions could be developed for different font sizes, which would be the easiest. With more calculation, a self-adjusting version could be developed, as well, I'm sure. – Steven B. Segletes Jan 09 '14 at 22:09
5

There is actually a dedicated package for typesetting symbols of this sort. They are called turnstiles and the package is called turnstile. It is included in TeX Live and can typeset turnstiles of essentially any kind. It is actually a big improvement on what was available before which was essentially just mathematics symbols. For very simple turnstiles, I sometimes find the maths symbols look better but it really depends what you need and what the context is (e.g. where you are pulling your connective symbols from etc.) In any case, for more complex turnstiles such as this one, it is definitely the best option I'm aware of:

\documentclass{article}
\usepackage{turnstile}
\newcommand*{\myequiv}{\sdststile{}{}}

\begin{document}

The symbol you need:
\[
  \myequiv
\]

A selection of other possibilities:
\[
    \sststile{T}{}\quad \sdtstile{a^+}{}\quad \dtdtstile{A}{B}\quad \nsttstile{}{C}
\]

\end{document}

produces (probably - I can't check):

selected turnstiles

Note that the sample image posted in the question seems to have a slight gap on the right. I'm pretty sure that shouldn't be there.

cfr
  • 198,882
1

If you don't find that symbol (I believe that there is one) as a unique character you can combine two others to obtain a very similar one.

From mathabx package you can define

\newcommand{\myequiv}{\vDash\!\!\Dashv}

to use as $A\myequiv B$.

enter image description here

Sigur
  • 37,330
  • 1
    but beware that the mathabx fonts change a lot of other symbols as well. there are several questions that address how to access just a few symbols from a font rather than loading the whole thing via a package. – barbara beeton Jan 09 '14 at 20:11
  • @barbarabeeton, well pointed. – Sigur Jan 09 '14 at 20:23
  • To extract just a particular symbol from mathabx you could follow an approach such as http://tex.stackexchange.com/questions/113437/stealth-arrow-in-math/113472#113472 or http://tex.stackexchange.com/questions/14386/importing-a-single-symbol-from-a-different-font. – Steven B. Segletes Jan 09 '14 at 20:40
  • If you didn't want to use mathabx, you could first define \Dashv by \newcommand{\Dashv}{\mathrel{\scalebox{-1}[1]{$\vDash$}}} (using package graphicx). – dbmag9 Jan 09 '14 at 23:31