2
$\begingroup$

I want to be able to create an example of modus ponens using MathJax, in the following form:

$$\frac{\begin{array}{l} \text{If it is raining, then the grass is wet} \\ \text{It is raining} \end{array}}{ \text{The grass is wet}} $$

but I want the conclusion line to be left aligned, in the same way that the premises are. This is the code that I use:

\frac{\begin{array}{l}
   \text{If it is raining, then the grass is wet} \\
   \text{It is raining}
  \end{array}}{
\text{The grass is wet}}

Is this possible?

$\endgroup$
9
$\begingroup$

Don't use \frac, it is meant to be used only with fractions. Use a bigger array, and insert horizontal lines \hlineat appropriate places.

\begin{array}{l}
\text{if it is raining, then the grass is wet}\\
\text{it is raining}\\
\hline
\text{the grass is wet}
\end{array}

$$ \begin{array}{l} \text{if it is raining, then the grass is wet}\\ \text{it is raining}\\ \hline \text{the grass is wet} \end{array} $$

The TeXperts may know of more sophisticated and flexible ways of going about this.

$\endgroup$
  • 1
    $\begingroup$ Why does the "Tour Page" on Meta say: "Don't ask about: Questions about typesetting equations"? - Was it simply copied from math.stackexchange.com/tour ? $\endgroup$ – Rob Dec 6 '17 at 6:16

You must log in to answer this question.

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