# Symbol for “defined to be logically equivalent” (:⇔)

Is there a way to typeset the symbol ":⇔" correctly in LaTeX (i.e. with the right alignment and spacing)? I know that using :\Leftrightarrow or :\Longleftrightarrow gets me the symbol I'm looking for (more or less), but the spacing doesn't look right to me. Constructions using \iff or \colon didn't really seem to do the trick, either.

Do I have to define such a symbol myself (if so: how?), or is there a package proving this? Unfortunately, I did not find anything myself (especially because I don't know what to search for exactly; I got the description "defined to be logically equivalent" from Wikipedia, since I didn't even know the correct name).

-

Package colonequals provides a vertically centered colon: \ratio. Both \ratio and \Leftrightarrow are of kind \mathrel, therefore TeX will not put additional space between them:

\documentclass{article}
\usepackage{colonequals}
\newcommand*{\logeq}{\ratio\Leftrightarrow}

\begin{document}
$A \logeq B$
\end{document}


When additional space is wanted between the colon and the arrow (see Raphaels's comment), then \colonsep can be defined and set between the symbols, e.g.:

\renewcommand*{\colonsep}{\mkern1mu\relax}% small extra space
\newcommand*{\logeq}{%
\mathrel{\ratio\colonsep\Leftrightarrow}%
}


P.S. It does not matter here, whether the star form of \newcommand is used or not, because there aren't any argument and the definition is not empty. Therefore it is mostly a matter of taste here.


-
Just a quick question: In contrast to the other two answers (which pretty much yield the same results, I think), you used the starred version of \newcommand. Is there a good reason to do this? I thought this only makes a difference if you define a command that takes arguments. BTW: I chose your solution (but with \providecommand and without * (for now), because I like to use packages whenever possible, as I think package authors are generally more clever than I am with those things. – Lustique Aug 28 '14 at 14:09
And with that I mean the use of \ratio rather than \mathrel{\vcentcolon ... or \mathrel{\raisebox ..., not that I think the other two solutions or posters are less clever than you. :D – Lustique Aug 28 '14 at 14:16
@barbarabeeton I have removed the comment with the typo, because editing is no longer possible. It's added to the anwser, following your request. (But in a smaller font, because it is rather unrelated to the original question.) – Heiko Oberdiek Aug 28 '14 at 17:59
Based on the documentation of colonequals, is should probably be \ratio\colonsep\Leftrightarrow. Also, is should probably be surrounded by \mathrel? – Raphael Sep 14 '15 at 10:01
@Raphael A surrounding \mathrel is usually not needed, because relational symbols in a row do not have space between them and they behave as one relational symbol regarding the horizontal spacing and a breakpoint is only added after the last symbol. But if space is inbetween, then they should be surrounded by \mathrel to avoid breaks at the space. – Heiko Oberdiek Sep 14 '15 at 10:11

The mathtools package already has the necessary tool to do that (don't load amsmath: mathtools already does it):

\documentclass[12pt]{article}

\usepackage{mathtools}

\newcommand\logeq{\mathrel{\vcentcolon\Leftrightarrow}}

\begin{document}

$A \logeq A$

\end{document}


-
The \mathrel is not needed here, as both symbols are already math relations. – LaRiFaRi Nov 18 '15 at 15:16

Maybe this?

\documentclass[12pt]{article}
\usepackage{amsmath}
\newcommand\logeq{\mathrel{\raisebox{.66pt}{:}}\Leftrightarrow}
\begin{document}
$A \logeq A$
\end{document}


-