# Straight diagonal rule by using Tikz and Tree diagrams [duplicate]

My code are follows:

\documentclass[10pt]{book}
\usepackage[T1]{fontenc}
\usepackage{newtxmath,newtxtext}
\usepackage{linguex}%
\usepackage{tikz}%
\usetikzlibrary{decorations.text,calc,arrows.meta}%
\usepackage{tikz-qtree}%

%\usepackage{showframe}
\begin{document}

\ex.
\Tree [.CauseP [.DP \edge[roof]; {the zog'} ] [ [.{\scshape
cause} ] [ [.{\scshape past} ] [.vP \edge[roof]; {dissolved the
house'} ]]] ]

Throughout this monograph, I will
focus on the reusable linguistic ingredients of the system and how
they are efficiently deployed in the recursive combinatorics in
building propositions. Reusability (and by extension polysemy)
will be a seen as a design feature of the system rather than a
bug. As a methodological principle, then, I will be guided by the
fact of polysemous items and seek analytic unities to underlie
them.

\ex. \textit{Achievements and accomplishments with result states}\\
%\begin{tikzpicture}[baseline=(current bounding box.north)]
\Tree [.InitP [.{\textsc{initiator}} ] [ [.Init ] [.ProcP
[.{\textsc{undergoer}} ] [ [.Proc ] [.ResP
[.{\textsc{resultee}} ] [ [.Res ] [.XP \edge[roof];
{\sc ground/final state} ] ] ] ] ] ] ]
%\end{tikzpicture}

\end{document}


and the output came as:

Is this possible to make the diagonal lines to be straight as marked in the below picture?

Diagonal line should be straight in all Trees. Please suggest...

• Similar question for forest: tex.stackexchange.com/questions/391820/… – Torbjørn T. Dec 13 '17 at 13:20
• @TorbjørnT. That case is rather more complicated. I think nice empty nodes and an adjustment to the edge angles is all that's needed for a Forest solution in this case. There is probably a better link, but I've posted an illustration here rather than trying to find it :-). – cfr Dec 13 '17 at 23:43
• \sc is deprecated by more than a couple of decades and ought not be used with LaTeX 2e. – cfr Dec 13 '17 at 23:44
• @cfr On the more general forest solution, I think A nice empty node with nice nodes in forest? is appropriate. But since this question is about tikz-qtree specifically, I think it's a duplicate of "Kinks" in long tikz-qtree branches. – Alan Munn Dec 14 '17 at 1:12

Forest can do this - sort of - if that's an option. However, Forest's trees tend to be rather more ungainly by default, at least in a range of pertinent cases.

Here's an example using nice empty nodes:

\documentclass[border=10pt]{standalone}
\usepackage[linguistics]{forest}
\begin{document}
\begin{forest}
scshape/.style={font=\scshape},
nice empty nodes,
for tree={
calign angle=50,
}
[CauseP
[DP[the zog', roof]]
[[cause, scshape]
[[past, scshape][vP[dissolved the house', roof]]
]
]
]
\end{forest}
\end{document}

• Many thanks to all, its working fine, but is this possible to make the requirement without using the forest.sty, please suggest.... – MadyYuvi Dec 14 '17 at 6:47
• @MadyYuvi Yes. Just use the solution Alan Munn linked you to for the package you're using. Alan's answer there provides solutions for both packages. – cfr Dec 16 '17 at 4:48