Upside-down syntax trees for linguistics with horizontal lines The Next CEO of Stack...

A Man With a Stainless Steel Endoskeleton (like The Terminator) Fighting Cloaked Aliens Only He Can See

Why does the flight controls check come before arming the autobrake on the A320?

Rotate a column

Why this way of making earth uninhabitable in Interstellar?

Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?

What did we know about the Kessel run before the prequels?

Why isn't the Mueller report being released completely and unredacted?

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

Are police here, aren't itthey?

Where do students learn to solve polynomial equations these days?

What is the value of α and β in a triangle?

How to get from Geneva Airport to Metabief?

Why don't programming languages automatically manage the synchronous/asynchronous problem?

Easy to read palindrome checker

INSERT to a table from a database to other (same SQL Server) using Dynamic SQL

What happened in Rome, when the western empire "fell"?

Would a completely good Muggle be able to use a wand?

Is there a way to save my career from absolute disaster?

How a 64-bit process virtual address space is divided in Linux?

Does Germany produce more waste than the US?

Is wanting to ask what to write an indication that you need to change your story?

Why didn't Khan get resurrected in the Genesis Explosion?

How to install OpenCV on Raspbian Stretch?

Is it my responsibility to learn a new technology in my own time my employer wants to implement?



Upside-down syntax trees for linguistics with horizontal lines



The Next CEO of Stack OverflowAdding words centered above other words with TikZHighlighting text through stacked colored underlinesArcs in linguistic functional structure (LFG)Aligning multiple TikZ trees with other nodesTikZ trees grow right typesets things “upside down”Making mixed trees with and without text-containing nodesTrees with nodes consisting of multiple linesTrees with only leaves in TikZUpside-down trees in forestwiggly lines in syntactic treesUsing native Tikz tree or forest?TikZ: path-style syntax upside-down tree for adpositional grammarstrees with straight spines, and not too much vertical space?












8















I know that syntax analysis can be done in Latex using using TikZ, but the tree-structure that produces isn't really used in my country. Here, we mostly use straight lines instead of hierarchy trees.



Here's an example what I want to achieve. I don't know where to start from.



Is there any (more or less) easy way to do it? Any idea?



enter image description here





Edit:



Even though all solutions provided until the moment are right, it would be nice to modify the following characteristics of the different diagrams you've proposed:




  • The sentence that is being analysed ("La novela que me ha regalado mi hermana...") should be on top of the graphic and all words must be in the same line; "la" can't be immediately over "Det" and "está" shouldn't be immediately over "N/V".


  • All the syntax functions of the differents words ("OP", "S/SN", "PN/SV", "Det"...) should be centered with the respective lines they have above (or at least near to the center but without having to change manually the spacing).


  • It should be possible to modify the height of the diagram.











share|improve this question




















  • 1





    Could you please supply some code? I realise you don't know how to draw the diagram but at least provide the document framework and the text which needs to go into the diagram. This makes it a lot easier to try out a solution than trying to start from scratch.

    – cfr
    Apr 19 '14 at 21:43











  • See essex.ac.uk/linguistics/external/clmt/latex4ling.

    – cfr
    Apr 19 '14 at 21:54











  • Out of curiosity, were you able to figure out solutions to the three items under your “Edit” section?

    – hftf
    May 2 '14 at 19:37











  • Not really, but your answer fits almost what I want to do. However, it would be nice to solve them.

    – JnxF
    May 2 '14 at 20:51
















8















I know that syntax analysis can be done in Latex using using TikZ, but the tree-structure that produces isn't really used in my country. Here, we mostly use straight lines instead of hierarchy trees.



Here's an example what I want to achieve. I don't know where to start from.



Is there any (more or less) easy way to do it? Any idea?



enter image description here





Edit:



Even though all solutions provided until the moment are right, it would be nice to modify the following characteristics of the different diagrams you've proposed:




  • The sentence that is being analysed ("La novela que me ha regalado mi hermana...") should be on top of the graphic and all words must be in the same line; "la" can't be immediately over "Det" and "está" shouldn't be immediately over "N/V".


  • All the syntax functions of the differents words ("OP", "S/SN", "PN/SV", "Det"...) should be centered with the respective lines they have above (or at least near to the center but without having to change manually the spacing).


  • It should be possible to modify the height of the diagram.











share|improve this question




















  • 1





    Could you please supply some code? I realise you don't know how to draw the diagram but at least provide the document framework and the text which needs to go into the diagram. This makes it a lot easier to try out a solution than trying to start from scratch.

    – cfr
    Apr 19 '14 at 21:43











  • See essex.ac.uk/linguistics/external/clmt/latex4ling.

    – cfr
    Apr 19 '14 at 21:54











  • Out of curiosity, were you able to figure out solutions to the three items under your “Edit” section?

    – hftf
    May 2 '14 at 19:37











  • Not really, but your answer fits almost what I want to do. However, it would be nice to solve them.

    – JnxF
    May 2 '14 at 20:51














8












8








8


2






I know that syntax analysis can be done in Latex using using TikZ, but the tree-structure that produces isn't really used in my country. Here, we mostly use straight lines instead of hierarchy trees.



Here's an example what I want to achieve. I don't know where to start from.



Is there any (more or less) easy way to do it? Any idea?



enter image description here





Edit:



Even though all solutions provided until the moment are right, it would be nice to modify the following characteristics of the different diagrams you've proposed:




  • The sentence that is being analysed ("La novela que me ha regalado mi hermana...") should be on top of the graphic and all words must be in the same line; "la" can't be immediately over "Det" and "está" shouldn't be immediately over "N/V".


  • All the syntax functions of the differents words ("OP", "S/SN", "PN/SV", "Det"...) should be centered with the respective lines they have above (or at least near to the center but without having to change manually the spacing).


  • It should be possible to modify the height of the diagram.











share|improve this question
















I know that syntax analysis can be done in Latex using using TikZ, but the tree-structure that produces isn't really used in my country. Here, we mostly use straight lines instead of hierarchy trees.



Here's an example what I want to achieve. I don't know where to start from.



Is there any (more or less) easy way to do it? Any idea?



enter image description here





Edit:



Even though all solutions provided until the moment are right, it would be nice to modify the following characteristics of the different diagrams you've proposed:




  • The sentence that is being analysed ("La novela que me ha regalado mi hermana...") should be on top of the graphic and all words must be in the same line; "la" can't be immediately over "Det" and "está" shouldn't be immediately over "N/V".


  • All the syntax functions of the differents words ("OP", "S/SN", "PN/SV", "Det"...) should be centered with the respective lines they have above (or at least near to the center but without having to change manually the spacing).


  • It should be possible to modify the height of the diagram.








tikz-pgf tikz-trees linguistics trees forest






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '15 at 1:36









hftf

1,73311229




1,73311229










asked Apr 19 '14 at 21:30









JnxFJnxF

5161416




5161416








  • 1





    Could you please supply some code? I realise you don't know how to draw the diagram but at least provide the document framework and the text which needs to go into the diagram. This makes it a lot easier to try out a solution than trying to start from scratch.

    – cfr
    Apr 19 '14 at 21:43











  • See essex.ac.uk/linguistics/external/clmt/latex4ling.

    – cfr
    Apr 19 '14 at 21:54











  • Out of curiosity, were you able to figure out solutions to the three items under your “Edit” section?

    – hftf
    May 2 '14 at 19:37











  • Not really, but your answer fits almost what I want to do. However, it would be nice to solve them.

    – JnxF
    May 2 '14 at 20:51














  • 1





    Could you please supply some code? I realise you don't know how to draw the diagram but at least provide the document framework and the text which needs to go into the diagram. This makes it a lot easier to try out a solution than trying to start from scratch.

    – cfr
    Apr 19 '14 at 21:43











  • See essex.ac.uk/linguistics/external/clmt/latex4ling.

    – cfr
    Apr 19 '14 at 21:54











  • Out of curiosity, were you able to figure out solutions to the three items under your “Edit” section?

    – hftf
    May 2 '14 at 19:37











  • Not really, but your answer fits almost what I want to do. However, it would be nice to solve them.

    – JnxF
    May 2 '14 at 20:51








1




1





Could you please supply some code? I realise you don't know how to draw the diagram but at least provide the document framework and the text which needs to go into the diagram. This makes it a lot easier to try out a solution than trying to start from scratch.

– cfr
Apr 19 '14 at 21:43





Could you please supply some code? I realise you don't know how to draw the diagram but at least provide the document framework and the text which needs to go into the diagram. This makes it a lot easier to try out a solution than trying to start from scratch.

– cfr
Apr 19 '14 at 21:43













See essex.ac.uk/linguistics/external/clmt/latex4ling.

– cfr
Apr 19 '14 at 21:54





See essex.ac.uk/linguistics/external/clmt/latex4ling.

– cfr
Apr 19 '14 at 21:54













Out of curiosity, were you able to figure out solutions to the three items under your “Edit” section?

– hftf
May 2 '14 at 19:37





Out of curiosity, were you able to figure out solutions to the three items under your “Edit” section?

– hftf
May 2 '14 at 19:37













Not really, but your answer fits almost what I want to do. However, it would be nice to solve them.

– JnxF
May 2 '14 at 20:51





Not really, but your answer fits almost what I want to do. However, it would be nice to solve them.

– JnxF
May 2 '14 at 20:51










4 Answers
4






active

oldest

votes


















11














Here’s a solution that uses the excellent forest package.



documentclass[tikz,border=5pt]{standalone}
usepackage{forest}

