2

I want to use Latex to create this:

enter image description here

My attempts so far ended up with:

\documentclass{book}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}
\begin{align*}
p \to q\\
p\\
\over \therefore q
\end{align*}
\end{document}

which resulted in:

enter image description here

having different justification, especially I like to put the \therefore symbol at the very beginning like what I showed first.

2
  • Off-topic & just curiosity: what does the horizontal line mean? In every system I'm familiar with, it has meant 'therefore', but presumably it means something different here as you wouldn't want it twice?
    – cfr
    Nov 23, 2019 at 22:06
  • If this is part of a system, it would be better to identify a package suitable for that system and then see if it supports typesetting this (whether it is a proof, an inference rule or whatever). That will get you more consistency between rules, proofs, keys and so on.
    – cfr
    Nov 23, 2019 at 22:09

2 Answers 2

4

A simple way is to use the array environment, with two cells per row, namely

\[
\begin{array}{rl}
  & p\rightarrow q\\
  & p\\
  \cline{2-2}
\therefore & q  
\end{array}
\]  
1
  • 1
    Dear Guido, I appreciate your excellent answer!
    – Aria
    Nov 23, 2019 at 22:36
1

The alignment points are marked with an &. If there are several groups (columns of alignments), a further & is used to introduce each new group (except the first group), so that n columns of alignment require 2n-1 ampersands. enter image description here

     \documentclass{book}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{align*}
&p\to q\\
&p\\
&\over\therefore \quad {}q
\end{align*}
\end{document}

You must log in to answer this question.

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