1

I am using the description environment of the enumitem package. I want to draw a long vertical line between the labels and the items. For instance, the result would be like

enter image description here

This example is drawn by using the tabularx package, which is not quite convenient for this use. The code is

\documentclass{article}

\usepackage{tabularx}

\newcommand{\prol}{\textsf{PL}}
\newcommand{\fol}{\textsf{FOL}}
\newcommand{\wff}{\textsf{wff}}
\newcommand{\ltrue}{\textsf{T}}
\newcommand{\lfalse}{\textsf{F}}

\begin{document}

\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{r|X}
Sentence & A sentence (also closed formula or ground formula) in logic refer to a declarative sentence that is either \ltrue{} or \lfalse{}. In \prol{}, 1) an atomic sentence have multiple constants and a single predicate; and 2) a compound sentence is formed by multiple atomic sentences combined by truth-functional connectives. In \fol{}, a sentence is a \wff{} with no free variables. A sentence can be viewed as expressing a proposition, something that must be \ltrue{} or \lfalse{}. The restriction of having no free variables is needed to make sure that sentences can have concrete, fixed truth values. An atomic sentence is a sentence that has two or more logical subjects (constants) and a single predicate.\\

Claim & = Proposition\\

Proposition & A proposition is a particular kind of declarative sentence that affirms or denies a predicate of a subject. A proposition is either \ltrue{} or \lfalse{}.
\end{tabularx}

\end{document}

The line must persist on page change. I could not find a built-in function related to this in the user manual.

2

1 Answer 1

2

With tikzmark:

\documentclass{article}
\usepackage{enumitem}
\usepackage{tikZ}
\usetikzlibrary{tikzmark}

\newcommand{\prol}{\textsf{PL}}
\newcommand{\fol}{\textsf{FOL}}
\newcommand{\wff}{\textsf{wff}}
\newcommand{\ltrue}{\textsf{T}}
\newcommand{\lfalse}{\textsf{F}}

\begin{document}
    \begin{description}[align=right, labelsep=2em, leftmargin=\labelsep]
\item[Sentence] 
    \tikzmarknode{A}{A} sentence (also closed formula or ground formula) in logic refer to a declarative sentence  that is either \ltrue{} or \lfalse{}. In \prol{}, 1) an atomic sentence have multiple  constants and a single predicate; and 2) a compound sentence is formed by multiple atomic  sentences combined by truth-functional connectives. In \fol{}, a sentence is a \wff{} with no free variables. A sentence can be viewed as expressing a proposition, something that must be \ltrue{} or \lfalse{}. The restriction of having no free variables is needed to make sure that sentences can have concrete, fixed truth values. An atomic sentence is a sentence that has two or more logical subjects (constants) and a single predicate.

\item[Claim]
    = Proposition

\item[Proposition]
    A proposition is a particular kind of declarative sentence that affirms or denies a predicate of a subject. A proposition is either \ltrue{} or \tikzmarknode{B}{\lfalse{}}.
\begin{tikzpicture}[overlay,remember picture,
                        ]
\draw[transform canvas={xshift=-1em}] (A.north west) -- (A.west |- B.south);
\end{tikzpicture}
    \end{description}
\end{document}

After (at least) two compilation you will get:

enter image description here

3
  • Thank you. It seems it is hard to make a new environment for this.
    – Hermis14
    Commented Oct 12, 2021 at 5:33
  • @Hermis14, oh, it is not so hard, if you have some overview of tikz package possibilities :-). Or simple ask here ;-)
    – Zarko
    Commented Oct 12, 2021 at 5:44
  • Is it possible to make a more general environment using newenvironment? I mean, it seems that tikzmarknode has to be placed inside the item text, which makes it impossible to make a good environment; it is possible, but the environment structure might probably look complicated due to required arguments.
    – Hermis14
    Commented Oct 12, 2021 at 14:22

You must log in to answer this question.

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