How can I write down that line from horizontal, then vertical and with an arrow pointing at argument 2?
Asked
Active
Viewed 446 times
3 Answers
9
For an explanation of the \tikznode command see
my answer to "How to add arrow in equations and matrix?".
\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}
gernot
- 49,614
5
Another solution, based on an enumerate environment, the eqparbox package and 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}
Bernard
- 271,350
0
\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}
F. Pantigny
- 40,250




\A\impl(A\cdot B)\). Is there a way to do this, if not automatically, then at least without guessing and doing quick and dirty trial-and-error? (Please let me know if my comment doesn't make sense.) – Noah J Jun 16 '23 at 11:26tabularenvironment, as this makes the code a bit simpler, but you can also use anarray, but then may need\textfrom themathtoolspackage. – gernot Jun 16 '23 at 17:10\newcounter{lineno} % as in ``line number''\newcommand{\copiproof}[1]{\begin{center}\begin{tabular}{rll}\setcounter{lineno}{0}#1\end{tabular}\end{center}} % after Irving Copi\newcommand{\premise}[1]{\addtocounter{lineno}{1}\thelineno. & $#1$\\}Do I have your permission to write a Q&A style question so that I can give all of the definitions, if I credit you?
– Noah J Jun 18 '23 at 16:29