Example: barber

Tree drawing and LaTeX Tutorial

Tree drawing and LaTeX TutorialTree drawing and LaTeX TutorialLING 253: Syntax I sectionSabina MatyikuYale UniversitySeptember 19, 20121 / 44 Tree drawing and LaTeX Tutorial1 drawing Syntactic TreesphpSyntaxTreeLATEX PreviewerTreeForm2 introduction to LATEX3 LaTeX in LinguisticsDrawing syntactic treesIPA fontsDefining your own commandsBracketed DiagramsGlossesPhrase Structure RulesCross-referencingInserting graphicsGraphics2 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesDrawing Syntactic TreesWe begin by looking at two online applications and oneprogram you can download before learning how to use will look at:phpSyntaxTreeLATEX PreviewerTreeForm3 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesphpSyntaxTreephpSyntaxTreephpSyntax Tree code:[TP [NP [D The] [N students]] [T] [VP [V loved][NP [D their][AdjP [Adj syntax]] [N assignments]]]]Output:5 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesphpSyntaxTreephpSyntaxTreeAdvantage s

Tree drawing and LATEX Tutorial Introduction to LATEX Emphasizing ntextit{}italics, used for foreign words, species names etc: Staph. aureus ntextsl{} slanted nemph{}used for emphasizing: this is not the case ntextsc{}small caps, used for names of persons: Neil Armstrong was the first man on the moon. ntextbf{}bold face: used to make something ...

Tags:

  Introduction, Drawings, Latex

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Tree drawing and LaTeX Tutorial

1 Tree drawing and LaTeX TutorialTree drawing and LaTeX TutorialLING 253: Syntax I sectionSabina MatyikuYale UniversitySeptember 19, 20121 / 44 Tree drawing and LaTeX Tutorial1 drawing Syntactic TreesphpSyntaxTreeLATEX PreviewerTreeForm2 introduction to LATEX3 LaTeX in LinguisticsDrawing syntactic treesIPA fontsDefining your own commandsBracketed DiagramsGlossesPhrase Structure RulesCross-referencingInserting graphicsGraphics2 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesDrawing Syntactic TreesWe begin by looking at two online applications and oneprogram you can download before learning how to use will look at:phpSyntaxTreeLATEX PreviewerTreeForm3 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesphpSyntaxTreephpSyntaxTreephpSyntax Tree code:[TP [NP [D The] [N students]] [T] [VP [V loved][NP [D their][AdjP [Adj syntax]] [N assignments]]]]Output:5 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesphpSyntaxTreephpSyntaxTreeAdvantage s:Online, nothing to downloadMakes trees out of bracketed diagramsAllows you to download the result and insert the imagein a documentDisadvantage.

2 If you need to make a change to your tree, you need towrite the code over unless you save it somewhere else6 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesLATEX PreviewerLATEX / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesLATEX PreviewerLATEX PreviewerLATEX Previewer code:\Tree [.TP [.NP [.D The ] [.N students ]] [.T ] [.VP [.V loved ][.NP [.D their ] [.AdjP [.Adj syntax ]] [.N assignments ]]]]Output:TPNPDTheNstudentsTVPV lovedNPDtheirAdjPAdjsyntaxNassignments8 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesLATEX PreviewerLATEX PreviewerSame advantages and disadvantages as phpSyntaxTree, andin addition, LaTeX Previewer makes nicer trees and allows youto download in various formats.

3 But LaTeX Previewer is fussierabout how the bracketed diagrams are structured:There must be a dot preceding the non-terminal and rootnode labels\Tree [NP [.D The ] [.N students ]]NPDTheNstudentsThere must be a space between a terminal node and the closingbracket]otherwise it does not compile:\Tree [.NP [.D The ] [.N students]] LaTeX Error: \begin{tabular} on input line 6 ended by\end{document}.9 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesLATEX PreviewerLATEX PreviewerThere is also a step before you can start making thediagrams. You need to click on the Packages button at thebottom, select qtree from the left-hand column and add itto the right-hand column:10 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic : ~ / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesTreeFormTreeFormNo coding required!

4 Output:12 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesTreeFormTreeFormAdvantages:Allows you to drag and drop nodes to construct your treeYou can save your file so you can go back to it later if youneed to make any changesYou can download the result and insert the image in adocumentDisadvantage:You need to download it, but it s only MB13 / 44 Tree drawing and LaTeX TutorialDrawing Syntactic TreesTreeFormNext up!Aren t LaTeX Previewer trees the prettiest? Don t you wishthere was a simple way to generate multiple trees and tokeep track of the code that generated them?Of course you do! LaTeX will allow you to generate all trees using just onedocument. If you need to make any changes to any trees, allyou have to do is go back to your document!

