2

I'm looking for ways to visually signify the links between turns in a transcript and found this which I think is a brilliant way to do it in a book by Erving Goffman.

Transcript from Erving Goffman - Forms of talk

Is there any way to replicate this on LaTeX in a consistent way over a large corpus?

3
  • Welcome to tex.sx. May 31 at 16:07
  • Not exactly what you're looking for but see also Interlinear glosses with overlaps, line numbers, and speaker labels
    – Alan Munn
    May 31 at 18:01
  • But really you haven't given enough information to know what you you want. Recreating this particular image isn't very hard, but making something that is semi-automatic and/or usable for as you say a "large corpus" would require some more ideas about what the input data would look like.
    – Alan Munn
    May 31 at 18:05

2 Answers 2

8

Here's an example using the movement-arrows package which provides a \mkword macro to mark text and give it a node name. Then I've created a \link macro which links the speaker labels. I've made the text itself a tabular.

\spkr{<name>}{<subscript>}

The \spkr macro defined here takes two arguments. The second argument is the subscript, and the first argument is the text. Underlyingly this uses the \mkword macro and creates a referrable node composed of the name and the subscript number. The name cannot contain any markup; if you need that, you will need to use the \mkword macro directly.

\link[depth]{<node 1>}{<node 2>}

The \link macro links two nodes previously defined with \spkr (or \mkword) and links them with a depth of <depth>.

The \maxlink length is an adjustment factor so that the links don't bleed into the left margin.

This solution still requires quite a bit of manual formatting. So for small examples it works quite well, but automating it would require quite a bit more work.

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{movement-arrows}
\newlength{\maxlink}
\setlength{\maxlink}{2em}% extra space for links
\newcommand\spkr[2]{\mkword[#1#2]{#1\sb#2}}
\newcommand\link[3][1em]{\tikz[overlay,remember picture]{\draw(#2.west)  -|-[distance=-#1] (#3.west);}}
\usepackage{tabularx}
\usepackage{array}
\newcolumntype{s}{@{}>{\hspace{\maxlink}}r}
\newcolumntype{t}{>{: ``}X<{''}}
\let\sb\textsubscript
\begin{document}

\begin{tabularx}{\linewidth}{slt}
\spkr{A}{1} & to trainman in station & Have you got the time? \\
\spkr{B}{2} & & Standard or Daylight Savings?\\
\spkr{A}{3} & & What are you running on?\\
\spkr{B}{3} & & Standard.\\
\spkr{A}{2} & & Standard then.\\
\spkr{B}{1} & & It's five o'clock.
\end{tabularx}
\link[3em]{A1}{B1}
\link[2em]{A2}{B2}
\link[1em]{A3}{B3}

\end{document}

output of code

1
  • 2
    +1 Nice package
    – MS-SPO
    May 31 at 20:13
3

With tikzmarkand ext.paths.ortho libraries. For final result you need to compile MWE at least three times:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{ext.paths.ortho,    % -|- and |-| path operations
                tikzmark}
\usepackage{tabularray}

\begin{document}

\hfil\begin{tblr}{colspec = {Q[l, mode=math] c Q[l, preto={:\ "}, appto={"}]},
                   colsep  = 4pt }
\tikzmarknode{a1}{A_1} & to trainman in station & Have you got the time? \\
\tikzmarknode{b1}{B_2} &                        & Standard or Daylight Savings?\\
\tikzmarknode{c1}{A_3} &                        & What are you running on?\\
\tikzmarknode{c2}{B_3} &                        & Standard.\\
\tikzmarknode{b2}{A_2} &                        & Standard then.\\
\tikzmarknode{a2}{B_1} &                        & It's five o'clock.
    \end{tblr}
    
    \begin{tikzpicture}[overlay,remember picture]
\draw   (a1.west) -|- [distance=-7mm] (a2);
\draw   (b1.west) -|- [distance=-5mm] (b2);
\draw   (c1.west) -|- [distance=-3mm] (c2);
    \end{tikzpicture}
    
\end{document}

enter image description here

8
  • This is my solution... :)
    – Alan Munn
    May 31 at 21:19
  • @AlanMunn, what you mean with "my solution"?
    – Zarko
    May 31 at 21:23
  • My answer uses almost all of the same ingredients just wrapped at little more.
    – Alan Munn
    May 31 at 21:25
  • @AlanMunn, well, concept is very similar, but used are different (alternative?) tools (libraries, packages). I just try to show their possibilities. BTW, I was not able to test your solution since I can't find your package, It is unknown to MiKTeX installation.
    – Zarko
    May 31 at 21:35
  • 1
    @AlanMunn, thank you very much! I wonder, why my search on CTAN doesn't give me this link . Strange. But, now I have your package and I will test it in near future (in my time zone is midnight, so time to sleep ...)
    – Zarko
    May 31 at 21:53

You must log in to answer this question.

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