# Align in a fraction, arbitrary part of denominator with part of the numerator

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*}}


• 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 Feb 20, 2021 at 17:31
• Take a look at the ebproof package. Feb 20, 2021 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, 2021 at 17:55

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}


but I believe there are dedicated packages for logical proofs.

• This is the result I am looking for. It's not working in WordPress MathJax, but thanks for showing how it could be done.
– Paul
Feb 20, 2021 at 17:59
• @Paul Sorry, but MathJax is off-topic on this site. While its syntax is based on TeX's, it is en entirely different thing. Feb 20, 2021 at 18:06
• I understand, thank you
– Paul
Feb 20, 2021 at 18:11
• @Paul MathJax does not support \cline. It might work with \begin{array}{l} p \\ p \to q \\ \hline \llap{\therefore\quad} q \end{array} but as I said this is unfortunately off-topic. Feb 20, 2021 at 18:16
• That does work nicely, thanks again!
– Paul
Feb 20, 2021 at 18:25