5 14 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXLATEXLATEX is based on the idea that authors should be able tofocus on the meaning of what they are writingwithout being distracted by the visual presentation of theinformation. In preparing a LaTeX document,the authorspecifies the logical structureusing familiar conceptssuch aschapter,section,table,figure, etc., and lets theLATEX system worry about the presentation of therefore encourages the separation of layout fromcontent while still allowing manual typesettingadjustments where / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXS tructure of a LaTeX document\documentclass[11pt]{article}\us epackage{some_package}\author{}\title{}\ date{}\begin{document}\ \end{document}16 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXC lass optionsDocuments can bearticles,books,reports, classes all take the options, for example.

6 Font size 10pt | 11pt | size a4paper | article | amsartcolumns onecolumn | twocolumn17 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXI nput charactersSome characters have special meaning in TEX, if you needthem they have to be entered as TEX-commands:\start command\textbackslashnote:\\= newline$toggle math modus\$&tabulator\&#\#~\textasciitilde|v ert. lines in table\textbar_start subscript\_^start superscript\textasciicircum{ } command delimiter\{ \}[]command delimiter$[ ]$ quotation marks 18 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXS ectioning commands\section{}\subsection{}\subsubse ction{}\paragraph{}19 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXE nvironmentsEverything that falls betweenbeginandend;Examples:\begin{itemi ze}.

7 \end{itemize}\begin{enumerate} ..\end{enumerate}\begin{tabular} ..\end{tabular}20 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXE mphasizing\textit{} italics, used for foreign words, species namesetc:Staph. aureus\textsl{}slanted\emph{} used for emphasizing: this isnot the case\textsc{} small caps, used for names of persons: NeilArmstrong was the first man on the moon.\textbf{} bold face: used to make something reallystickout.\textsf{} sans serif, often used as base font on slides.\texttt{} typewriter, used for computer related materiallike code or URLs: : Slides use sanserif font: No small caps, slanted insteadof italics!21 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXFont sizes\tinymicroscopic font\scriptsizevery tiny font (subscripts)\footnotesizetiny font (footnotes)\smallsmall font\normalsizenormal font\largelarge font\Largelarger font\LARGE very large font\hugehuge font\Hugevery huge fontNote: not a command:{\small foo bar}22 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXS imple listsPlease believe me:Few swallows can turn winter into it s colder than in the the morning it noon he the evening she nonsense must find an believe me:\begin{itemize}\item Few swallows can turn winter into summer.

8 \item Inside it s colder than in the night.\begin{itemize}\item In the morning it pulls.\item At noon he pushes.\item In the evening she goes.\end{itemize}\item Every nonsense must find an end.\end{itemize}23 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXD escriptive listsThree animals you should know about are:gnat: A small animal, found in the North Woods, thatcauses no end of : A large animal, found in crossword puzzles, thatcauses no end of : A medium-sized animal, named after amedium-sized Texas city which causes no end oftrouble.\begin{description}\item[gnat: ] A small animal, found in the NorthWoods, that causes no end of trouble.\item[gnu:] A large animal, found in crosswordpuzzles, that causes no end of trouble.

9 \item[armadillo:] A medium-sized animal, namedafter a medium-sized Texas city which causesno end of trouble.\end{description}24 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXE numerated listsThese are the main points:1first item2second item3third item1first sub-item2second sub-itemThese are the main points:\begin{enumerate}\item first item\item second item\item third item\begin{enumerate}\item first sub-item\item second sub-item\end{enumerate}\end{enumerate}25 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXThe enumerate packageRequires\usepackage{enumerate}in the preamble(a) first item(b) second item(c) third item(i) first sub-item(ii) second sub-item\begin{enumerate}[(a)]\item first item\item second item\item third item\begin{enumerate}[(i)]

10 ]\item first sub-item\item second sub-item\end{enumerate}\end{enumerate}26 / 44 Tree drawing and LaTeX TutorialIntroduction to LATEXC entering textInthemiddle I don tfeelso marginalized\begin{center}In\\the\\middl e I don t\\feel\\so marginalized\\\end{center}27 / 44 Tree drawing and LaTeX TutorialLATEX in LinguisticsWhy are linguists excited about it?Typesetting trees and glosses can be painful;Aligning these graphics and matrices yourself is quite makes these tasks easier. Let s see / 44 Tree drawing and LaTeX TutorialLATEX in LinguisticsDrawing syntactic treesDrawing Trees using the qtree packageI already gave away most of the story when we looked atLATEX how we had to add a qtree package?


Related search queries