3

I would like to recreate a structure of the following sort:

enter image description here

I don't care too much about the look of the lines (they don't have to have 90°/rounded angles or those tiny horizontal lines at each end, I simply need to schematize the connection of elements in the text above). The only thing that's important to me is the cross and checkmark in the middle of each line. I have absolutely no idea how to go about this. Do I have to use tikz? Any help is appreciated!

Here is my MEW:

\documentclass{article}
\usepackage{fixltx2e}
\begin{document}
[P [\ldots DP\textsubscript{\textsc{3sg}}\ldots[\ldots DP\textsubscript{\textsc{1sg}}\ldots]]]
\end{document}
  • Related question using tikzmark package: https://tex.stackexchange.com/q/448913 – muzimuzhi Z Jul 14 '20 at 13:18
  • I believe the best method is to use tikzmark : https://ctan.org/pkg/tikzmark . Try to search on this site, and I think you will find that your question has been answered before. – hpekristiansen Jul 14 '20 at 13:53

2 Answers2

7

A tikzmark attempt:

\documentclass{article}
\usepackage{amssymb}
\usepackage{pifont} % for checkmark and crossmark symbols
\usepackage{tikz}
\usetikzlibrary{tikzmark}

\tikzset{ midway mark/.style={pos=0.25, fill=white, inner sep=0pt, font=\scriptsize}, every subnode/.style={inner sep=1pt} }

\begin{document} \begin{tikzpicture}[ remember picture, every subnode/.append style={anchor=south} ] \node {\subnode{beg2}{A}\subnode{beg}{B}CDE\subnode{end}{F}G1234\subnode{end2}56}; \draw (beg) -- ++(0, -10pt) -| node[midway mark] {\ding{51}} (end); \draw (beg2) -- ++(0, -15pt) -| node[midway mark] {\ding{55}} (end2); \end{tikzpicture} \end{document}

enter image description here

Notice: to run with xelatex, you need to apply the patch in https://tex.stackexchange.com/a/339975.

muzimuzhi Z
  • 26,474
5

It is also very easy with the \ncbar command from pst-node:

\documentclass{article}
\usepackage{pst-node}
\usepackage{niceframe, dingbat, bbding}

\begin{document}

[\Rnode{P}{Probe}\textsuperscript{0} [… \Rnode{D1}{DP}\textsubscript{\textsc{3sg}}[…\Rnode{D2}{DP}\textsubscript{\textsc{1sg}}]]] \psset{linewidth=0.5pt, arrows=|-|, angle=-90, nodesep=0.5ex} \ncbar{P}{D1}\ncput{\footnotesize\checkmark} \ncbar[arm =18pt, offsetA = -2pt]{P}{D2}\ncput{\footnotesize\XSolidBrush}

\end{document}

enter image description here

Bernard
  • 271,350