7

What exactly is the purpose of the \DTOSB in the definition of \iff? There is a mention in Is there a left-handed equivalent of \implies? that the \DOTSB makes \iff "dots aware". But, when I try to use \dots on either side I don't see any difference.

Egreg commented that you need \newcommand* in order for DOTSB to have an effect. But, it seems that the definition with using the star option in \newcommand* differs from the definition of \iff. Its the

\newcommand{\MyIffWithDotsbNonStar}{\DOTSB\;\Longleftrightarrow \;}

the produces the same meaning as \iff.

enter image description here

References:

MWE:

\documentclass{article}
\usepackage{mathtools}
\usepackage{xcolor}
\usepackage[paperwidth=10in]{geometry}% for better display of output

\newcommand{\MyIffWithDotsbNonStar}{\DOTSB\;\Longleftrightarrow \;}
\newcommand{\MyIffWithoutDotsbNonStar}{\;\Longleftrightarrow \;}

\newcommand*{\MyIffWithDotsbStar}{\DOTSB\;\Longleftrightarrow \;}
\newcommand*{\MyIffWithoutDotsbStar}{\;\Longleftrightarrow \;}

\begin{document}
\par \verb|\iff|: \texttt{\meaning\iff}
\par \verb|\MyIffWithDotsbNonStar|: \texttt{\meaning\MyIffWithDotsbNonStar}
\par \verb|\MyIffWithDotsbStar|: \texttt{\meaning\MyIffWithDotsbStar}

\medskip
\par $a \iff b$ using \verb|\iff|
\par $a \MyIffWithDotsbNonStar b$ using \verb|\MyIffWithDotsbNonStar|
\par $a \MyIffWithoutDotsbNonStar b$ using \verb|\MyIffWithoutDotsbNonStar|
\par $a \MyIffWithDotsbStar b$ using \verb|\MyIffWithDotsbStar|
\par $a \MyIffWithoutDotsbStar b$ using \verb|\MyIffWithoutDotsbStar|


\medskip
\par $a \dots \iff \dots b$ using \verb|\dots \iff \dots|
\par $a \dots \MyIffWithDotsbNonStar \dots b$ using \verb|\dots \MyIffWithDotsbNonStar \dots|
\par $a \dots \MyIffWithoutDotsbNonStar \dots b$ using \verb|\dots \MyIffWithoutDotsbNonStar \dots|
\par $a \dots \MyIffWithDotsbStar \dots b$ using \verb|\dots \MyIffWithDotsbStar \dots| \textcolor{red}{\bfseries DIFFERS}
\par $a \dots \MyIffWithoutDotsbStar \dots b$ using \verb|\dots \MyIffWithoutDotsbStar \dots|

\end{document}
  • 1
    You need \newcommand* in order \DOTSB to have an effect, see tex.stackexchange.com/a/266721/4427 – egreg Jan 2 '16 at 9:38
  • @egreg: It seems that \meaning\iff and \meaning\MyIffWithDotsbNonStar (defined with \newcommand (i.e. without the star option) gives the same meaning. – Peter Grill Jan 2 '16 at 10:08
  • 1
    Yes, \iff has a wrong definition in amsmath.sty – egreg Jan 2 '16 at 10:13
  • I'd like to know as well. Was editing a set of notes and was using a variant of iff where I'd added a quad on both sides. You can see the alignment difference if you add it into an align – daleif Jan 2 '16 at 10:15
  • 1
    @egreg -- in defense of amsmath, i don't believe that \newcommand* existed when it was created; certainly \newcommand* is not even mentioned in lamport, nor is there any indication (p.192) that anything defined with \newcommand is automatically \long. i'm adding this problem to the amsmath bugs list, but please let me know what other commands are similarly erroneously \long. – barbara beeton Jan 5 '16 at 22:03
4

If you use amsmath 2.15 then you can use \newcommand or \newcommand* as \long is ignored when checking the \meaning. This means that \dots now works as intended with \iff and gives centred dots.

enter image description here

  • Does this ignore \protected too? – Manuel Mar 4 '16 at 10:14
  • @Manuel No, one thing at a time:-) main reason for changing it was to make it work in luatex which in development builds never reports \mathchar in \meaning any more, and fixing \long so the package's own definition of iff and related arrows worked as intended seemed hard to avoid:-) – David Carlisle Mar 4 '16 at 10:17
  • Okey, I thought it would be easier to gobble everything until -> and look for \DOTSB. – Manuel Mar 4 '16 at 10:21
  • 1
    @Manuel I really wanted to minimize changes in pdftex this time round (I even considered not fixing the \long bug) agreement with AMS was that we'd update it to make it work in luatex and not mess up the pdftex workflow... – David Carlisle Mar 4 '16 at 10:28

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.