[Tex/LaTex] Alternative to \text inside an align environment

alignformatting

Is there a way to write texts without resorting to using the \text macro every time I write something in the align enviroment?

I am trying to write a proof and pretty much 90% requires me to write inside the align environment.

Here is an example

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
 E is {\bf open} & \iff \textit{every} point  is an {\bf interior point}
                 & \iff \forall x \in E, there exists a neighbourhood of x such that each N is disjoint
                 & \iff \forall x \in E, x is not a limit point of E^c
                 & E^c contains all its limit points
\end{align*}
\end{document}

Basically if I were to include the text, I have to wrap each sentence with \text{…}

Best Answer

The short answer to your question is yes. If you're going to place text within a math environment that you don't want treated like part of a mathematical expression, it needs to be within \text{...}.

But, since the majority of your proof is text, I would use a tabular environment.

\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{lipsum}
\pagestyle{empty}
\begin{document}

\lipsum[1]

\vspace{2ex}
\hspace*{\fill}%
\begin{tabularx}{0.9\linewidth}{l@{}c@{}X}
 $E$ is \textbf{open} & $\iff$ & \textit{every} point  is an \textbf{interior point}                                         \\
                      & $\iff$ & $\forall x \in E$, there exists a neighbourhood of $x$ such that each $N$ is disjoint       \\
                      & $\iff$ & $\forall x \in E, x $is not a limit point of $E^c$                                          \\
                      &        & $E^c$ contains all its limit points                                                         \\
\end{tabularx}%
\hspace*{\fill}
\vspace{2ex}

\lipsum[2]

\vspace{2ex}
\hspace*{\fill}%
\begin{tabular}{l@{}c@{}p{3in}}
 $E$ is \textbf{open} & $\iff$ & \textit{every} point  is an \textbf{interior point}                                         \\
                      & $\iff$ & $\forall x \in E$, there exists a neighbourhood of $x$ such that each $N$ is disjoint       \\
                      & $\iff$ & $\forall x \in E, x $is not a limit point of $E^c$                                          \\
                      &        & $E^c$ contains all its limit points                                                         \\
\end{tabular}%
\hspace*{\fill}
\vspace{2ex}

\end{document}

enter image description here

To get rid of the extra space around \iff I've pre/post-pended @{} to the column type to eliminate all intercolumn spacing around that column.

I've provided two approaches to formatting the last column. I'm sure you don't want it running into the right hand margin. If your margins are small enough, everything should work out fine. Nevertheless, you can use the package tabularx which defines a new table environment tabularx allowing you to create an expandable column type X. For this to work correctly, you have to specify the width of the entire table: I've set it to 0.9\linewidth. But it is not necessary to use tabularx. You can manually set the last column to be a paragraph of a prespecified width: I've done this in the second example where I set the column to p{3in}. This isprobably much narrower than you would really want, but I want you to be able to see the effect.

As already mentioned in the comments to your posting, using \bf and its ilk are looked upon disapprovingly. Instead you should use the LaTeX equivalents. See Does it matter if I use \textit or \it, \bfseries or \bf, etc.

While I've maintained your use of \textbf and \textit, if your purpose is for emphasis, it would be better to use \emph for both. Using too many different font styles is not highly recommended. See Why are these commands considered as bad practice?. While I don't follow it to the letter (I mostly make small documents like handouts and quizzes), I think it is good to be familiar with what the general consensus of the community is: particularly when you're writing something that you might want to share with a larger community.

Related Question