% Node shape adapted from http://www.texample.net/tikz/examples/data-flow-diagram/
makeatletter pgfdeclareshape{myunderline}{
inheritsavedanchors[from=rectangle]
inheritanchorborder[from=rectangle]
foreach from in
{center,base,north,north east,east,south east,south,south west,west,north west}{
inheritanchor[from=rectangle]{from}
}
backgroundpath{
southwest pgf@xa=pgf@x pgf@ya=pgf@y
northeast pgf@xb=pgf@x pgf@yb=pgf@y
% This can be improved by removing magic numbers
pgfpathmoveto{pgfpoint{pgf@xa}{pgf@ya+1.75em}}
pgfpathlineto{pgfpoint{pgf@xb}{pgf@ya+1.75em}}
}
} makeatother

begin{document}
begin{forest}
for tree={
fit=band, % Isolates space above this node from siblings’ descendants
no edge,
% Uncomment the line below for the dotted edges
% edge={dotted, semithick, gray!50, shorten <=8pt}, parent anchor=north,
% This can be improved by reducing space between levels where edges are drawn
inner sep=0pt, outer sep=0pt,
l sep=0pt, s sep=6pt, text depth=0.5em, grow'=north,
where level=0{} % No style for dummy root node
{where n children=0
{font=bfseries,tier=word} % Leaves in bold on the same tier
{font=small,tikz={node[draw, thick, myunderline, fit to=tree] {};}} % Non-leaves
}
}
% This can be improved by removing the need for a parent and sibling of the actual root
[,phantom[,phantom][OP
[S/SN
[Det [La] ]
[N/Sust [novela] ]
[CN/SAdj/Prop Sub Adj
[PV/SV,
[textit{nexo} [que] ]
[CI/SN [me] ]
[N/V [ha regalado] ]
]
[S/SN
[Det [mi] ]
[N [hermana] ]
]
]
]
[PN/SV
[N/V [est'a] ]
[Attrib/SAdj
[N [ambientada] ]
]
[CCL/SPrep
[E [en] ]
[T/SN
[N [Australiarlap.] ]
]
]
]
]]
end{forest}
end{document}






And here’s another version with faint dotted edges:







You can render the same structure in a more conventional appearance just by changing options:



for tree={
edge={dotted, semithick, gray!80, shorten <=1pt,shorten >=3pt},
parent anchor=south, child anchor=north,
inner sep=0pt, outer ysep=2pt,
text depth=0.5em,
where n children=0{font=bfseries,tier=word}{font=small}
}






So you can see why one might prefer using forest instead of bussproofs or semantics. Also, the forest tree syntax is much simpler, and is not “backwards” as seen in cfr’s answer.



Take a look at the forest manual for more style options.



2019 edit:
fit to tree option syntax has been modified to fit to=tree






share|improve this answer





















  • 1





    Nice solution. BTW, how can I reduce the vertical height of the diagram? I've tried l sep with negative values without success. Thank you

    – JnxF
    Apr 20 '14 at 14:39








  • 2





    Very slick solution. I wish I understood forest. I don't see why my solution is 'backwards' though. You are analysing the sentence so that's where you are starting, surely? In that sense, your solution seems to be 'backwards' if anything. Still very nice, though - especially being able to easily turn it upside down like that.

    – cfr
    Apr 20 '14 at 17:10











  • @JnxF I also tried playing with l sep, inner ysep, outer ysep, and the like with no success, but I thought my solution answered your question enough to still post it. You could post a new question, or just wait for other people who know more about forest to stop by.

    – hftf
    Apr 20 '14 at 20:16











  • @cfr I guess it depends on your perspective :). In my experience, trees are usually specified parent-first — that’s how the syntax (heh) of most of the various tree packages I’ve tried (forest, tikz-qtree, qtree, synttree, “plain” TikZ) work. It would be trivial to replace forest with any of those if you wanted to, but harder to switch to bussproofs or semantics since they are specified child-first.

    – hftf
    Apr 20 '14 at 20:29











  • @htft I don't considerate necessary to ask another question. I've just edited this one.

    – JnxF
    Apr 20 '14 at 23:13



















7














For example:



documentclass{standalone}
usepackage[inference]{semantic}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}

begin{document}

setpremisesend{0pt}
setpremisesspace{1pt}
setnamespace{0pt}
inference{%
inference{%
inference{mbox{La}}{Det}
&
inference{mbox{novela}}{N/Sust}
&
inference{%
inference{%
inference{mbox{que}}{nexo}
&
inference{mbox{me}}{CI/SN}
&
inference{mbox{ha regalado}}{N/V}
}
{PV/SV}
&
inference{%
inference{mbox{mi}}{Det}
&
inference{mbox{hermana}}{N}
}
{S/SN}
}
{CN/SAdj/Prop. Sub. Adj}
}
{S/SN}
&
inference{%
inference{mbox{está}}{N/V}
&
inference{%
inference{mbox{ambientada}}{N}
}
{Attrib/SAdj}
&
inference{%
inference{mbox{en}}{E}
&
inference{%
inference{mbox{Australia}}{N}
}
{T/SN}
}
{CCL/SPrep}
}
{PN/SV}
}
{OP}

end{document}


Tree






share|improve this answer


























  • I have absolutely no idea what exactly the OP wants, or how semantic works, but it seems to me a key part is that the lines are the same length as the word(s) they refer to, and yours don't seem to have that. Is that adjustable?

    – Jānis Lazovskis
    Apr 20 '14 at 0:30











  • I mean the words in the sentence above the picture, for example "nexo" refers to "que", "CI/SN" to "me", "N/V" to "ha regalado" and "PV/SV" to "que me ha regalado". You haven't included the sentence in your answer, even though the lines more or less line up with the words they refer to. I'm just under the impression that the lines being the same length as the words is key, since this is a linguistics question and the words below seem to describe parts of the sentence above.

    – Jānis Lazovskis
    Apr 20 '14 at 1:06











  • @JānisL Yes. Sorry. I deleted my comment because I realised what you meant. I am not sure you can (straightforwardly) do that with semantic but you can put the words right above the relevant analysis (see edit) so that it is obvious what goes with what. This is the way semantic is used on the LaTeX for Linguists site and this option looked like the closest match to the image the OP posted. Another possibility would be to adapt a package intended for typesetting similar kinds of proofs in formal logic. (bussproofs is maybe the best known.) But this seemed a little more promising here...

    – cfr
    Apr 20 '14 at 1:22











  • prftree might be a better option, now.

    – cfr
    Apr 13 '15 at 1:50











  • Is there any way to get one of those packages (semantic, bussproofs, prftree) to align the uppermost row at the top together?

    – hftf
    Apr 13 '15 at 15:51



















3














Here's a different way... based on my answer at Highlighting text through stacked colored underlines



