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

  • Context: LaTeX 
  • Thread starter Thread starter honestrosewater
  • Start date Start date
  • Tags Tags
    Diagrams Latex Tree
Click For Summary
SUMMARY

This discussion focuses on creating clear and concise tree diagrams in LaTeX for linguistics applications. Users share code snippets using the LaTeX picture environment to illustrate hierarchical structures, specifically for linguistic trees. The conversation highlights the use of the gastex package for enhanced diagramming capabilities, suggesting it may simplify the process. Participants express a desire for more accessible tools and methods to improve clarity in linguistic presentations.

PREREQUISITES
  • Familiarity with LaTeX typesetting
  • Understanding of linguistic tree structures
  • Basic knowledge of the LaTeX picture environment
  • Experience with LaTeX packages, specifically \usepackage{gastex}
NEXT STEPS
  • Research the gastex package for LaTeX to enhance tree diagram creation
  • Explore advanced LaTeX picture environment techniques for complex diagrams
  • Learn about macros in LaTeX to automate tree diagram generation
  • Investigate online tools and applets for LaTeX diagramming, such as JasTeX
USEFUL FOR

Linguists, educators, and researchers looking to create visually clear and effective tree diagrams in LaTeX for presentations or academic papers.

honestrosewater
Gold Member
Messages
2,133
Reaction score
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
Here's a tedious solution
[tex] \begin{picture}(400,200)(0,0)<br /> \put(125,200){\makebox(0,15){N}}<br /> \put(125,200){\line(-1,-1){35}}<br /> \put(125,200){\line(1,-1){35}}<br /> \put(75,150){\makebox(0,15){A}}<br /> \put(175,150){\makebox(0,15){-ness}}<br /> \put(75,140){\line(-1,-1){35}}<br /> \put(75,140){\line(1,-1){35}}<br /> \put(25,90){\makebox(0,15){un-}}<br /> \put(125,90){\makebox(0,15){A}}<br /> \linethickness{2pt} <br /> \textcolor{red}{ \put(120,80){\line(0,-1){50}} }<br /> \put(125,10){\makebox(0,15){happy}}<br /> \end{picture}[/tex]

Here's an attempt to nest the branches
[tex] \def\BOX#1{\makebox(0,15){#1}}<br /> \begin{picture}(400,200)(0,0)<br /> \put(125,200){\BOX{A}}<br /> \put(125,200){\line(-1,-1){35}}<br /> \put(125,200){\line(1,-1){35}}<br /> \put(75,150){<br /> \put(0,0){\BOX{B}}<br /> \put(0,0){\line(-1,-1){35}}<br /> \put(0,0){\line(1,-1){35}}<br /> \put(50,-50){<br /> \put(0,0){\BOX{C}}<br /> \put(0,0){\line(-1,-1){35}}<br /> \put(0,0){\line(1,-1){35}}<br /> \put(50,-50){<br /> \put(0,0){\BOX{D}}<br /> \put(0,0){\line(-1,-1){35}}<br /> \put(0,0){\line(1,-1){35}}<br /> }<br /> }<br /> }<br /> <br /> \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.
 
Oh, wow, thanks. I'll try that and see if it's easier than it looks.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 13 ·
Replies
13
Views
5K
Replies
1
Views
14K
  • · Replies 1 ·
Replies
1
Views
19K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K