# How to tex $:\iff$ correctly?

In the thread Symbol for "defined to be logically equivalent" (:⇔), we discussed how to tex ":⇔" correctly. As we learnt, the solution is to define the following new command:

\newcommand*{\logeq}{\ratio\Leftrightarrow}


Now, this only works with

\Leftrightarrow


I am interested in how to tex the "colon \iff" correctly, that is, with a

\Longleftrightarrow


\Leftrightarrow

• What does it look like if you just substitute the commands? Does it not look "correct"? If so, why? – Werner Aug 24 '16 at 18:52
• \Longleftrightarrow (or, which is the same, \iff) generates space in front and behind it. – CantBelieve Aug 24 '16 at 18:56
• The spacing isn't that much different when you use \ratio\Longleftrightarrow (picture) compared to using \iff. Why do you need to use \iff? – Werner Aug 24 '16 at 19:01
• @Werner: Thanks, you are right. I thought \Longleftrightarrow would be the same as \iff. But the issue with the spacing only arises with \iff. Your comment is worth an answer. :-) – CantBelieve Aug 24 '16 at 19:04
• \ratio\Longleftrightarrow should be good; not \iff (that's not really supported in LaTeX). – egreg Aug 24 '16 at 19:27

\iff is similar to \Longleftrightarrow but forces an amount of space on either side - a \; or \thickmuskip (see What commands are there for horizontal spacing?). That,

\def\pshow#1{{\let\protect\show#1}}
\pshow\iff


yields

> \iff =\long macro:
->\;\Longleftrightarrow \;.
\iff ->\protect \iff


in the .log. In contrast,

\pshow\Longleftrightarrow


yields

> \Longleftrightarrow =\long macro:
->\Leftarrow \joinrel \Rightarrow .


in the .log - a \join or the relations \Leftarrow and \Rightarrow, without adding spaces around the outside.

\documentclass{article}
\usepackage{colonequals}
\newcommand*{\logeq}{\ratio\Leftrightarrow}
\newcommand*{\longeq}{\ratio\Longleftrightarrow}
\begin{document}
$A \logeq B \longeq C$
\end{document}

• I guess for those using \iff elsewhere it makes sense to use \newcommand*{\longeq}{\;\ratio\Longleftrightarrow\;} so that the spacing comes out the same. – Daniel Sep 22 '19 at 8:56