Example: quiz answers

Qtree, a LATEX tree-drawing package1

qtree , a LATEX tree -drawing package1 Jeffrey Mark Siskind ( tree drawing and core package)Alexis Dimitriadis (parser and extensions)Version , 12 December 20081 OverviewTheQtreepackage consists of QobiTree, a package of tree -drawing macroswritten by Jeff Siskind, and a front end that allows trees to be specifiedin bracket notation, using whitespace to separate tokens. tree nodes canhave labels of any size or complexity, and are automatically arranged on thepage, usually with quite good results. Provisions exist for fine-tuning thedefault layout.

\Tree [.S when [ the cat ].NP sleeps ] To help keep braces matched when editing large trees, the front end allows the option of writing a label after both the left and the right bracket of the same node, as shown for the node NP below. In this case the two labels provided must be identical, token for token. \Tree [.S when [.NP the cat ].NP ...

Tags:

  Tree, Drawings, Latex, Qtree, A latex tree drawing package1, Package1

Information

Domain:

Source:

Link to this page:

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

Other abuse

Advertisement

Transcription of Qtree, a LATEX tree-drawing package1

1 qtree , a LATEX tree -drawing package1 Jeffrey Mark Siskind ( tree drawing and core package)Alexis Dimitriadis (parser and extensions)Version , 12 December 20081 OverviewTheQtreepackage consists of QobiTree, a package of tree -drawing macroswritten by Jeff Siskind, and a front end that allows trees to be specifiedin bracket notation, using whitespace to separate tokens. tree nodes canhave labels of any size or complexity, and are automatically arranged on thepage, usually with quite good results. Provisions exist for fine-tuning thedefault layout.

2 The front end also centers trees (by default) and providessome other nice simple tree may look like this,\ tree [.S This [.VP [.V is ] \qroof{a simple tree }.NP ] ]which produces:SThisVPVisNPa simple treeThe node labels in trees may be quite complicated; they may contain fontchanges and math-mode text, line breaks introduced with\\(which pro-duce centered lines), etc. The trees produced are constrained to a maximumdepth of 20 levels, with a maximum of five branches at any one adjusts for the width and height of tree labels, and is prettygood at arranging nodes on the are defined using a version of the bracket notation familiar to lin-guists.

3 tree elements are delimited by white space; braces can be used toenclose multi-word not rely on\catcodechanges forits operation, allowing trees to be included in footnotes and other mov-ing environments without problems. (But see the discussion of\automathbelow).Thanks to recent improvements in LATEX s support for PDF,qtreecan nowproduce good-looking graphics for both DVI/PostScript and PDF default,qtreewill load the , which improves the na-tive picture-drawing facilities of LATEX and transparently supports both1 Thanks to Jeff Siskind for permission to distribute the QobiTree code.

4 Please directcomments to Alexis Dimitriadis and PDF version of qtree also provides hooks forcustomization, and contains many small enhancements and corrections ofminor of the new features were inspired by questions or requests fromqtreeusers. Thank you all for your contributions toqtree, and keep them coming! New features1. Full PDF and PostScript support This package,which extends the limited capabilities of the standardpictureenvi-ronment, was planned long ago by the LATEX developers but has onlyrecently been released.

5 It provides enhanced drawing quality for bothDVI and PDF Customization hooks allow easy adjustments to the default style ofleaf and branch labels, and to a number of other aspects of Extraneous whitespace around trees has been Reorganized and rewritten code is easier to customize (with a mod-erate amount of LATEX hacking skills).5. The documentation has been extended and reorganized. An FAQ sec-tion has been added with explanations of various frequently Several functions have been added, including a balancing commandthat will produce trees with more evenly sized now (finally) available on Home pageTheqtreehome page is at: versions , which does not work with PDF.

6 You canstill useqtreewitheepicif you wish; see section New features .. Home page .. 22 Package options .. Customization parameters .. 43 Basic tree syntax .. Label matching .. Roofs .. Branching without labels .. Subscripts, superscripts and primes .. Customizing text appearance .. Escaping the parser .. Adjusting inter-node spacing .. Balanced trees .. 94 Using How to convert a tree to brackets .. Placing trees on the page .. 105 Advanced Putting a frame around part of a tree .

7 Embedding one tree in another .. Overriding branch drawing .. Visualising tree construction .. The low-level interface .. 146 How do I .. ? (The qtree FAQ)157 Troubleshooting1632 a LATEX package. It should be installed in a directory of stylefiles, and included with the LATEX 2 command\usepackage{ qtree }. Package optionsHorizontally center trees on the line. This is the default behavior. (See[center]also the commands\qtreecentertrueand\qtreecenterf alse, below).Do not center trees. Trees are positioned on the page like ordinary text,[nocenter]and can be manually aligned to the left or right (or centered).

8 Suppress automatic loading of the graphics extensions [noload]Pict2esupports both PostScript and PDF graphics, but automatic loadingcan be inhibited if it causes problems, or if you want to pass your ownoptions versions the graphics enhancement library;if you want to use it instead ofpict2e, invokeqtreewith the package option[noload]and (using\usepackage{eepic}). Customization parametersTrees are horizontally centered on the line by default, but you can turn\qtreecentertrue\qtreecenterfalsecen tering on and off at any point with these commands.

9 They obey theusual scoping rules; if used inside anenumerateenvironment, for example,their effect will only last until the end of that environment. (See also the[(no)center]package options).Length parametersThe following macros can be redefined to customizevarious aspects of tree construction. (Note that they are allmacros,notcounters).The amount of whitespace inserted around labels and leaf nodes as the\qtreepaddingtree is built. The default is the value of the LATEX parameter\tabcolsep(usually set to6pt). It is safe to change the value of this macro for differenttrees, but modifying it in the middle of a tree could lead to somewhatstrange amount of whitespace inserted around text placed under a roof; that\qroofpaddingis, the width of the eaves of the roof that extend beyond the text.

10 Thedefault height of the line connecting the labels of non-branching nodes to their\qtreeunaryhtleaves. The default hooksThe following macros are empty by default, butthey can be defined to customize the appearance of labels and leaves. Theycan safely change font styles etc., since they are invoked inside at the beginning of each tree , before processing begins. It can be\qtreeinithookused for definitions or modifications of commands that should only be ineffect during tree construction. (For example, to use the\smallfont sizefor all trees).


Related search queries