0

I am trying to align the bottom part of a "fraction" with the top part, but since I am new to this, I am not sure the right way.

The goal is for the q in the "denominator" to line up with the p's above, and the would end up to the left, and not under the line. Is this possible?

\displaystyle
\frac{
\begin{align*}
&p
\\
&p→q
\end{align*}
}
{\begin{align*}
∴ &q
\end{align*}}

enter image description here

Paul
  • 3
  • 1
    please show a small but complete document, not a fragment we can not test. align* is a top level display that must be started outside math mode and produces the entire display you can not use it inside math. You are possibly looking for aligned or array – David Carlisle Feb 20 '21 at 17:31
  • Take a look at the ebproof package. – projetmbc Feb 20 '21 at 17:47
  • Sorry about that. I am only using this in WordPress with the MathJax plugin, it doesn't let me use the full document syntax. I have never used LaTeX before. – Paul Feb 20 '21 at 17:55

1 Answers1

2

If I understood the desired output this is one way

\documentclass{article}
\usepackage{amssymb}
\begin{document}
\[
\begin{array}{rl}
&p\\
&p \to q \\
\cline{2-2}
\therefore & q
\end{array}
\]
\end{document}

enter image description here

but I believe there are dedicated packages for logical proofs.

campa
  • 31,130