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}
2

2 Answers 2

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.

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

5
  • Works as a charm! Jul 14, 2020 at 16:20
  • Thank you so much! This looks perfect, but when I tried it it didn't end up looking like yours, it looks like this: imgur.com/a/LeVECgg Jul 15, 2020 at 9:12
  • Which compiler did you use?
    – Bernard
    Jul 15, 2020 at 9:15
  • I'm using Overleaf Jul 15, 2020 at 10:05
  • 1
    pdflatex cannot make the computations required by postscript. So either you compile in the traditional way: latex -> dvips -> pstopdf or you compile with xelatex.
    – Bernard
    Jul 15, 2020 at 10:08

You must log in to answer this question.

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