逻辑条件证明 (cp) 箭头

逻辑条件证明 (cp) 箭头

我怎样才能先水平、然后垂直地写下这条线,并用箭头指向参数 2?

有条件证明

答案1

有关命令的解释,\tikznode请参阅 我对“如何在方程和矩阵中添加箭头?”的回答

在此处输入图片描述

\documentclass{article}
\usepackage{amssymb}% defines \therefore
\let\impl\supset
\usepackage{tikz}
\newcommand\tikznode[3][]{%
  \tikz[remember picture,baseline=(#2.base)]
      \node[minimum size=0pt,inner sep=0pt,#1](#2){#3};%
}
\begin{document}
\begin{center}
  \begin{tabular}{rll}
              1.  & $A\impl B$ \rlap{\quad$/\therefore A\impl (A\cdot B)$}\\
 \tikznode{A}{2.} & $A$                & supuesto \\
              3.  & $B$                & $1$, $2$, M.P.\\
              4.  & $A\cdot B$                        & $2$, $3$, Conj.\\
              5.  & \tikznode{B}{$A\impl(A\cdot B)$\strut} & $2$--$4$, C.P.
   \end{tabular}
\end{center}
\begin{tikzpicture}[remember picture,overlay]
  \draw[stealth-,shorten <=2pt] (A) -- ++(-1.5em,0) |- (B.north east);
\end{tikzpicture}
\end{document}

答案2

另一种解决方案,基于enumerate环境、eqparbox包和pstricks

\documentclass[svgnames]{article}
\usepackage{mathtools,amssymb}
\usepackage{pst-node}
\usepackage{enumitem}
\usepackage{eqparbox}
\newcommand{\eqmathbox}[2][M]{%
\eqmakebox[#1][l]{$\displaystyle#2$}}

\begin{document}

    \begin{enumerate}[wide =2em, labelsep=1em, nosep]
    \item $A\supset B \quad/\therefore A\supset(A\cdot B)$
    \item\pnode[-2em, 0.8ex]{2} \eqmathbox{E} supuesto
    \item \eqmathbox{B} 1, 2, M. P.
    \item \eqmathbox{A\cdot B} 2, 3, Conj.
    \item \eqmathbox{A\supset (A\cdot B)\pnode[-0.75ex, 2.2ex]{A}\quad} 2–4, C. P.
    \ncbar[linecolor=LightSlateGray, linejoin=1, arrows=->, arrowinset=0.12, angle=180]{A}{2}
    \end{enumerate}

\end{document} 

在此处输入图片描述

答案3

\documentclass{article}
\usepackage{amssymb} % for \therefore
\usepackage{nicematrix,tikz}
\usetikzlibrary{arrows.meta,ext.paths.ortho} % for "r-lr"

\begin{document}

\begin{NiceTabular}{rll}
  1.  & $A\supset B$ \rlap{\quad$/\therefore A\supset (A\cdot B)$}\\
  2.  & $A$                  & supuesto \\
  3.  & $B$                  & $1$, $2$, M.P.\\
  4.  & $A\cdot B$               & $2$, $3$, Conj.\\
  5.  & $A\supset(A\cdot B)$     & $2$--$4$, C.P.
\CodeAfter \tikz \draw [<-,shorten < = 2pt] (2-1) r-lr ([yshift=1pt]5-|3);
\end{NiceTabular}

\end{document}

上述代码的输出

相关内容