documentclass{article}
usepackage{stackengine}
newlengthtmpln
newlengthlunderset
newlengthrulethick
lunderset=1baselineskiprelax
rulethick=.8ptrelax
defstackalignment{l}
newcommandnunderline[3][1]{setbox0=hbox{#2}tmpln=wd0%
stackunder[#1lunderset-rulethick]{strut#2}{%
smash{raisebox{-.6baselineskip}{makebox[0pt][l]{scriptsize #3}}}%
rule{tmpln}{rulethick}}}%
letNunnunderline
letHShspace
begin{document}
Nun{Nun{Nun[3]{La}{Det}}{}}{}%
Nun{Nun[4]{ }{}}{}%
Nun{Nun{Nun[3]{novela}{N/Sust}}{}}{}%
Nun{Nun[4]{ }{}}{}%
Nun{Nun{Nun{Nun{Nun {que}{itshape nexo}}{}}{}}{}}{}%
Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
Nun{Nun{Nun{Nun{Nun {me}{CI/SN}}{}}{}}{}}{}%
Nun{Nun{Nun{Nun[2]{ }{PV/SV}}{CN/SAdj/Prop. Sub. Adj}}{S/SN}}{}%
Nun{Nun{Nun{Nun{Nun {ha}{}}{}}{}}{}}{}%
Nun{Nun{Nun{Nun{Nun { }{}}{}}{}}{}}{}%
Nun{Nun{Nun{Nun{Nun {regalado}{N/V}}{}}{}}{}}{}%
Nun{Nun{Nun[3]{ }{}}{}}{}%
Nun{Nun{Nun{Nun{Nun {mi}{Det}}{}}{}}{}}{}%
Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
Nun{Nun{Nun{Nun{Nun {hermana}{HS{5ex}N}}{S/SN}}{}}{}}{OP}%
Nun[5]{ }{}%
Nun{Nun{Nun[3]{est'a}{N/V}}{}}{}%
Nun{Nun[4]{ }{}}{}%
Nun{Nun{Nun{Nun[2]{ambientada}{HS{7ex}N}}{Attrib/SAdj}}{HS{7ex}PN/SV}}{}%
Nun{Nun[4]{ }{}}{}%
Nun{Nun{Nun{Nun[2]{en}{E}}{HS{4ex}CCL/SPrep}}{}}{}%
Nun{Nun{Nun[3]{ }{}}{}}{}%
Nun{Nun{Nun{Nun{Nun {Australia}{HS{6ex}N}}{HS{3ex}T/SN}}{}}{}}{}%
end{document}


enter image description here






share|improve this answer

































    2














    For completeness, and in partial response to a query in the comments on my other answer, here is the tree set with prftree. As can be seen, this no more lends itself to typesetting this kind of tree than semantic. If anybody wants to typeset natural deduction proofs of this kind for logic, though, it looks like a really nice package with a lot of convenience commands, flexible customisation and a nice syntax. The tree here is very verbose because none of the convenience commands are appropriate: this is definitely a package intended for symbolic logic. The result is very, very slightly closer to the target tree in some ways than with semantic but the improvement is marginal, at best, and the result is even further from the target in other aspects.



    My conclusion is that none of bussproofs, semantic and prftree are well-suited to typesetting this kind of tree. The forest and stackengine solutions are definitely superior relative to the question desiderata.



    However, for logic, these package are superior to the other solutions offered here. They are designed for that purpose and will produce trees more easily and with less hassle. prftree looks especially good, even though this is the first time I've used it. The alignments and spacings are designed to work correctly out-of-the-box for logic, and prftree allows you to specify the tree using standard rules of inference, which makes it more readable, less verbose and more intuitive. My conclusion above is not, therefore, intended as a criticism of these packages. They just aren't designed for this sort of tree.



    documentclass[landscape]{article}
    usepackage[utf8]{inputenc}
    usepackage[T1]{fontenc}
    usepackage{prftree,geometry,mathtools}
    begin{document}

    [
    prftree{%
    prftree{%
    prftree{text{La}}{Det}
    }{%
    prftree{text{novela}}{N/Sust}
    }{%
    prftree{%
    prftree{%
    prftree{text{que}}{nexo}
    }{%
    prftree{text{me}}{CI/SN}
    }{%
    prftree{text{ha regalado}}{N/V}
    }
    {PV/SV}
    }{%
    prftree{%
    prftree{text{mi}}{Det}
    }{%
    prftree{text{hermana}}{N}
    }{S/SN}
    }
    {CN/SAdj/Prop. Sub. Adj}
    }
    {S/SN}
    }{
    prftree{%
    prftree{text{está}}{N/V}
    }{%
    prftree{%
    prftree{text{ambientada}}{N}
    }
    {Attrib/SAdj}
    }{%
    prftree{%
    prftree{text{en}}{E}
    }{%
    prftree{%
    prftree{text{Australia}}{N}
    }
    {T/SN}
    }
    {CCL/SPrep}
    }
    {PN/SV}
    }
    {OP}
    ]

    end{document}


    <code>prftree</code> proof






    share|improve this answer


























    • Another thing is that they all seem to default to math mode :o)

      – hftf
      Apr 14 '15 at 14:40











    • @hftf Again, given their purpose, that makes sense ;).

      – cfr
      Apr 14 '15 at 16:56











    • @cfr cannot you force the main sentence vertical alignment?

      – JFernan
      2 hours ago












    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f172415%2fupside-down-syntax-trees-for-linguistics-with-horizontal-lines%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    11














    Here’s a solution that uses the excellent forest package.



    documentclass[tikz,border=5pt]{standalone}
    usepackage{forest}

    % Node shape adapted from http://www.texample.net/tikz/examples/data-flow-diagram/
    makeatletter pgfdeclareshape{myunderline}{
    inheritsavedanchors[from=rectangle]
    inheritanchorborder[from=rectangle]
    foreach from in
    {center,base,north,north east,east,south east,south,south west,west,north west}{
    inheritanchor[from=rectangle]{from}
    }
    backgroundpath{
    southwest pgf@xa=pgf@x pgf@ya=pgf@y
    northeast pgf@xb=pgf@x pgf@yb=pgf@y
    % This can be improved by removing magic numbers
    pgfpathmoveto{pgfpoint{pgf@xa}{pgf@ya+1.75em}}
    pgfpathlineto{pgfpoint{pgf@xb}{pgf@ya+1.75em}}
    }
    } makeatother

    begin{document}
    begin{forest}
    for tree={
    fit=band, % Isolates space above this node from siblings’ descendants
    no edge,
    % Uncomment the line below for the dotted edges
    % edge={dotted, semithick, gray!50, shorten <=8pt}, parent anchor=north,
    % This can be improved by reducing space between levels where edges are drawn
    inner sep=0pt, outer sep=0pt,
    l sep=0pt, s sep=6pt, text depth=0.5em, grow'=north,
    where level=0{} % No style for dummy root node
    {where n children=0
    {font=bfseries,tier=word} % Leaves in bold on the same tier
    {font=small,tikz={node[draw, thick, myunderline, fit to=tree] {};}} % Non-leaves
    }
    }
    % This can be improved by removing the need for a parent and sibling of the actual root
    [,phantom[,phantom][OP
    [S/SN
    [Det [La] ]
    [N/Sust [novela] ]
    [CN/SAdj/Prop Sub Adj
    [PV/SV,
    [textit{nexo} [que] ]
    [CI/SN [me] ]
    [N/V [ha regalado] ]
    ]
    [S/SN
    [Det [mi] ]
    [N [hermana] ]
    ]
    ]
    ]
    [PN/SV
    [N/V [est'a] ]
    [Attrib/SAdj
    [N [ambientada] ]
    ]
    [CCL/SPrep
    [E [en] ]
    [T/SN
    [N [Australiarlap.] ]
    ]
    ]
    ]
    ]]
    end{forest}
    end{document}






    And here’s another version with faint dotted edges:







    You can render the same structure in a more conventional appearance just by changing options:



    for tree={
    edge={dotted, semithick, gray!80, shorten <=1pt,shorten >=3pt},
    parent anchor=south, child anchor=north,
    inner sep=0pt, outer ysep=2pt,
    text depth=0.5em,
    where n children=0{font=bfseries,tier=word}{font=small}
    }






    So you can see why one might prefer using forest instead of bussproofs or semantics. Also, the forest tree syntax is much simpler, and is not “backwards” as seen in cfr’s answer.



    Take a look at the forest manual for more style options.



    2019 edit:
    fit to tree option syntax has been modified to fit to=tree






    share|improve this answer





















    • 1





      Nice solution. BTW, how can I reduce the vertical height of the diagram? I've tried l sep with negative values without success. Thank you

      – JnxF
      Apr 20 '14 at 14:39








    • 2





      Very slick solution. I wish I understood forest. I don't see why my solution is 'backwards' though. You are analysing the sentence so that's where you are starting, surely? In that sense, your solution seems to be 'backwards' if anything. Still very nice, though - especially being able to easily turn it upside down like that.

      – cfr
      Apr 20 '14 at 17:10











    • @JnxF I also tried playing with l sep, inner ysep, outer ysep, and the like with no success, but I thought my solution answered your question enough to still post it. You could post a new question, or just wait for other people who know more about forest to stop by.

      – hftf
      Apr 20 '14 at 20:16











    • @cfr I guess it depends on your perspective :). In my experience, trees are usually specified parent-first — that’s how the syntax (heh) of most of the various tree packages I’ve tried (forest, tikz-qtree, qtree, synttree, “plain” TikZ) work. It would be trivial to replace forest with any of those if you wanted to, but harder to switch to bussproofs or semantics since they are specified child-first.

      – hftf
      Apr 20 '14 at 20:29











    • @htft I don't considerate necessary to ask another question. I've just edited this one.

      – JnxF
      Apr 20 '14 at 23:13
















    11














    Here’s a solution that uses the excellent forest package.



    documentclass[tikz,border=5pt]{standalone}
    usepackage{forest}

    % Node shape adapted from http://www.texample.net/tikz/examples/data-flow-diagram/
    makeatletter pgfdeclareshape{myunderline}{
    inheritsavedanchors[from=rectangle]
    inheritanchorborder[from=rectangle]
    foreach from in
    {center,base,north,north east,east,south east,south,south west,west,north west}{
    inheritanchor[from=rectangle]{from}
    }
    backgroundpath{
    southwest pgf@xa=pgf@x pgf@ya=pgf@y
    northeast pgf@xb=pgf@x pgf@yb=pgf@y
    % This can be improved by removing magic numbers
    pgfpathmoveto{pgfpoint{pgf@xa}{pgf@ya+1.75em}}
    pgfpathlineto{pgfpoint{pgf@xb}{pgf@ya+1.75em}}
    }
    } makeatother

    begin{document}
    begin{forest}
    for tree={
    fit=band, % Isolates space above this node from siblings’ descendants
    no edge,
    % Uncomment the line below for the dotted edges
    % edge={dotted, semithick, gray!50, shorten <=8pt}, parent anchor=north,
    % This can be improved by reducing space between levels where edges are drawn
    inner sep=0pt, outer sep=0pt,
    l sep=0pt, s sep=6pt, text depth=0.5em, grow'=north,
    where level=0{} % No style for dummy root node
    {where n children=0
    {font=bfseries,tier=word} % Leaves in bold on the same tier
    {font=small,tikz={node[draw, thick, myunderline, fit to=tree] {};}} % Non-leaves
    }
    }
    % This can be improved by removing the need for a parent and sibling of the actual root
    [,phantom[,phantom][OP
    [S/SN
    [Det [La] ]
    [N/Sust [novela] ]
    [CN/SAdj/Prop Sub Adj
    [PV/SV,
    [textit{nexo} [que] ]
    [CI/SN [me] ]
    [N/V [ha regalado] ]
    ]
    [S/SN
    [Det [mi] ]
    [N [hermana] ]
    ]
    ]
    ]
    [PN/SV
    [N/V [est'a] ]
    [Attrib/SAdj
    [N [ambientada] ]
    ]
    [CCL/SPrep
    [E [en] ]
    [T/SN
    [N [Australiarlap.] ]
    ]
    ]
    ]
    ]]
    end{forest}
    end{document}






    And here’s another version with faint dotted edges:







    You can render the same structure in a more conventional appearance just by changing options:



    for tree={
    edge={dotted, semithick, gray!80, shorten <=1pt,shorten >=3pt},
    parent anchor=south, child anchor=north,
    inner sep=0pt, outer ysep=2pt,
    text depth=0.5em,
    where n children=0{font=bfseries,tier=word}{font=small}
    }






    So you can see why one might prefer using forest instead of bussproofs or semantics. Also, the forest tree syntax is much simpler, and is not “backwards” as seen in cfr’s answer.



    Take a look at the forest manual for more style options.



    2019 edit:
    fit to tree option syntax has been modified to fit to=tree






    share|improve this answer





















    • 1





      Nice solution. BTW, how can I reduce the vertical height of the diagram? I've tried l sep with negative values without success. Thank you

      – JnxF
      Apr 20 '14 at 14:39








    • 2





      Very slick solution. I wish I understood forest. I don't see why my solution is 'backwards' though. You are analysing the sentence so that's where you are starting, surely? In that sense, your solution seems to be 'backwards' if anything. Still very nice, though - especially being able to easily turn it upside down like that.

      – cfr
      Apr 20 '14 at 17:10











    • @JnxF I also tried playing with l sep, inner ysep, outer ysep, and the like with no success, but I thought my solution answered your question enough to still post it. You could post a new question, or just wait for other people who know more about forest to stop by.

      – hftf
      Apr 20 '14 at 20:16











    • @cfr I guess it depends on your perspective :). In my experience, trees are usually specified parent-first — that’s how the syntax (heh) of most of the various tree packages I’ve tried (forest, tikz-qtree, qtree, synttree, “plain” TikZ) work. It would be trivial to replace forest with any of those if you wanted to, but harder to switch to bussproofs or semantics since they are specified child-first.

      – hftf
      Apr 20 '14 at 20:29











    • @htft I don't considerate necessary to ask another question. I've just edited this one.

      – JnxF
      Apr 20 '14 at 23:13














    11












    11








    11







    Here’s a solution that uses the excellent forest package.



    documentclass[tikz,border=5pt]{standalone}
    usepackage{forest}

    % Node shape adapted from http://www.texample.net/tikz/examples/data-flow-diagram/
    makeatletter pgfdeclareshape{myunderline}{
    inheritsavedanchors[from=rectangle]
    inheritanchorborder[from=rectangle]
    foreach from in
    {center,base,north,north east,east,south east,south,south west,west,north west}{
    inheritanchor[from=rectangle]{from}
    }
    backgroundpath{
    southwest pgf@xa=pgf@x pgf@ya=pgf@y
    northeast pgf@xb=pgf@x pgf@yb=pgf@y
    % This can be improved by removing magic numbers
    pgfpathmoveto{pgfpoint{pgf@xa}{pgf@ya+1.75em}}
    pgfpathlineto{pgfpoint{pgf@xb}{pgf@ya+1.75em}}
    }
    } makeatother

    begin{document}
    begin{forest}
    for tree={
    fit=band, % Isolates space above this node from siblings’ descendants
    no edge,
    % Uncomment the line below for the dotted edges
    % edge={dotted, semithick, gray!50, shorten <=8pt}, parent anchor=north,
    % This can be improved by reducing space between levels where edges are drawn
    inner sep=0pt, outer sep=0pt,
    l sep=0pt, s sep=6pt, text depth=0.5em, grow'=north,
    where level=0{} % No style for dummy root node
    {where n children=0
    {font=bfseries,tier=word} % Leaves in bold on the same tier
    {font=small,tikz={node[draw, thick, myunderline, fit to=tree] {};}} % Non-leaves
    }
    }
    % This can be improved by removing the need for a parent and sibling of the actual root
    [,phantom[,phantom][OP
    [S/SN
    [Det [La] ]
    [N/Sust [novela] ]
    [CN/SAdj/Prop Sub Adj
    [PV/SV,
    [textit{nexo} [que] ]
    [CI/SN [me] ]
    [N/V [ha regalado] ]
    ]
    [S/SN
    [Det [mi] ]
    [N [hermana] ]
    ]
    ]
    ]
    [PN/SV
    [N/V [est'a] ]
    [Attrib/SAdj
    [N [ambientada] ]
    ]
    [CCL/SPrep
    [E [en] ]
    [T/SN
    [N [Australiarlap.] ]
    ]
    ]
    ]
    ]]
    end{forest}
    end{document}






    And here’s another version with faint dotted edges:







    You can render the same structure in a more conventional appearance just by changing options:



    for tree={
    edge={dotted, semithick, gray!80, shorten <=1pt,shorten >=3pt},
    parent anchor=south, child anchor=north,
    inner sep=0pt, outer ysep=2pt,
    text depth=0.5em,
    where n children=0{font=bfseries,tier=word}{font=small}
    }






    So you can see why one might prefer using forest instead of bussproofs or semantics. Also, the forest tree syntax is much simpler, and is not “backwards” as seen in cfr’s answer.



    Take a look at the forest manual for more style options.



    2019 edit:
    fit to tree option syntax has been modified to fit to=tree






    share|improve this answer















    Here’s a solution that uses the excellent forest package.



    documentclass[tikz,border=5pt]{standalone}
    usepackage{forest}

    % Node shape adapted from http://www.texample.net/tikz/examples/data-flow-diagram/
    makeatletter pgfdeclareshape{myunderline}{
    inheritsavedanchors[from=rectangle]
    inheritanchorborder[from=rectangle]
    foreach from in
    {center,base,north,north east,east,south east,south,south west,west,north west}{
    inheritanchor[from=rectangle]{from}
    }
    backgroundpath{
    southwest pgf@xa=pgf@x pgf@ya=pgf@y
    northeast pgf@xb=pgf@x pgf@yb=pgf@y
    % This can be improved by removing magic numbers
    pgfpathmoveto{pgfpoint{pgf@xa}{pgf@ya+1.75em}}
    pgfpathlineto{pgfpoint{pgf@xb}{pgf@ya+1.75em}}
    }
    } makeatother

    begin{document}
    begin{forest}
    for tree={
    fit=band, % Isolates space above this node from siblings’ descendants
    no edge,
    % Uncomment the line below for the dotted edges
    % edge={dotted, semithick, gray!50, shorten <=8pt}, parent anchor=north,
    % This can be improved by reducing space between levels where edges are drawn
    inner sep=0pt, outer sep=0pt,
    l sep=0pt, s sep=6pt, text depth=0.5em, grow'=north,
    where level=0{} % No style for dummy root node
    {where n children=0
    {font=bfseries,tier=word} % Leaves in bold on the same tier
    {font=small,tikz={node[draw, thick, myunderline, fit to=tree] {};}} % Non-leaves
    }
    }
    % This can be improved by removing the need for a parent and sibling of the actual root
    [,phantom[,phantom][OP
    [S/SN
    [Det [La] ]
    [N/Sust [novela] ]
    [CN/SAdj/Prop Sub Adj
    [PV/SV,
    [textit{nexo} [que] ]
    [CI/SN [me] ]
    [N/V [ha regalado] ]
    ]
    [S/SN
    [Det [mi] ]
    [N [hermana] ]
    ]
    ]
    ]
    [PN/SV
    [N/V [est'a] ]
    [Attrib/SAdj
    [N [ambientada] ]
    ]
    [CCL/SPrep
    [E [en] ]
    [T/SN
    [N [Australiarlap.] ]
    ]
    ]
    ]
    ]]
    end{forest}
    end{document}






    And here’s another version with faint dotted edges:







    You can render the same structure in a more conventional appearance just by changing options:



    for tree={
    edge={dotted, semithick, gray!80, shorten <=1pt,shorten >=3pt},
    parent anchor=south, child anchor=north,
    inner sep=0pt, outer ysep=2pt,
    text depth=0.5em,
    where n children=0{font=bfseries,tier=word}{font=small}
    }






    So you can see why one might prefer using forest instead of bussproofs or semantics. Also, the forest tree syntax is much simpler, and is not “backwards” as seen in cfr’s answer.



    Take a look at the forest manual for more style options.



    2019 edit:
    fit to tree option syntax has been modified to fit to=tree







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 3 mins ago









    JFernan

    414514




    414514










    answered Apr 20 '14 at 4:21









    hftfhftf

    1,73311229




    1,73311229








    • 1





      Nice solution. BTW, how can I reduce the vertical height of the diagram? I've tried l sep with negative values without success. Thank you

      – JnxF
      Apr 20 '14 at 14:39








    • 2





      Very slick solution. I wish I understood forest. I don't see why my solution is 'backwards' though. You are analysing the sentence so that's where you are starting, surely? In that sense, your solution seems to be 'backwards' if anything. Still very nice, though - especially being able to easily turn it upside down like that.

      – cfr
      Apr 20 '14 at 17:10











    • @JnxF I also tried playing with l sep, inner ysep, outer ysep, and the like with no success, but I thought my solution answered your question enough to still post it. You could post a new question, or just wait for other people who know more about forest to stop by.

      – hftf
      Apr 20 '14 at 20:16











    • @cfr I guess it depends on your perspective :). In my experience, trees are usually specified parent-first — that’s how the syntax (heh) of most of the various tree packages I’ve tried (forest, tikz-qtree, qtree, synttree, “plain” TikZ) work. It would be trivial to replace forest with any of those if you wanted to, but harder to switch to bussproofs or semantics since they are specified child-first.

      – hftf
      Apr 20 '14 at 20:29











    • @htft I don't considerate necessary to ask another question. I've just edited this one.

      – JnxF
      Apr 20 '14 at 23:13














    • 1





      Nice solution. BTW, how can I reduce the vertical height of the diagram? I've tried l sep with negative values without success. Thank you

      – JnxF
      Apr 20 '14 at 14:39








    • 2





      Very slick solution. I wish I understood forest. I don't see why my solution is 'backwards' though. You are analysing the sentence so that's where you are starting, surely? In that sense, your solution seems to be 'backwards' if anything. Still very nice, though - especially being able to easily turn it upside down like that.

      – cfr
      Apr 20 '14 at 17:10











    • @JnxF I also tried playing with l sep, inner ysep, outer ysep, and the like with no success, but I thought my solution answered your question enough to still post it. You could post a new question, or just wait for other people who know more about forest to stop by.

      – hftf
      Apr 20 '14 at 20:16











    • @cfr I guess it depends on your perspective :). In my experience, trees are usually specified parent-first — that’s how the syntax (heh) of most of the various tree packages I’ve tried (forest, tikz-qtree, qtree, synttree, “plain” TikZ) work. It would be trivial to replace forest with any of those if you wanted to, but harder to switch to bussproofs or semantics since they are specified child-first.

      – hftf
      Apr 20 '14 at 20:29











    • @htft I don't considerate necessary to ask another question. I've just edited this one.

      – JnxF
      Apr 20 '14 at 23:13








    1




    1





    Nice solution. BTW, how can I reduce the vertical height of the diagram? I've tried l sep with negative values without success. Thank you

    – JnxF
    Apr 20 '14 at 14:39







    Nice solution. BTW, how can I reduce the vertical height of the diagram? I've tried l sep with negative values without success. Thank you

    – JnxF
    Apr 20 '14 at 14:39






    2




    2





    Very slick solution. I wish I understood forest. I don't see why my solution is 'backwards' though. You are analysing the sentence so that's where you are starting, surely? In that sense, your solution seems to be 'backwards' if anything. Still very nice, though - especially being able to easily turn it upside down like that.

    – cfr
    Apr 20 '14 at 17:10





    Very slick solution. I wish I understood forest. I don't see why my solution is 'backwards' though. You are analysing the sentence so that's where you are starting, surely? In that sense, your solution seems to be 'backwards' if anything. Still very nice, though - especially being able to easily turn it upside down like that.

    – cfr
    Apr 20 '14 at 17:10













    @JnxF I also tried playing with l sep, inner ysep, outer ysep, and the like with no success, but I thought my solution answered your question enough to still post it. You could post a new question, or just wait for other people who know more about forest to stop by.

    – hftf
    Apr 20 '14 at 20:16





    @JnxF I also tried playing with l sep, inner ysep, outer ysep, and the like with no success, but I thought my solution answered your question enough to still post it. You could post a new question, or just wait for other people who know more about forest to stop by.

    – hftf
    Apr 20 '14 at 20:16













    @cfr I guess it depends on your perspective :). In my experience, trees are usually specified parent-first — that’s how the syntax (heh) of most of the various tree packages I’ve tried (forest, tikz-qtree, qtree, synttree, “plain” TikZ) work. It would be trivial to replace forest with any of those if you wanted to, but harder to switch to bussproofs or semantics since they are specified child-first.

    – hftf
    Apr 20 '14 at 20:29





    @cfr I guess it depends on your perspective :). In my experience, trees are usually specified parent-first — that’s how the syntax (heh) of most of the various tree packages I’ve tried (forest, tikz-qtree, qtree, synttree, “plain” TikZ) work. It would be trivial to replace forest with any of those if you wanted to, but harder to switch to bussproofs or semantics since they are specified child-first.

    – hftf
    Apr 20 '14 at 20:29













    @htft I don't considerate necessary to ask another question. I've just edited this one.

    – JnxF
    Apr 20 '14 at 23:13





    @htft I don't considerate necessary to ask another question. I've just edited this one.

    – JnxF
    Apr 20 '14 at 23:13











    7














    For example:



    documentclass{standalone}
    usepackage[inference]{semantic}
    usepackage[utf8]{inputenc}
    usepackage[T1]{fontenc}

    begin{document}

    setpremisesend{0pt}
    setpremisesspace{1pt}
    setnamespace{0pt}
    inference{%
    inference{%
    inference{mbox{La}}{Det}
    &
    inference{mbox{novela}}{N/Sust}
    &
    inference{%
    inference{%
    inference{mbox{que}}{nexo}
    &
    inference{mbox{me}}{CI/SN}
    &
    inference{mbox{ha regalado}}{N/V}
    }
    {PV/SV}
    &
    inference{%
    inference{mbox{mi}}{Det}
    &
    inference{mbox{hermana}}{N}
    }
    {S/SN}
    }
    {CN/SAdj/Prop. Sub. Adj}
    }
    {S/SN}
    &
    inference{%
    inference{mbox{está}}{N/V}
    &
    inference{%
    inference{mbox{ambientada}}{N}
    }
    {Attrib/SAdj}
    &
    inference{%
    inference{mbox{en}}{E}
    &
    inference{%
    inference{mbox{Australia}}{N}
    }
    {T/SN}
    }
    {CCL/SPrep}
    }
    {PN/SV}
    }
    {OP}

    end{document}


    Tree






    share|improve this answer


























    • I have absolutely no idea what exactly the OP wants, or how semantic works, but it seems to me a key part is that the lines are the same length as the word(s) they refer to, and yours don't seem to have that. Is that adjustable?

      – Jānis Lazovskis
      Apr 20 '14 at 0:30











    • I mean the words in the sentence above the picture, for example "nexo" refers to "que", "CI/SN" to "me", "N/V" to "ha regalado" and "PV/SV" to "que me ha regalado". You haven't included the sentence in your answer, even though the lines more or less line up with the words they refer to. I'm just under the impression that the lines being the same length as the words is key, since this is a linguistics question and the words below seem to describe parts of the sentence above.

      – Jānis Lazovskis
      Apr 20 '14 at 1:06











    • @JānisL Yes. Sorry. I deleted my comment because I realised what you meant. I am not sure you can (straightforwardly) do that with semantic but you can put the words right above the relevant analysis (see edit) so that it is obvious what goes with what. This is the way semantic is used on the LaTeX for Linguists site and this option looked like the closest match to the image the OP posted. Another possibility would be to adapt a package intended for typesetting similar kinds of proofs in formal logic. (bussproofs is maybe the best known.) But this seemed a little more promising here...

      – cfr
      Apr 20 '14 at 1:22











    • prftree might be a better option, now.

      – cfr
      Apr 13 '15 at 1:50











    • Is there any way to get one of those packages (semantic, bussproofs, prftree) to align the uppermost row at the top together?

      – hftf
      Apr 13 '15 at 15:51
















    7














    For example:



    documentclass{standalone}
    usepackage[inference]{semantic}
    usepackage[utf8]{inputenc}
    usepackage[T1]{fontenc}

    begin{document}

    setpremisesend{0pt}
    setpremisesspace{1pt}
    setnamespace{0pt}
    inference{%
    inference{%
    inference{mbox{La}}{Det}
    &
    inference{mbox{novela}}{N/Sust}
    &
    inference{%
    inference{%
    inference{mbox{que}}{nexo}
    &
    inference{mbox{me}}{CI/SN}
    &
    inference{mbox{ha regalado}}{N/V}
    }
    {PV/SV}
    &
    inference{%
    inference{mbox{mi}}{Det}
    &
    inference{mbox{hermana}}{N}
    }
    {S/SN}
    }
    {CN/SAdj/Prop. Sub. Adj}
    }
    {S/SN}
    &
    inference{%
    inference{mbox{está}}{N/V}
    &
    inference{%
    inference{mbox{ambientada}}{N}
    }
    {Attrib/SAdj}
    &
    inference{%
    inference{mbox{en}}{E}
    &
    inference{%
    inference{mbox{Australia}}{N}
    }
    {T/SN}
    }
    {CCL/SPrep}
    }
    {PN/SV}
    }
    {OP}

    end{document}


    Tree






    share|improve this answer


























    • I have absolutely no idea what exactly the OP wants, or how semantic works, but it seems to me a key part is that the lines are the same length as the word(s) they refer to, and yours don't seem to have that. Is that adjustable?

      – Jānis Lazovskis
      Apr 20 '14 at 0:30











    • I mean the words in the sentence above the picture, for example "nexo" refers to "que", "CI/SN" to "me", "N/V" to "ha regalado" and "PV/SV" to "que me ha regalado". You haven't included the sentence in your answer, even though the lines more or less line up with the words they refer to. I'm just under the impression that the lines being the same length as the words is key, since this is a linguistics question and the words below seem to describe parts of the sentence above.

      – Jānis Lazovskis
      Apr 20 '14 at 1:06











    • @JānisL Yes. Sorry. I deleted my comment because I realised what you meant. I am not sure you can (straightforwardly) do that with semantic but you can put the words right above the relevant analysis (see edit) so that it is obvious what goes with what. This is the way semantic is used on the LaTeX for Linguists site and this option looked like the closest match to the image the OP posted. Another possibility would be to adapt a package intended for typesetting similar kinds of proofs in formal logic. (bussproofs is maybe the best known.) But this seemed a little more promising here...

      – cfr
      Apr 20 '14 at 1:22











    • prftree might be a better option, now.

      – cfr
      Apr 13 '15 at 1:50











    • Is there any way to get one of those packages (semantic, bussproofs, prftree) to align the uppermost row at the top together?

      – hftf
      Apr 13 '15 at 15:51














    7












    7








    7







    For example:



    documentclass{standalone}
    usepackage[inference]{semantic}
    usepackage[utf8]{inputenc}
    usepackage[T1]{fontenc}

    begin{document}

    setpremisesend{0pt}
    setpremisesspace{1pt}
    setnamespace{0pt}
    inference{%
    inference{%
    inference{mbox{La}}{Det}
    &
    inference{mbox{novela}}{N/Sust}
    &
    inference{%
    inference{%
    inference{mbox{que}}{nexo}
    &
    inference{mbox{me}}{CI/SN}
    &
    inference{mbox{ha regalado}}{N/V}
    }
    {PV/SV}
    &
    inference{%
    inference{mbox{mi}}{Det}
    &
    inference{mbox{hermana}}{N}
    }
    {S/SN}
    }
    {CN/SAdj/Prop. Sub. Adj}
    }
    {S/SN}
    &
    inference{%
    inference{mbox{está}}{N/V}
    &
    inference{%
    inference{mbox{ambientada}}{N}
    }
    {Attrib/SAdj}
    &
    inference{%
    inference{mbox{en}}{E}
    &
    inference{%
    inference{mbox{Australia}}{N}
    }
    {T/SN}
    }
    {CCL/SPrep}
    }
    {PN/SV}
    }
    {OP}

    end{document}


    Tree






    share|improve this answer















    For example:



    documentclass{standalone}
    usepackage[inference]{semantic}
    usepackage[utf8]{inputenc}
    usepackage[T1]{fontenc}

    begin{document}

    setpremisesend{0pt}
    setpremisesspace{1pt}
    setnamespace{0pt}
    inference{%
    inference{%
    inference{mbox{La}}{Det}
    &
    inference{mbox{novela}}{N/Sust}
    &
    inference{%
    inference{%
    inference{mbox{que}}{nexo}
    &
    inference{mbox{me}}{CI/SN}
    &
    inference{mbox{ha regalado}}{N/V}
    }
    {PV/SV}
    &
    inference{%
    inference{mbox{mi}}{Det}
    &
    inference{mbox{hermana}}{N}
    }
    {S/SN}
    }
    {CN/SAdj/Prop. Sub. Adj}
    }
    {S/SN}
    &
    inference{%
    inference{mbox{está}}{N/V}
    &
    inference{%
    inference{mbox{ambientada}}{N}
    }
    {Attrib/SAdj}
    &
    inference{%
    inference{mbox{en}}{E}
    &
    inference{%
    inference{mbox{Australia}}{N}
    }
    {T/SN}
    }
    {CCL/SPrep}
    }
    {PN/SV}
    }
    {OP}

    end{document}


    Tree







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 20 '14 at 1:17

























    answered Apr 19 '14 at 22:22









    cfrcfr

    158k8191391




    158k8191391













    • I have absolutely no idea what exactly the OP wants, or how semantic works, but it seems to me a key part is that the lines are the same length as the word(s) they refer to, and yours don't seem to have that. Is that adjustable?

      – Jānis Lazovskis
      Apr 20 '14 at 0:30











    • I mean the words in the sentence above the picture, for example "nexo" refers to "que", "CI/SN" to "me", "N/V" to "ha regalado" and "PV/SV" to "que me ha regalado". You haven't included the sentence in your answer, even though the lines more or less line up with the words they refer to. I'm just under the impression that the lines being the same length as the words is key, since this is a linguistics question and the words below seem to describe parts of the sentence above.

      – Jānis Lazovskis
      Apr 20 '14 at 1:06











    • @JānisL Yes. Sorry. I deleted my comment because I realised what you meant. I am not sure you can (straightforwardly) do that with semantic but you can put the words right above the relevant analysis (see edit) so that it is obvious what goes with what. This is the way semantic is used on the LaTeX for Linguists site and this option looked like the closest match to the image the OP posted. Another possibility would be to adapt a package intended for typesetting similar kinds of proofs in formal logic. (bussproofs is maybe the best known.) But this seemed a little more promising here...

      – cfr
      Apr 20 '14 at 1:22











    • prftree might be a better option, now.

      – cfr
      Apr 13 '15 at 1:50











    • Is there any way to get one of those packages (semantic, bussproofs, prftree) to align the uppermost row at the top together?

      – hftf
      Apr 13 '15 at 15:51



















    • I have absolutely no idea what exactly the OP wants, or how semantic works, but it seems to me a key part is that the lines are the same length as the word(s) they refer to, and yours don't seem to have that. Is that adjustable?

      – Jānis Lazovskis
      Apr 20 '14 at 0:30











    • I mean the words in the sentence above the picture, for example "nexo" refers to "que", "CI/SN" to "me", "N/V" to "ha regalado" and "PV/SV" to "que me ha regalado". You haven't included the sentence in your answer, even though the lines more or less line up with the words they refer to. I'm just under the impression that the lines being the same length as the words is key, since this is a linguistics question and the words below seem to describe parts of the sentence above.

      – Jānis Lazovskis
      Apr 20 '14 at 1:06











    • @JānisL Yes. Sorry. I deleted my comment because I realised what you meant. I am not sure you can (straightforwardly) do that with semantic but you can put the words right above the relevant analysis (see edit) so that it is obvious what goes with what. This is the way semantic is used on the LaTeX for Linguists site and this option looked like the closest match to the image the OP posted. Another possibility would be to adapt a package intended for typesetting similar kinds of proofs in formal logic. (bussproofs is maybe the best known.) But this seemed a little more promising here...

      – cfr
      Apr 20 '14 at 1:22











    • prftree might be a better option, now.

      – cfr
      Apr 13 '15 at 1:50











    • Is there any way to get one of those packages (semantic, bussproofs, prftree) to align the uppermost row at the top together?

      – hftf
      Apr 13 '15 at 15:51

















    I have absolutely no idea what exactly the OP wants, or how semantic works, but it seems to me a key part is that the lines are the same length as the word(s) they refer to, and yours don't seem to have that. Is that adjustable?

    – Jānis Lazovskis
    Apr 20 '14 at 0:30





    I have absolutely no idea what exactly the OP wants, or how semantic works, but it seems to me a key part is that the lines are the same length as the word(s) they refer to, and yours don't seem to have that. Is that adjustable?

    – Jānis Lazovskis
    Apr 20 '14 at 0:30













    I mean the words in the sentence above the picture, for example "nexo" refers to "que", "CI/SN" to "me", "N/V" to "ha regalado" and "PV/SV" to "que me ha regalado". You haven't included the sentence in your answer, even though the lines more or less line up with the words they refer to. I'm just under the impression that the lines being the same length as the words is key, since this is a linguistics question and the words below seem to describe parts of the sentence above.

    – Jānis Lazovskis
    Apr 20 '14 at 1:06





    I mean the words in the sentence above the picture, for example "nexo" refers to "que", "CI/SN" to "me", "N/V" to "ha regalado" and "PV/SV" to "que me ha regalado". You haven't included the sentence in your answer, even though the lines more or less line up with the words they refer to. I'm just under the impression that the lines being the same length as the words is key, since this is a linguistics question and the words below seem to describe parts of the sentence above.

    – Jānis Lazovskis
    Apr 20 '14 at 1:06













    @JānisL Yes. Sorry. I deleted my comment because I realised what you meant. I am not sure you can (straightforwardly) do that with semantic but you can put the words right above the relevant analysis (see edit) so that it is obvious what goes with what. This is the way semantic is used on the LaTeX for Linguists site and this option looked like the closest match to the image the OP posted. Another possibility would be to adapt a package intended for typesetting similar kinds of proofs in formal logic. (bussproofs is maybe the best known.) But this seemed a little more promising here...

    – cfr
    Apr 20 '14 at 1:22





    @JānisL Yes. Sorry. I deleted my comment because I realised what you meant. I am not sure you can (straightforwardly) do that with semantic but you can put the words right above the relevant analysis (see edit) so that it is obvious what goes with what. This is the way semantic is used on the LaTeX for Linguists site and this option looked like the closest match to the image the OP posted. Another possibility would be to adapt a package intended for typesetting similar kinds of proofs in formal logic. (bussproofs is maybe the best known.) But this seemed a little more promising here...

    – cfr
    Apr 20 '14 at 1:22













    prftree might be a better option, now.

    – cfr
    Apr 13 '15 at 1:50





    prftree might be a better option, now.

    – cfr
    Apr 13 '15 at 1:50













    Is there any way to get one of those packages (semantic, bussproofs, prftree) to align the uppermost row at the top together?

    – hftf
    Apr 13 '15 at 15:51





    Is there any way to get one of those packages (semantic, bussproofs, prftree) to align the uppermost row at the top together?

    – hftf
    Apr 13 '15 at 15:51











    3














    Here's a different way... based on my answer at Highlighting text through stacked colored underlines



    documentclass{article}
    usepackage{stackengine}
    newlengthtmpln
    newlengthlunderset
    newlengthrulethick
    lunderset=1baselineskiprelax
    rulethick=.8ptrelax
    defstackalignment{l}
    newcommandnunderline[3][1]{setbox0=hbox{#2}tmpln=wd0%
    stackunder[#1lunderset-rulethick]{strut#2}{%
    smash{raisebox{-.6baselineskip}{makebox[0pt][l]{scriptsize #3}}}%
    rule{tmpln}{rulethick}}}%
    letNunnunderline
    letHShspace
    begin{document}
    Nun{Nun{Nun[3]{La}{Det}}{}}{}%
    Nun{Nun[4]{ }{}}{}%
    Nun{Nun{Nun[3]{novela}{N/Sust}}{}}{}%
    Nun{Nun[4]{ }{}}{}%
    Nun{Nun{Nun{Nun{Nun {que}{itshape nexo}}{}}{}}{}}{}%
    Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
    Nun{Nun{Nun{Nun{Nun {me}{CI/SN}}{}}{}}{}}{}%
    Nun{Nun{Nun{Nun[2]{ }{PV/SV}}{CN/SAdj/Prop. Sub. Adj}}{S/SN}}{}%
    Nun{Nun{Nun{Nun{Nun {ha}{}}{}}{}}{}}{}%
    Nun{Nun{Nun{Nun{Nun { }{}}{}}{}}{}}{}%
    Nun{Nun{Nun{Nun{Nun {regalado}{N/V}}{}}{}}{}}{}%
    Nun{Nun{Nun[3]{ }{}}{}}{}%
    Nun{Nun{Nun{Nun{Nun {mi}{Det}}{}}{}}{}}{}%
    Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
    Nun{Nun{Nun{Nun{Nun {hermana}{HS{5ex}N}}{S/SN}}{}}{}}{OP}%
    Nun[5]{ }{}%
    Nun{Nun{Nun[3]{est'a}{N/V}}{}}{}%
    Nun{Nun[4]{ }{}}{}%
    Nun{Nun{Nun{Nun[2]{ambientada}{HS{7ex}N}}{Attrib/SAdj}}{HS{7ex}PN/SV}}{}%
    Nun{Nun[4]{ }{}}{}%
    Nun{Nun{Nun{Nun[2]{en}{E}}{HS{4ex}CCL/SPrep}}{}}{}%
    Nun{Nun{Nun[3]{ }{}}{}}{}%
    Nun{Nun{Nun{Nun{Nun {Australia}{HS{6ex}N}}{HS{3ex}T/SN}}{}}{}}{}%
    end{document}


    enter image description here






    share|improve this answer






























      3














      Here's a different way... based on my answer at Highlighting text through stacked colored underlines



      documentclass{article}
      usepackage{stackengine}
      newlengthtmpln
      newlengthlunderset
      newlengthrulethick
      lunderset=1baselineskiprelax
      rulethick=.8ptrelax
      defstackalignment{l}
      newcommandnunderline[3][1]{setbox0=hbox{#2}tmpln=wd0%
      stackunder[#1lunderset-rulethick]{strut#2}{%
      smash{raisebox{-.6baselineskip}{makebox[0pt][l]{scriptsize #3}}}%
      rule{tmpln}{rulethick}}}%
      letNunnunderline
      letHShspace
      begin{document}
      Nun{Nun{Nun[3]{La}{Det}}{}}{}%
      Nun{Nun[4]{ }{}}{}%
      Nun{Nun{Nun[3]{novela}{N/Sust}}{}}{}%
      Nun{Nun[4]{ }{}}{}%
      Nun{Nun{Nun{Nun{Nun {que}{itshape nexo}}{}}{}}{}}{}%
      Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
      Nun{Nun{Nun{Nun{Nun {me}{CI/SN}}{}}{}}{}}{}%
      Nun{Nun{Nun{Nun[2]{ }{PV/SV}}{CN/SAdj/Prop. Sub. Adj}}{S/SN}}{}%
      Nun{Nun{Nun{Nun{Nun {ha}{}}{}}{}}{}}{}%
      Nun{Nun{Nun{Nun{Nun { }{}}{}}{}}{}}{}%
      Nun{Nun{Nun{Nun{Nun {regalado}{N/V}}{}}{}}{}}{}%
      Nun{Nun{Nun[3]{ }{}}{}}{}%
      Nun{Nun{Nun{Nun{Nun {mi}{Det}}{}}{}}{}}{}%
      Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
      Nun{Nun{Nun{Nun{Nun {hermana}{HS{5ex}N}}{S/SN}}{}}{}}{OP}%
      Nun[5]{ }{}%
      Nun{Nun{Nun[3]{est'a}{N/V}}{}}{}%
      Nun{Nun[4]{ }{}}{}%
      Nun{Nun{Nun{Nun[2]{ambientada}{HS{7ex}N}}{Attrib/SAdj}}{HS{7ex}PN/SV}}{}%
      Nun{Nun[4]{ }{}}{}%
      Nun{Nun{Nun{Nun[2]{en}{E}}{HS{4ex}CCL/SPrep}}{}}{}%
      Nun{Nun{Nun[3]{ }{}}{}}{}%
      Nun{Nun{Nun{Nun{Nun {Australia}{HS{6ex}N}}{HS{3ex}T/SN}}{}}{}}{}%
      end{document}


      enter image description here






      share|improve this answer




























        3












        3








        3







        Here's a different way... based on my answer at Highlighting text through stacked colored underlines



        documentclass{article}
        usepackage{stackengine}
        newlengthtmpln
        newlengthlunderset
        newlengthrulethick
        lunderset=1baselineskiprelax
        rulethick=.8ptrelax
        defstackalignment{l}
        newcommandnunderline[3][1]{setbox0=hbox{#2}tmpln=wd0%
        stackunder[#1lunderset-rulethick]{strut#2}{%
        smash{raisebox{-.6baselineskip}{makebox[0pt][l]{scriptsize #3}}}%
        rule{tmpln}{rulethick}}}%
        letNunnunderline
        letHShspace
        begin{document}
        Nun{Nun{Nun[3]{La}{Det}}{}}{}%
        Nun{Nun[4]{ }{}}{}%
        Nun{Nun{Nun[3]{novela}{N/Sust}}{}}{}%
        Nun{Nun[4]{ }{}}{}%
        Nun{Nun{Nun{Nun{Nun {que}{itshape nexo}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {me}{CI/SN}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun[2]{ }{PV/SV}}{CN/SAdj/Prop. Sub. Adj}}{S/SN}}{}%
        Nun{Nun{Nun{Nun{Nun {ha}{}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun { }{}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {regalado}{N/V}}{}}{}}{}}{}%
        Nun{Nun{Nun[3]{ }{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {mi}{Det}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {hermana}{HS{5ex}N}}{S/SN}}{}}{}}{OP}%
        Nun[5]{ }{}%
        Nun{Nun{Nun[3]{est'a}{N/V}}{}}{}%
        Nun{Nun[4]{ }{}}{}%
        Nun{Nun{Nun{Nun[2]{ambientada}{HS{7ex}N}}{Attrib/SAdj}}{HS{7ex}PN/SV}}{}%
        Nun{Nun[4]{ }{}}{}%
        Nun{Nun{Nun{Nun[2]{en}{E}}{HS{4ex}CCL/SPrep}}{}}{}%
        Nun{Nun{Nun[3]{ }{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {Australia}{HS{6ex}N}}{HS{3ex}T/SN}}{}}{}}{}%
        end{document}


        enter image description here






        share|improve this answer















        Here's a different way... based on my answer at Highlighting text through stacked colored underlines



        documentclass{article}
        usepackage{stackengine}
        newlengthtmpln
        newlengthlunderset
        newlengthrulethick
        lunderset=1baselineskiprelax
        rulethick=.8ptrelax
        defstackalignment{l}
        newcommandnunderline[3][1]{setbox0=hbox{#2}tmpln=wd0%
        stackunder[#1lunderset-rulethick]{strut#2}{%
        smash{raisebox{-.6baselineskip}{makebox[0pt][l]{scriptsize #3}}}%
        rule{tmpln}{rulethick}}}%
        letNunnunderline
        letHShspace
        begin{document}
        Nun{Nun{Nun[3]{La}{Det}}{}}{}%
        Nun{Nun[4]{ }{}}{}%
        Nun{Nun{Nun[3]{novela}{N/Sust}}{}}{}%
        Nun{Nun[4]{ }{}}{}%
        Nun{Nun{Nun{Nun{Nun {que}{itshape nexo}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {me}{CI/SN}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun[2]{ }{PV/SV}}{CN/SAdj/Prop. Sub. Adj}}{S/SN}}{}%
        Nun{Nun{Nun{Nun{Nun {ha}{}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun { }{}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {regalado}{N/V}}{}}{}}{}}{}%
        Nun{Nun{Nun[3]{ }{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {mi}{Det}}{}}{}}{}}{}%
        Nun{Nun{Nun{Nun[2]{ }{}}{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {hermana}{HS{5ex}N}}{S/SN}}{}}{}}{OP}%
        Nun[5]{ }{}%
        Nun{Nun{Nun[3]{est'a}{N/V}}{}}{}%
        Nun{Nun[4]{ }{}}{}%
        Nun{Nun{Nun{Nun[2]{ambientada}{HS{7ex}N}}{Attrib/SAdj}}{HS{7ex}PN/SV}}{}%
        Nun{Nun[4]{ }{}}{}%
        Nun{Nun{Nun{Nun[2]{en}{E}}{HS{4ex}CCL/SPrep}}{}}{}%
        Nun{Nun{Nun[3]{ }{}}{}}{}%
        Nun{Nun{Nun{Nun{Nun {Australia}{HS{6ex}N}}{HS{3ex}T/SN}}{}}{}}{}%
        end{document}


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 13 '17 at 12:36









        Community

        1




        1










        answered Apr 20 '14 at 16:38









        Steven B. SegletesSteven B. Segletes

        160k9204413




        160k9204413























            2














            For completeness, and in partial response to a query in the comments on my other answer, here is the tree set with prftree. As can be seen, this no more lends itself to typesetting this kind of tree than semantic. If anybody wants to typeset natural deduction proofs of this kind for logic, though, it looks like a really nice package with a lot of convenience commands, flexible customisation and a nice syntax. The tree here is very verbose because none of the convenience commands are appropriate: this is definitely a package intended for symbolic logic. The result is very, very slightly closer to the target tree in some ways than with semantic but the improvement is marginal, at best, and the result is even further from the target in other aspects.



            My conclusion is that none of bussproofs, semantic and prftree are well-suited to typesetting this kind of tree. The forest and stackengine solutions are definitely superior relative to the question desiderata.



            However, for logic, these package are superior to the other solutions offered here. They are designed for that purpose and will produce trees more easily and with less hassle. prftree looks especially good, even though this is the first time I've used it. The alignments and spacings are designed to work correctly out-of-the-box for logic, and prftree allows you to specify the tree using standard rules of inference, which makes it more readable, less verbose and more intuitive. My conclusion above is not, therefore, intended as a criticism of these packages. They just aren't designed for this sort of tree.



            documentclass[landscape]{article}
            usepackage[utf8]{inputenc}
            usepackage[T1]{fontenc}
            usepackage{prftree,geometry,mathtools}
            begin{document}

            [
            prftree{%
            prftree{%
            prftree{text{La}}{Det}
            }{%
            prftree{text{novela}}{N/Sust}
            }{%
            prftree{%
            prftree{%
            prftree{text{que}}{nexo}
            }{%
            prftree{text{me}}{CI/SN}
            }{%
            prftree{text{ha regalado}}{N/V}
            }
            {PV/SV}
            }{%
            prftree{%
            prftree{text{mi}}{Det}
            }{%
            prftree{text{hermana}}{N}
            }{S/SN}
            }
            {CN/SAdj/Prop. Sub. Adj}
            }
            {S/SN}
            }{
            prftree{%
            prftree{text{está}}{N/V}
            }{%
            prftree{%
            prftree{text{ambientada}}{N}
            }
            {Attrib/SAdj}
            }{%
            prftree{%
            prftree{text{en}}{E}
            }{%
            prftree{%
            prftree{text{Australia}}{N}
            }
            {T/SN}
            }
            {CCL/SPrep}
            }
            {PN/SV}
            }
            {OP}
            ]

            end{document}


            <code>prftree</code> proof






            share|improve this answer


























            • Another thing is that they all seem to default to math mode :o)

              – hftf
              Apr 14 '15 at 14:40











            • @hftf Again, given their purpose, that makes sense ;).

              – cfr
              Apr 14 '15 at 16:56











            • @cfr cannot you force the main sentence vertical alignment?

              – JFernan
              2 hours ago
















            2














            For completeness, and in partial response to a query in the comments on my other answer, here is the tree set with prftree. As can be seen, this no more lends itself to typesetting this kind of tree than semantic. If anybody wants to typeset natural deduction proofs of this kind for logic, though, it looks like a really nice package with a lot of convenience commands, flexible customisation and a nice syntax. The tree here is very verbose because none of the convenience commands are appropriate: this is definitely a package intended for symbolic logic. The result is very, very slightly closer to the target tree in some ways than with semantic but the improvement is marginal, at best, and the result is even further from the target in other aspects.



            My conclusion is that none of bussproofs, semantic and prftree are well-suited to typesetting this kind of tree. The forest and stackengine solutions are definitely superior relative to the question desiderata.



            However, for logic, these package are superior to the other solutions offered here. They are designed for that purpose and will produce trees more easily and with less hassle. prftree looks especially good, even though this is the first time I've used it. The alignments and spacings are designed to work correctly out-of-the-box for logic, and prftree allows you to specify the tree using standard rules of inference, which makes it more readable, less verbose and more intuitive. My conclusion above is not, therefore, intended as a criticism of these packages. They just aren't designed for this sort of tree.



            documentclass[landscape]{article}
            usepackage[utf8]{inputenc}
            usepackage[T1]{fontenc}
            usepackage{prftree,geometry,mathtools}
            begin{document}

            [
            prftree{%
            prftree{%
            prftree{text{La}}{Det}
            }{%
            prftree{text{novela}}{N/Sust}
            }{%
            prftree{%
            prftree{%
            prftree{text{que}}{nexo}
            }{%
            prftree{text{me}}{CI/SN}
            }{%
            prftree{text{ha regalado}}{N/V}
            }
            {PV/SV}
            }{%
            prftree{%
            prftree{text{mi}}{Det}
            }{%
            prftree{text{hermana}}{N}
            }{S/SN}
            }
            {CN/SAdj/Prop. Sub. Adj}
            }
            {S/SN}
            }{
            prftree{%
            prftree{text{está}}{N/V}
            }{%
            prftree{%
            prftree{text{ambientada}}{N}
            }
            {Attrib/SAdj}
            }{%
            prftree{%
            prftree{text{en}}{E}
            }{%
            prftree{%
            prftree{text{Australia}}{N}
            }
            {T/SN}
            }
            {CCL/SPrep}
            }
            {PN/SV}
            }
            {OP}
            ]

            end{document}


            <code>prftree</code> proof






            share|improve this answer


























            • Another thing is that they all seem to default to math mode :o)

              – hftf
              Apr 14 '15 at 14:40











            • @hftf Again, given their purpose, that makes sense ;).

              – cfr
              Apr 14 '15 at 16:56











            • @cfr cannot you force the main sentence vertical alignment?

              – JFernan
              2 hours ago














            2












            2








            2







            For completeness, and in partial response to a query in the comments on my other answer, here is the tree set with prftree. As can be seen, this no more lends itself to typesetting this kind of tree than semantic. If anybody wants to typeset natural deduction proofs of this kind for logic, though, it looks like a really nice package with a lot of convenience commands, flexible customisation and a nice syntax. The tree here is very verbose because none of the convenience commands are appropriate: this is definitely a package intended for symbolic logic. The result is very, very slightly closer to the target tree in some ways than with semantic but the improvement is marginal, at best, and the result is even further from the target in other aspects.



            My conclusion is that none of bussproofs, semantic and prftree are well-suited to typesetting this kind of tree. The forest and stackengine solutions are definitely superior relative to the question desiderata.



            However, for logic, these package are superior to the other solutions offered here. They are designed for that purpose and will produce trees more easily and with less hassle. prftree looks especially good, even though this is the first time I've used it. The alignments and spacings are designed to work correctly out-of-the-box for logic, and prftree allows you to specify the tree using standard rules of inference, which makes it more readable, less verbose and more intuitive. My conclusion above is not, therefore, intended as a criticism of these packages. They just aren't designed for this sort of tree.



            documentclass[landscape]{article}
            usepackage[utf8]{inputenc}
            usepackage[T1]{fontenc}
            usepackage{prftree,geometry,mathtools}
            begin{document}

            [
            prftree{%
            prftree{%
            prftree{text{La}}{Det}
            }{%
            prftree{text{novela}}{N/Sust}
            }{%
            prftree{%
            prftree{%
            prftree{text{que}}{nexo}
            }{%
            prftree{text{me}}{CI/SN}
            }{%
            prftree{text{ha regalado}}{N/V}
            }
            {PV/SV}
            }{%
            prftree{%
            prftree{text{mi}}{Det}
            }{%
            prftree{text{hermana}}{N}
            }{S/SN}
            }
            {CN/SAdj/Prop. Sub. Adj}
            }
            {S/SN}
            }{
            prftree{%
            prftree{text{está}}{N/V}
            }{%
            prftree{%
            prftree{text{ambientada}}{N}
            }
            {Attrib/SAdj}
            }{%
            prftree{%
            prftree{text{en}}{E}
            }{%
            prftree{%
            prftree{text{Australia}}{N}
            }
            {T/SN}
            }
            {CCL/SPrep}
            }
            {PN/SV}
            }
            {OP}
            ]

            end{document}


            <code>prftree</code> proof






            share|improve this answer















            For completeness, and in partial response to a query in the comments on my other answer, here is the tree set with prftree. As can be seen, this no more lends itself to typesetting this kind of tree than semantic. If anybody wants to typeset natural deduction proofs of this kind for logic, though, it looks like a really nice package with a lot of convenience commands, flexible customisation and a nice syntax. The tree here is very verbose because none of the convenience commands are appropriate: this is definitely a package intended for symbolic logic. The result is very, very slightly closer to the target tree in some ways than with semantic but the improvement is marginal, at best, and the result is even further from the target in other aspects.



            My conclusion is that none of bussproofs, semantic and prftree are well-suited to typesetting this kind of tree. The forest and stackengine solutions are definitely superior relative to the question desiderata.



            However, for logic, these package are superior to the other solutions offered here. They are designed for that purpose and will produce trees more easily and with less hassle. prftree looks especially good, even though this is the first time I've used it. The alignments and spacings are designed to work correctly out-of-the-box for logic, and prftree allows you to specify the tree using standard rules of inference, which makes it more readable, less verbose and more intuitive. My conclusion above is not, therefore, intended as a criticism of these packages. They just aren't designed for this sort of tree.



            documentclass[landscape]{article}
            usepackage[utf8]{inputenc}
            usepackage[T1]{fontenc}
            usepackage{prftree,geometry,mathtools}
            begin{document}

            [
            prftree{%
            prftree{%
            prftree{text{La}}{Det}
            }{%
            prftree{text{novela}}{N/Sust}
            }{%
            prftree{%
            prftree{%
            prftree{text{que}}{nexo}
            }{%
            prftree{text{me}}{CI/SN}
            }{%
            prftree{text{ha regalado}}{N/V}
            }
            {PV/SV}
            }{%
            prftree{%
            prftree{text{mi}}{Det}
            }{%
            prftree{text{hermana}}{N}
            }{S/SN}
            }
            {CN/SAdj/Prop. Sub. Adj}
            }
            {S/SN}
            }{
            prftree{%
            prftree{text{está}}{N/V}
            }{%
            prftree{%
            prftree{text{ambientada}}{N}
            }
            {Attrib/SAdj}
            }{%
            prftree{%
            prftree{text{en}}{E}
            }{%
            prftree{%
            prftree{text{Australia}}{N}
            }
            {T/SN}
            }
            {CCL/SPrep}
            }
            {PN/SV}
            }
            {OP}
            ]

            end{document}


            <code>prftree</code> proof







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 13 '17 at 12:35









            Community

            1




            1










            answered Apr 14 '15 at 14:28









            cfrcfr

            158k8191391




            158k8191391













            • Another thing is that they all seem to default to math mode :o)

              – hftf
              Apr 14 '15 at 14:40











            • @hftf Again, given their purpose, that makes sense ;).

              – cfr
              Apr 14 '15 at 16:56











            • @cfr cannot you force the main sentence vertical alignment?

              – JFernan
              2 hours ago



















            • Another thing is that they all seem to default to math mode :o)

              – hftf
              Apr 14 '15 at 14:40











            • @hftf Again, given their purpose, that makes sense ;).

              – cfr
              Apr 14 '15 at 16:56











            • @cfr cannot you force the main sentence vertical alignment?

              – JFernan
              2 hours ago

















            Another thing is that they all seem to default to math mode :o)

            – hftf
            Apr 14 '15 at 14:40





            Another thing is that they all seem to default to math mode :o)

            – hftf
            Apr 14 '15 at 14:40













            @hftf Again, given their purpose, that makes sense ;).

            – cfr
            Apr 14 '15 at 16:56





            @hftf Again, given their purpose, that makes sense ;).

            – cfr
            Apr 14 '15 at 16:56













            @cfr cannot you force the main sentence vertical alignment?

            – JFernan
            2 hours ago





            @cfr cannot you force the main sentence vertical alignment?

            – JFernan
            2 hours ago


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f172415%2fupside-down-syntax-trees-for-linguistics-with-horizontal-lines%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Can't compile dgruyter and caption packagesLaTeX templates/packages for writing a patent specificationLatex...

            Schneeberg (Smreczany) Bibliografia | Menu...

            Hans Bellmer Spis treści Życiorys | Upamiętnienie | Przypisy | Bibliografia | Linki zewnętrzne |...