Create Clear, Concise Tree Diagrams in LaTeX for Linguistics | Easy Tutorial

In summary, the conversation discusses using trees as a helpful tool for explaining certain concepts and limitations within code. The idea of nesting branches is also mentioned, and the possibility of using a macro or interface with a website for creating these trees is suggested.
  • #1
honestrosewater
Gold Member
2,142
6
Like so. Can we already do this? Does anyone else want to? I think it would be helpful. For explaining some things, trees are just so much clearer than anything else. What I can do in code seems quite limited.
Code:
        N
        /\
       /  \
     A   -ness
     /\
    /  \
  un-  A
        |
      happy
Some info I found: http://www.essex.ac.uk/linguistics/clmt/latex4ling/trees/
 
Physics news on Phys.org
  • #2
Here's a tedious solution
[tex]
\begin{picture}(400,200)(0,0)
\put(125,200){\makebox(0,15){N}}
\put(125,200){\line(-1,-1){35}}
\put(125,200){\line(1,-1){35}}
\put(75,150){\makebox(0,15){A}}
\put(175,150){\makebox(0,15){-ness}}
\put(75,140){\line(-1,-1){35}}
\put(75,140){\line(1,-1){35}}
\put(25,90){\makebox(0,15){un-}}
\put(125,90){\makebox(0,15){A}}
\linethickness{2pt}
\textcolor{red}{ \put(120,80){\line(0,-1){50}} }
\put(125,10){\makebox(0,15){happy}}
\end{picture}
[/tex]

Here's an attempt to nest the branches
[tex]
\def\BOX#1{\makebox(0,15){#1}}
\begin{picture}(400,200)(0,0)
\put(125,200){\BOX{A}}
\put(125,200){\line(-1,-1){35}}
\put(125,200){\line(1,-1){35}}
\put(75,150){
\put(0,0){\BOX{B}}
\put(0,0){\line(-1,-1){35}}
\put(0,0){\line(1,-1){35}}
\put(50,-50){
\put(0,0){\BOX{C}}
\put(0,0){\line(-1,-1){35}}
\put(0,0){\line(1,-1){35}}
\put(50,-50){
\put(0,0){\BOX{D}}
\put(0,0){\line(-1,-1){35}}
\put(0,0){\line(1,-1){35}}
}
}
}

\end{picture}
[/tex]
...maybe a macro can help.


...along these lines, maybe one can interface with http://www.liafa.jussieu.fr/~gastin/JasTeX/JastexApplet.html (needs \usepackage{gastex} ) or some variation of it.
 
  • #3
Oh, wow, thanks. I'll try that and see if it's easier than it looks.
 

1. What is LaTeX and why is it used for creating tree diagrams?

LaTeX is a typesetting system commonly used in the scientific community for creating documents with complex mathematical equations and symbols. It is particularly useful for creating tree diagrams in linguistics because it allows for precise placement of nodes and labels, as well as easy formatting and customization options.

2. Do I need any special software or knowledge to create tree diagrams in LaTeX?

Yes, you will need to have a LaTeX distribution installed on your computer, such as TeX Live or MiKTeX. You will also need some basic knowledge of LaTeX syntax, but creating tree diagrams in LaTeX is relatively straightforward and can be learned with some practice.

3. How can I add labels to the branches of my tree diagram?

To add labels to the branches of your tree diagram, you can use the "tikz-qtree" package in LaTeX. This package allows you to easily add labels to the branches by using the "\edge" command and specifying the label in curly braces after the branch direction.

4. Can I customize the appearance of my tree diagram in LaTeX?

Yes, LaTeX offers a wide range of customization options for tree diagrams. You can change the color and size of nodes, adjust the spacing between branches, and add additional formatting such as bold or italics to labels. You can also add arrows or other symbols to indicate relationships between nodes.

5. Are there any alternative methods for creating tree diagrams in linguistics?

Yes, there are other software programs and tools that can be used to create tree diagrams, such as Microsoft Word or online diagramming tools. However, LaTeX is a popular choice among linguists due to its precision and flexibility in creating complex tree structures.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
265
  • MATLAB, Maple, Mathematica, LaTeX
Replies
16
Views
3K
  • Programming and Computer Science
Replies
13
Views
4K
  • Programming and Computer Science
Replies
3
Views
2K
  • Programming and Computer Science
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
13K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
5K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Back
Top