11
 A subset $C$ is \emph{closed} \iff \emph{ $i\in C, i\to j$ \implies $j$ \in $C$ } \\ 

Overleaf shows this where the error is. I've used my brain to find the error but no progress. Error is - missing $ inserted.

  • 2
    The error indicates that some math maerial is not in math mode. \implies seems not to be, but i didn't test. How are you using the dollar signs right now? They seem to be more or less random. – Johannes_B May 14 at 5:32
  • It is probably the \in . Try $j \in C$. – marmot May 14 at 5:38
  • This compiles: \documentclass{article} \usepackage{amsmath} \begin{document} A subset $C$ is \emph{closed} $\iff$ $i\in C, i\to j \implies j \in C$ \end{document}. – marmot May 14 at 6:02
  • If the answer provided below has solved the issues you were facing, please consider upvoting and/or "accepting" it. – Mico May 14 at 20:10
13

The directives \iff, \implies, and \in must all be executed in math mode. Separately, the \emph directive does nothing here, since it's a text-mode command whereas its argument consists entirely of math-mode material.

Hence, you need to replace

A subset $C$ is \emph{closed} \iff \emph{ $i\in C, i\to j$ \implies $j$ \in $C$ }

with

A subset $C$ is \emph{closed} $\iff i\in C, i\to j \implies j \in C$.

Better still, write

A subset $C$ is \emph{closed} if and only if $i\in C, i\to j$ implies $j\in C$.

Of course, you may choose to write "iff" instead of "if and only if".

A full MWE:

enter image description here

\documentclass{article}
\usepackage{amsmath} % for "\implies" macro
\begin{document}
A subset $C$ is \emph{closed} $\iff i\in C, i\to j \implies j \in C$.

A subset $C$ is \emph{closed} iff $i\in C, i\to j$ implies $j\in C$.
\end{document}
  • 2
    Mavellous! The example at the bottom is (a) more readable, (b) has fewer characters to type, (c) is shorter when typeset. What's not to like? – Henning Makholm May 14 at 11:03
  • @HenningMakholm - Many thanks for your compliment! – Mico May 14 at 12:29
  • 4
    +1 for more words and fewer symbols. – Ethan Bolker May 14 at 15: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.