]> git.lyx.org Git - lyx.git/blob - autotests/export/docbook/Linguistics_forest.xml
ctests: add test cases for DocBook
[lyx.git] / autotests / export / docbook / Linguistics_forest.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- This DocBook file was created by LyX 2.4.0dev
3   See https://www.lyx.org/ for more information -->
4 <article xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.2">
5 <info>
6 <title>Writing linguistic papers</title>
7 <author>
8 <personname>Jürgen Spitzmülle</personname>
9 </author>
10 </info>
11 <section>
12 <title>Linguistic structure trees</title>
13 <para>Here is a simple example:</para>
14 <mediaobject>
15 <imageobject>
16 <imagedata fileref='lyx_waUJAzFwGUKDEN7MJCcs6gYNMbJuYBkgsRTDTpIvs.png' />
17 </imageobject>
18 <textobject>
19 <programlisting language='latex' role='forest'>[VP [DP[John]] [V' [V[sent]] [DP[Mary]] [DP[D[a]][NP[letter]]] ] ]</programlisting>
20 </textobject>
21 </mediaobject>
22 <para>If you view the PDF output, you will see that the input</para>
23 <blockquote>
24 <para><code><emphasis role='size_small'>[VP [DP[John]] [V' [V[sent]] [DP[Mary]] [DP[D[a]][NP[letter]]]]]</emphasis></code></para>
25 </blockquote>
26 <para>expands to a real structure tree. To view the result within the work area, you can simply embed the Structure Tree inset into a Preview inset. If instant preview is correctly installed and activated, you should see the tree immediately (just click on the image in order to edit):</para>
27 <para><mediaobject>
28 <imageobject>
29 <imagedata fileref='lyx_Neo86S96tfZZQHjpBg7ADIb30ZP0DTrDTR1DEIL6dM.png' />
30 </imageobject>
31 <textobject>
32 <programlisting language='latex' role='forest'>[VP [DP[Mary]] [V' [V[sent]] [DP[John]] [DP[D[a]][NP[response]]] ] ]</programlisting>
33 </textobject>
34 </mediaobject></para>
35 <para>Roofs can be easily generated by means of the <code>roof</code> option (note that the comma has special meaning, as it marks options):</para>
36 <mediaobject>
37 <imageobject>
38 <imagedata fileref='lyx_Evmv0h17wY4EoBIBFZjUQJMv0cyWz6KodzrzPiY1tQ.png' />
39 </imageobject>
40 <textobject>
41 <programlisting language='latex' role='forest'>[VP [DP[John]] [V' [V[sent]] [DP[Mary]] [DP[another letter, roof]] ] ]</programlisting>
42 </textobject>
43 </mediaobject>
44 <para>In order to align nodes of the tree more elegantly, use the &#8220;tier&#8221; option. All nodes which have the same <code>tier</code> allocated get aligned. Here is an example:</para>
45 <mediaobject>
46 <imageobject>
47 <imagedata fileref='lyx_EafAhhREpvwrFIFUHprlnoS9qCdR7kk23QfWTsObCjg.png' />
48 </imageobject>
49 <textobject>
50 <programlisting language='latex' role='forest'>[VP [DP[John,tier=word]] [V' [V[sent,tier=word]] [DP[Mary,tier=word]] [DP[D[a,tier=word]][NP[letter,tier=word]]] ] ]</programlisting>
51 </textobject>
52 </mediaobject>
53 <para>The package supports many additional features, such as movement arrows and decorations, that cannot documented here.</para>
54 </section>
55 </article>