TOTALLY REVISED ANSWER:
Macros available to use:
\startline[indent]
draws the top startline, with optional indent.
\xdiv
vertical line that crosses the startline, as between "puzzles" and "are" in the MWE.
\vdiv
vertical line that does not cross the underline, as between "exercising" and "mind" in the MWE.
\ddiv
diagonal line that does not cross the startline, as between "are" and "games" in the MWE.
\diag[mode]{diag-dimen}{diagtext}{horiz-dimen}{horiz-text}
drops a diagonal that will vertically extend diagdimen\baselineskip
downward, places the diag text over it, then draws a line of length horiz-dimen\baselineskip
and set the horiz-text above it (by default). If the mode is set to [d]
, the horizontal line is dashed and the horiz-text is underset, like the word "yet" in the MWE. If the mode is [b]
, the diagonal is blanked out, as with the word "exercising" in the MWE.
\dropleg[mode]{dimen}{left-aligned underset}
Drops a vertical strut of height dimen\baselineskip
and then sets the final argument to the right of that. If mode
is [d]
, the strut is dashed, as shown below "are" in the MWE.
\entry{dimen}{text}{aftercode}
a self-contained underlined entry, such as "and" in the MWE. The text is centered and underlined by a line of length dimen\baselineskip
, and the aftercode is executed at the right hand end of the underline.
\tstrut{dimen}
the trianglular shape with a vertical strut above, as seen below "exercising" in the MWE. The height of the \tstrut
object is determined by the number dimen
, which is a multiple of \baselineskip
, which should be the difference between the depths of two adjacent \diag
s.
\leftstep
the stair-step thingie that is left-lapped.
Parameters:
\rlwd
rule width; (.5pt) default.
\tlength
the step height and the triangular leg length, both below "exercising" in the MWE; 1.7ex default.
In the MWE, you will note that horizontal space had to be added manually between entries. Also, to create the 2nd line, I left the \dropleg
below "and" dangling, and used \vspace
to shift to the lower position. The argument to \vspace
(16\baselineskip
) was easily ascertained, because the \droplegs
before and after "and" were both of dimen=8. The \tstrut
dimen of 2 is also easily ascertained, since the dimen of the "for" \diag
was 6, while the dimen of "exercising" \diag
was 4, the difference being 2.
To drop a \diag
in the middle of a word, you have two options (both shown in the MWE):
1) split the word around the diag, like newspa\diag{2}{in}{5}{America}pers
, or
2) place the word in a box of smaller width than its actual width, such as \makebox[3ex]{\textcolor{blue}{puzzles}}\diag{4.5}{crossword}{}{}
.
In either case, you will generally follow the word with some \hspace
.
Since I could not create a curved arc, the "Appearing" leg is done with a \dropleg
with a \diag
as the underset code.
\documentclass{article}
\usepackage[usestackEOL]{stackengine}
\usepackage{graphicx,xcolor}
% DASHED LINE OF SPECIFIED LENGTH
% Based on morsburg at http://tex.stackexchange.com/questions/12537/
% how-can-i-make-a-horizontal-dashed-line/12553#12553
\def\dashfill{\cleaders\hbox to .6em{\rule{1ex}{\rlwd}}\hfill}
\newcommand\dashline[1]{\hbox to #1{\dashfill\hfil}}
%%%%%
\def\rlwd{.5pt}
\def\xdiv{\smash{\rule[-.7071\baselineskip]{\rlwd}{1.5\baselineskip}}}
\def\vdiv{\smash{\rule[-.37\baselineskip]{\rlwd}{1.5\baselineskip}}}
\def\ddiv{\smash{\rotatebox{45}{%
\rule[-.55\baselineskip]{\rlwd}{1.74\baselineskip}}}}
\newlength\tmplen
\newlength\tlength
\tlength=1.7ex\relax
\newcommand\tstrut[1]{\smash{\raisebox{-.35\baselineskip}{%
\def\stackalignment{c}\stackon[0pt]{%
\rotatebox{45}{\rule{\tlength}{\rlwd}}\kern-.2ex%
\raisebox{.7071\tlength}{\rotatebox{-45}{\rule{\tlength}{\rlwd}}}%
}{\rule{\rlwd}{\dimexpr #1\baselineskip-.7071\tlength}}}}%
}
\def\leftstep{\smash{\raisebox{\dimexpr-.3\baselineskip-\rlwd}{%
\llap{\rule[\tlength]{\tlength}{\rlwd}\rule{\rlwd}{\tlength}%
\rule{\tlength}{\rlwd}~~}}}%
}
\newcommand\dropleg[3][s]{\unskip\smash{%
\stackunder[\dimexpr-\dp\strutbox-.7071pt]{%
\if d#1%
\raisebox{-\dp\strutbox}{\rotatebox{-90}{\dashline{#2\baselineskip}}}%
\else%
\rule[\dimexpr-\dp\strutbox-.7071pt-#2\baselineskip]{\rlwd}%
{#2\baselineskip}%
\fi}{#3}}\ignorespaces%
}
\newcommand\entry[3]{\smash{\makebox[0pt][l]{\def\stackalignment{c}%
\stackunder[0pt]{\strut#2}{\rule{0#1\baselineskip}{\rlwd}}#3}}%
}
\newcommand\diag[5][s]{\unskip%
\if b#1\def\dcolor{white}\else\def\dcolor{black}\fi%
\tmplen=#2\baselineskip%
\def\stackalignment{l}\def\useanchorwidth{F}%
\smash{\makebox[0pt][l]{%
\raisebox{\dimexpr-\dp\strutbox-.7071pt}{\rotatebox{-45}{%
\stackon[0pt]{\textcolor{\dcolor}{\rule{1.414\tmplen}{\rlwd}}}{%
\makebox[0pt][l]{\makebox[1.414\tmplen][l]{~~~~\strut#3}%
\if d#1%
\rotatebox{45}{%
\smash{%
\kern-.22\baselineskip\raisebox{-.3\baselineskip}{%
\stackunder[0pt]{\dashline{0#4\baselineskip}}{~~\strut#5}}}%
}%
\else%
\rotatebox{45}{%
\kern-1.02\baselineskip\raisebox{.52\baselineskip}{%
\stackon[0pt]{\rule{0#4\baselineskip}{\rlwd}}{~~\strut#5}}}%
\fi%
}}%
}}}}\ignorespaces%
}
\newcommand\startline[1][0in]{\noindent\hspace{#1}%
\rule{\dimexpr\textwidth-#1}{\rlwd}\par%
\vspace{\dimexpr-\baselineskip-\parskip-\dp\strutbox-.7071pt}\par%
\noindent\hspace{#1}%
}
\begin{document}
\scriptsize\startline
~
\dropleg{2}{%
\diag{5}{Appearing}{3}{
\diag{2}{in}{6}{
\diag{3}{most}{}{}
newspa\diag{2}{in}{5}{America}pers
}
}}
\hspace{1cm}
\makebox[3ex]{\textcolor{blue}{puzzles}}
\diag{4.5}{crossword}{}{}
\hspace{1.5cm}\xdiv\hspace{2cm}
\makebox[1ex]{\textcolor{red}{are}}
\dropleg[d]{8}{\entry{4}{and}{\dropleg[d]{8}{}}}
\hspace{.8cm}\ddiv\hspace{0.4cm}
\diag[d]{5}{challenging}{2.8}{yet}
\textcolor{black!50!green}{games}
\diag{5}{exciting}{}{}
\hspace{1cm}
\diag{6}{for}{7}{\tstrut{2}}
\hspace{1cm}
\diag[b]{4}{exercising}{5}{\leftstep\vdiv~mi\diag{1.5}{the}{}{}nd}
\vspace{16\baselineskip}
\startline[1in]
~\textcolor{blue}{they}
\hspace{1cm}\xdiv\hspace{1cm}
\diag{2}{}{8}{\diag{3}{literate}{}{}people\diag{3}{with}{5}{patience}}
\hspace{.6cm}
\textcolor{red}{give}
\hspace{.6cm}
\vdiv
\hspace{.6cm}
\textcolor{black!50!green}{joy}
\hspace{.6cm}
\ddiv
\hspace{.6cm}
exquisite
\end{document}
tikz
or a similar content-agnostic approach is your only option. Unless someone else knows of something more specialised. The trouble is, there isn't really any pattern to the diagram as far as I can tell. Or there is, but it is an irregular and quirky one rather than a standard format.