2

Here is what I would need to do:

enter image description here

My (of course mistaken) attempt:

\documentclass{article}
\usepackage{tikz}
%\usetikzlibrary{positioning}

 \tikzset{
  mynode/.style={fill,circle,inner sep=2pt,outer sep=0pt}
  }

\begin{document}
\begin{tikzpicture}
 \draw[black,thick] (0,0) -- (5,0)
  node[pos=0,mynode,label=above:{\itshape /in/}]{}
  node[pos=0.5,mynode,label=above:{\itshape /z/}, label=below:{
    \draw[->] (0,0) -- (-4,0) node [pos=.5, below] {\itshape phonology}; 
    {\scshape midpoint};
    \draw[->] (0, 0) -- (4, 0) node [pos=.5, below] {\itshape suppletion} } ]{}
  node[pos=1,mynode,label=above:{\itshape go/went}]{};
\end{tikzpicture}
\end{document}
3

Your main issue is that labels should be normal LaTeX code, but you have put tikz code in your label. You can make your code compile by encapsulating the label contents in a tikz environment, but that's probably not what you want (nesting tikz environments is an iffy practice at best).

It is probably better to position the "midpoint" label as an actual node of its own (as you are currently doing "phonology" and "suppletion") so that you can then add the arrows relative to it.

\documentclass[tikz, border=5pt]{standalone}
\usepackage{tikz}
% \usetikzlibrary{positioning}

 \tikzset{
    mynode/.style={fill,circle,inner sep=2pt,outer sep=0pt}
  }

\begin{document}
\begin{tikzpicture}[font=\itshape]
  \draw[thick] (0,0) node[mynode, label=/in/] {}
    -- ++(7,0) node[mynode, label=go/went] {}
    node[pos=.5, mynode, label=/z/] (z) {}
    node[pos=.5, below=3pt] (midpoint) {\scshape midpoint}
    ;
  \draw[->] (midpoint) -- ++(-3,0) node[pos=.5,below] {phonology};
  \draw[->] (midpoint) -- ++( 3,0) node[pos=.5,below] {suppletion};
\end{tikzpicture}
\end{document}

enter image description here

  • Thank you! Is there a way to put this inside a numbering macro like linguex or expex, and add a caption on the bottom? – RobertP. Oct 31 '16 at 16:46
  • You should be able to put it basically anywhere you like. If you are putting it in a line with other text you may want to include the option baseline or baseline=-.5em on the environment (with font=\itshape) to align the main line with the text baseline or midline. By default it will bottom align the image with the text. Also be aware that adding blank lines around the tikzpicture environment will (as usual) induce paragraph breaks. – Emma Oct 31 '16 at 16:52
1

See, if the following solution is acceptable:

\documentclass[ tikz,
                border=3mm]{standalone}
%\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}[
    mynode/.style = {fill,circle,inner sep=2pt,outer sep=0pt,
                     node contents={}},
every node/.style = {font=\itshape}
                    ]
\draw[black,thick] 
    (0,0)   node (a) [mynode,label=/in/] 
      --    node (b) [below] {phonology}
    (5,0)   node (c) [mynode,label=/z/]
            node (d) [below] {midpoint}
      --    node (e) [below] {suppletion} 
    (10,0)  node (f) [mynode,label=go/went]; 
\draw[->] (d) -- (b);
\draw[->] (d) -- (e);
\end{tikzpicture}
\end{document}

enter image description here

Edit: ups, in above answer I overlooked desired form of image ... below is corrected version:

enter image description here

it is obtained by:

\documentclass[ tikz,
                border=3mm]{standalone}

\begin{document}
\begin{tikzpicture}[
    mynode/.style = {fill,circle,inner sep=2pt,outer sep=0pt,
                     node contents={}},
every node/.style = {font=\itshape}
                    ]
\draw[black,thick] 
    (0,0)   node (a) [mynode,label=/in/] 
      --    
    (5,0)   node (b) [mynode,label=/z/]
            node (c) [below] {midpoint}
      --    
    (10,0)  node (d) [mynode,label=go/went]; 
\draw[->] (c) -- node [below] {phonology}   ([xshift= 12mm] c -| a);
\draw[->] (c) -- node [below] {suppletion}  ([xshift=-12mm] c -| d);
\end{tikzpicture}
\end{document}
1

This is just a little variation from Emma's code.

Sometimes it's useful to remind that:

  • it's possible to declare more than one label option: node[label=A, label=below:B, label=...]

  • every label can include special options: node[label={[options valid for this particular label]label position:label text}

  • on of these options is name which assigns a name to an specific label node

Therefore it's possible to write:

node[pos=.5, mynode, label=/z/, 
     label={[name=midpoint]below:midpoint}] (z) {}

which declares a node z with two labels /z/ above (default position) and midpoint below. This second label is named midpoint. After that, label midpoint can be referenced as a regular node named midpoint.

\documentclass[tikz, border=5pt]{standalone}
\usepackage{tikz}

 \tikzset{
    mynode/.style={fill,circle,inner sep=2pt,outer sep=0pt}
  }

\begin{document}
\begin{tikzpicture}[font=\itshape]
  \draw[thick] (0,0) node[mynode, label=/in/] {}
    -- ++(7,0) node[mynode, label=go/went] {}
    node[pos=.5, mynode, label=/z/, label={[name=midpoint]below:midpoint}] (z) {}
    ;
  \draw[->] (midpoint) -- ++(-3,0) node[pos=.5,below] {phonology};
  \draw[->] (midpoint) -- ++( 3,0) node[pos=.5,below] {suppletion};
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.