I want to make write an equation that looks like this:

if (x belongs to A) then (B is a subset of C)

I tried using

\[ if x \in A then B \subseteq C \]

but it ended up looking pretty ugly, with all the words jumbled together

my pdf output

How can I make the "if" and the "then" appear as separate, bold words to make it clearer that they are keywords? Is there a way to do that from within math mode?

  • \[\textbf{if } x \in A \textbf{ then } B \subseteq C\] – LaRiFaRi Jun 8 '15 at 22:48

Please avoid mixing text and math if your message can be spelled out as you have here. The easiest way to write this is

If $x\in A$ then $B$ is a subset of $C$. In other words 
\( x\in A \implies B \subseteq C \)

But as a complete answer you can write

\[ \text{\textbf{If }} x \in A \text{\textbf{ then }}B \subseteq C \]

As a MWE

\usepackage{mathtools} % <-- fixes, enhances amsmath
If $x\in A$ then $B$ is a subset of $C$. In other words \( x\in A \implies B \subseteq C \)
    \[ \text{\textbf{If }} x \in A \text{\textbf{ then }}B \subseteq C \]

enter image description here

| improve this answer | |
  • Why not use simply \texbf{If } and \textbf{ then }? – Bernard Jun 8 '15 at 23:36
  • @Bernard -- in the (unlikely) event that bold words occur in a sub/superscript or other environment in a size other than that of the surrounding text, the \text command will choose the appropriate size. – barbara beeton Jun 9 '15 at 13:36
  • @barbara beeton: I didn't know that. Never tried either, I confess. – Bernard Jun 9 '15 at 13:41

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.