TeX - LaTeX Asked by BrainFRZ on June 30, 2021
I’m working on a logic assignment, and I’m supposed to use LaTeX. In the assignments, I often need to be able to write something like what’s below. I know how to do the table it’s showing, but not bars, especially when there are in-lined proofs. Also, what would I do if there were multiple premises? Thanks for your help!
Inside the provided myproof
environment, use z
for a vertical bar, z*
for the vertical bar with the horizontal foot. The optional argument to myproof
provides the indentation for reason
.
Because I redefine par
in the environment, you must use exactly one blank line between proof steps.
documentclass{article}
usepackage{tabto}
defzz{1.8dimexpr}
makeatletter
newcommandz{@ifstar{zstar}{znostar}}
makeatother
newcommandzstar{makebox[1em][l]{%
smash{rule[-dimexpr2pt+zzdpstrutbox]{.5pt}{zzbaselineskip}%
rlap{rule[-zz.9dpstrutbox]{14pt}{.5pt}}}}ignorespaces}
newcommandznostar{makebox[1em][l]{%
smash{rule[-dimexpr2pt+zzdpstrutbox]{.5pt}{zzbaselineskip}}}%
ignorespaces}
letsvparpar
newcounter{proofline}
newenvironment{myproof}[1][1.8in]{%
setcounter{proofline}{0}%
parskip0.8baselineskip
defreason{tabto{#1}}%
defpar{stepcounter{proofline}%
svparnoindentmakebox[1.5em][l]{theproofline}}%
parignorespaces
}
{letparsvpar
parnoindent
ignorespacesafterend
}
begin{document}
noindent Before
begin{myproof}
z* $(Prightarrow(Qwedge R))$ reason Premise
zz* $P$ reason Assumption
zz $(Qwedge R)$ reason 1,2 $rightarrow$E
zz $R$ reason 3 $wedge$E
z $(Prightarrow R)$ reason 2-4 $rightarrow$I
end{myproof}
After
noindent parskip was restored
end{document}
Answered by Steven B. Segletes on June 30, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP