7

First I want to apologize if the answer to this question is well known. But after some searching, I couldn't uncover any similar questions.

In my document, I would like to feature a regular sentence (with very little math included) using display mode. For example, I want the following sentence displayed:

\begin{equation}
\textrm{All }x\textrm{ are }y;\textrm{ all }y\textrm{ are }z;\textrm{ therefore, all }x\textrm{ are }z.
\end{equation}

I produced that by using the \begin{equation} command. However, note that using this command, math mode is automatically included so my sentence becomes italicized unless I wrap everything except my variables in \textrm{...}. In this case, I think it would be better if I could do the opposite: "turn off" math mode (so I don't need the \textrm{...}), and wrap only my variables with $$.

Does anybody know of an alternative to \begin{equation} and \begin{align} environments without math mode automatically enabled?

Thanks for your help!

4
  • 2
    What you want is the center environment. Using \begin{center} content... \end{center} you can insert text inside it and use $...$ for math contents.
    – Sigur
    Commented Sep 27, 2014 at 21:11
  • Ah! That's simple! Sorry for not realizing. And is there some way to put an equation label beside it in parentheses, like what happens when using \begin{equation} or \begin{align}? Thank you! Commented Sep 27, 2014 at 21:32
  • @Mathemanic You should (actually) most to check the amsmath package [documentation](), there you can find very nice tools for achieve what you asked. First, you can load that package and easily insert text with \text{}. You can also use \tag{} for customize the numbers and \eqref{} for cross reference easily with parentheses.
    – Aradnix
    Commented Sep 27, 2014 at 21:38
  • As an extension, do you know if it is possible in the text mode to have multiple lines of text, aligned at some character? I tried using "&" and "\\" (from the align environment), however they did not work out. Commented Sep 28, 2014 at 1:18

1 Answer 1

10

I would use \text like this:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
  \text{All $x$ are $y$; all $y$ are $z$; therefore, all $x$ are $z$.}
\end{equation}

\end{document}
2
  • Alex, is it possible to have multiple lines aligned in text mode? I tried using "&" and "\\" (from the align environment), however they did not work out. If possible, maybe you could add it to your answer? Thanks! Commented Sep 28, 2014 at 1:15
  • @Mathemanic Well, then you need to interrupt \text and place the & signs like ...}&\text{....
    – Alex
    Commented Sep 28, 2014 at 9:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .