I'm unable to see your attachment, but if I understand what you want, the
simplest approach is to create "phantom" nodes in the tree. This can be
achieved with "child [missing]" as in the following examples:
First, a simple tree with two nodes: A and B; A is the root, and B is
directly below it:
\begin{tikzpicture}
\node {A}
child {node {B}};
\end{tikzpicture}
Then with node B towards the left:
\begin{tikzpicture}
\node {A}
child {node {B}}
child [missing];
\end{tikzpicture}
and now, with B towards the right:
\begin{tikzpicture}
\node {A}
child [missing]
child {node {B}};
\end{tikzpicture}
Now, with your example (I changed the numbers in the nodes, for reference):
\begin{tikzpicture}
\node {$1.~\neg ((p \lor (p \land q)) \limp p)$}
child {node {$2.~ p \lor (p \land q)$}
child [missing]
child {node {$3.~ \neg p $}
child {node {$4.~ \ p $}}
child {node {$5.~ p \land q$}
child [missing]
child {node {$6.~ p $}
child {node {$7.~ q $}}
child [missing]}}}}
child [missing];
\end{tikzpicture}
As indicated in the examples above, the position of the "child [missing]"
relative to its siblings determines where you get the child nodes. Of
course you can also add any number of missing children, which increases the
angle:
\begin{tikzpicture}
\node {A}
child [missing]
child [missing]
child {node {B}};
\end{tikzpicture}
Furthermore, you can control the distance between sibling nodes:
\begin{tikzpicture}[sibling distance=4cm]
\node {A}
child {node {B}}
child {node {C}};
\end{tikzpicture}
and even the distance between levels:
\begin{tikzpicture}[sibling distance=4cm,level distance=5cm]
\node {A}
child {node {B}}
child {node {C}};
\end{tikzpicture}
On Mon, Oct 28, 2013 at 4:06 PM, William Hanson <[email protected]> wrote:
> Dear LyX Colleagues,
>
> I'm still trying to create tableau proofs, which are branching columns of
> text, as illustrated in the attachment.
>
> Ernesto Posse's sample tableau (below) is helpful, but it contains two
> features I don't want:
>
> 1. Two sentences at a node, separated by commas. I want just one
> sentence at each node, as in the attached sample. I've been figured out
> how to solve this problem by modifying Ernesto's code as follows:
>
> \def\land{\wedge}
> \def\lor{\vee}
> \def\limp{\to}
> \begin{tikzpicture}
> \node {$1\neg ((p \lor (p \land q)) \limp p)$}
> child {node {$ 1 p \lor (p \land q)$}
> child {node {$1 \neg p $}
> child {node {$1 \ p $}}
> child {node {$1 p \land q$}
> child {node {$1 p $}
> child {node {$1 q $}}}}}};
> \end{tikzpicture}
>
> 2. But the foregoing code retains another feature I don't want: vertical
> lines from node to node when there is no branching. I want only the
> (approximately) 45 degree (and 315 degree) lines that indicate branching,
> as on the attached sample.
>
> I've used LyX for several years, but I don't know LaTeX.
>
> Any and all help appreciated.
>
> Bill
>
>
>
>
>
> [image: Sample
> Tableau.pdf]<https://mail.google.com/mail/u/0/?ui=2&ik=fcb7343f58&view=att&th=141e0e8e8016ae7f&attid=0.1&disp=safe&realattid=f_hn3bnlm80&zw>
> *Sample Tableau.pdf*
> 146K
> View<https://docs.google.com/viewer?a=v&pid=gmail&attid=0.1&thid=141e0e8e8016ae7f&mt=application/pdf&authuser=0&url=https://mail.google.com/mail/u/0/?ui%3D2%26ik%3Dfcb7343f58%26view%3Datt%26th%3D141e0e8e8016ae7f%26attid%3D0.1%26disp%3Dsafe%26realattid%3Df_hn3bnlm80%26zw&sig=AHIEtbQpDR5qvKd2TSh_O5cOhrpoG-Owmg>
> Download<https://mail.google.com/mail/u/0/?ui=2&ik=fcb7343f58&view=att&th=141e0e8e8016ae7f&attid=0.1&disp=safe&realattid=f_hn3bnlm80&zw>
>
> Ernesto Posse <[email protected]>
> Oct 22 (6 days ago)
>
> to me, lyx-users
> Hello. The easiest (and nicest) way to do this is using the tikz package:
> in the preamble put
>
> \usepackage{tikz}
>
> and then, wherever you want the tableau, put in a TeX box the following:
>
> \def\land{\wedge}
>
> \def\lor{\vee}
>
> \def\limp{\to}
>
> \begin{tikzpicture}
>
> \node {$\{\neg ((p \lor (p \land q)) \limp p)\}$}
>
> child {node {$\{p \lor (p \land q), \neg p\}$}
>
> child {node {$\{p\}$}}
>
> child {node {$\{p \land q\}$}
>
> child {node {$\{p,q\}$}}}};
>
> \end{tikzpicture}
>
>
> Note that the structure of the tree depends on the grouping braces { ... }.
>
>
> Richard Heck <[email protected]>
> Oct 22 (6 days ago)
>
> to Ernesto, me, lyx-users
> There are lots of useful resources about this here:
> http://www.logicmatters.net/latex-for-logicians/trees/
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
--
Ernesto Posse
Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada