垂直线...但不在表格中

垂直线...但不在表格中

我想在文本中添加垂直线,如下所示(蓝线)。您能告诉我怎么做吗?排版结果

这是我的代码:

\documentclass{article}
%load package
\usepackage[utf8]{inputenc}
\usepackage[a4paper, hmargin=1cm, tmargin=1cm, bmargin=2cm]{geometry}
\usepackage{array, amsmath, amssymb, grundgesetze, lipsum}
%set up length

%set up counter

%set up command

%set up environment

\begin{document}
\centering
\begin{tabular}{llr}
\begin{minipage}[t]{4cm}
\large
\vspace{8pt}
1\par
$p$ \hspace{8pt}
\setlength\GGlinewidth{25pt}
\GGconditional
 {\GGquant{x}
  \GGconditional
   {\GGterm{p}}
   {\GGterm{Fx}}
 }
 {\GGconditional
   {\GGterm{p}}
   {\GGquant{x}\GGterm{Fx}}
 }\par\vspace{8pt}
$q$ \hspace{8pt}
\setlength\GGlinewidth{25pt}
 \GGconditional
  {\GGconditional
    {\GGnonot \GGnonot \GGnot \GGterm{p}}
    {\GGnonot \GGnonot \GGnot \GGterm{q}}
  }
  {\GGconditional
    {\GGterm{q}}
    {\GGterm{p}}
  }
\end{minipage}
&
\begin{minipage}[t]{4cm}
\large
\vspace{8pt}
\hspace{4pt}
\setlength\GGlinewidth{25pt}
\GGjudge
\GGconditional
 {\GGconditional
  {\GGterm{p}}
  {\GGconditional
   {\GGterm{q}}
   {\GGterm{r}}
  }
 }
 {\GGconditional
  {\GGconditional
   {\GGterm{p}}{\GGterm{q}}
  }
  {\GGconditional
   {\GGterm{p}}{\GGterm{r}}
  }
 }
\end{minipage}&\\

\begin{minipage}{4cm}
\large
\vspace{8pt}
$(12)$
\end{minipage}
&
\noindent\rule{2.5cm}{1pt}\\

\begin{minipage}[t]{4cm}
\large
\vspace{8pt}
$r$ \hspace{8pt}
\setlength\GGlinewidth{25pt}
\GGconditional
 {\GGterm{p}}
 {\GGconditional
  {\GGterm{q}}
  {\GGnot 
   \GGconditional
   {\GGterm{p}}
   {\GGnot \GGterm{q}}
  }
 }
\end{minipage}
&
\begin{minipage}[t]{4cm}
%\large
\vspace{5pt}
\hspace{8pt}
\setlength\GGlinewidth{25pt}
\GGjudge
\GGconditional
 {\GGterm{p}}
 {\GGterm{p}}
\end{minipage}
&
\begin{minipage}[t]{1cm}
\large
\vspace{20pt}
$(5)$
\end{minipage}
\end{tabular}\\

\end{document}

答案1

tikz这是使用和的一种可能方法tikzmark

\documentclass{article}
%load package
\usepackage[utf8]{inputenc}
\usepackage[a4paper, hmargin=1cm, tmargin=1cm, bmargin=2cm]{geometry}
\usepackage{array, amsmath, amssymb, grundgesetze, lipsum}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
%set up length

%set up counter

%set up command

%set up environment

\begin{document}
\centering
\begin{tabular}{llr}
\begin{minipage}[t]{4cm}
\large
\vspace{8pt}
1\par
$p$ \hspace{8pt}
\tikzmarknode{pft1}{\setlength\GGlinewidth{25pt}
\GGconditional
 {\GGquant{x}
  \GGconditional
   {\GGterm{p}}
   {\GGterm{Fx}}
 }
 {\GGconditional
   {\GGterm{p}}
   {\GGquant{x}\GGterm{Fx}}
 }}\par\vspace{8pt}
$q$ \hspace{8pt}
\setlength\GGlinewidth{25pt}
 \tikzmarknode{pft2}{\GGconditional
  {\GGconditional
    {\GGnonot \GGnonot \GGnot \GGterm{p}}
    {\GGnonot \GGnonot \GGnot \GGterm{q}}
  }
  {\GGconditional
    {\GGterm{q}}
    {\GGterm{p}}
  }}%
\end{minipage}
&
\begin{minipage}[t]{4cm}
\large
\vspace{8pt}
\hspace{4pt}
\setlength\GGlinewidth{25pt}
\GGjudge
\GGconditional
 {\GGconditional
  {\GGterm{p}}
  {\GGconditional
   {\GGterm{q}}
   {\GGterm{r}}
  }
 }
 {\GGconditional
  {\GGconditional
   {\GGterm{p}}{\GGterm{q}}
  }
  {\GGconditional
   {\GGterm{p}}{\GGterm{r}}
  }
 }
\end{minipage}&\\

\begin{minipage}{4cm}
\large
\vspace{8pt}
$(12)$
\end{minipage}
&
\noindent\rule{2.5cm}{1pt}\\

\begin{minipage}[t]{4cm}
\large
\vspace{8pt}
$r$ \hspace{8pt}
\setlength\GGlinewidth{25pt}
 \tikzmarknode{pft3}{\GGconditional
 {\GGterm{p}}
 {\GGconditional
  {\GGterm{q}}
  {\GGnot 
   \GGconditional
   {\GGterm{p}}
   {\GGnot \GGterm{q}}
  }
 }}\begin{tikzpicture}[overlay,remember picture]
  \draw[very thick,blue!80] ([xshift=-1ex]pft1.north west) -- ([xshift=-1ex]pft1.north west|-pft2.south west)
   ([xshift=-1ex]pft1.west|-pft3.north) -- ([xshift=-1ex]pft1.west|-pft3.south);
\end{tikzpicture}%
\end{minipage}
&
\begin{minipage}[t]{4cm}
%\large
\vspace{5pt}
\hspace{8pt}
\setlength\GGlinewidth{25pt}
\GGjudge
\GGconditional
 {\GGterm{p}}
 {\GGterm{p}}
\end{minipage}
&
\begin{minipage}[t]{1cm}
\large
\vspace{20pt}
$(5)$
\end{minipage}
\end{tabular}\\

\end{document}

在此处输入图片描述

相关内容