Tag Info

4

I present two solutions. The first uses the standard TikZ tree syntax. The second uses the powerful tree-drawing package, forest. TikZ The problem has nothing to do with the fact that you are not drawing the edge. The problem is that you cannot modify the edge from parent style in that way. edge from parent is both and edge drawing operation and a style. ...

2

Just as a supplement to Sašo Živanović's answer, note that if you use math content, you do not need to specify maths mode within every node of the tree: \documentclass[tikz,border=10pt]{standalone} \usepackage{forest} \begin{document} \begin{forest} before typesetting nodes={ where n children=0{ if content={\epsilon}{}{ append={ ...

2

This preamble will do the trick: before typesetting nodes={ where n children=0{ if content={$$\epsilon$$}{}{ append={ [x,tier=terminal,edge=dotted,content/.pgfmath=content("!u")] } } }{} }

4

Edit: After clarifying, what is the problem, I suggest to try the following: \documentclass[border=3mm,tikz,preview]{standalone} \begin{document} \begin{tikzpicture}[every node/.style={circle,draw}] \node (r) {$r$} child { node (T1) {$T_1$} } child {node {$\ldots$} edge from parent[draw=none]} child { node (Tn) {$T_n$} }; ...

4

I adapted egreg’s answer and ported it to ConTeXt. This is feasible in this case, because bussproofs was written to be also compatible to plain TeX, which makes it way easier. Unfortunately, the developer of bussproofs thought it was a good idea to define his own \newcount, which results in this ugly hack in the first lines of the example. If the slash in ...

2

There are several packages to draw proof trees in LaTeX, e.g., bussproofs, ebproof,prftrees. Here is a solution using bussproofs to draw the proof tree and cancel to slash one of the assumption. \documentclass[11pt]{article} \usepackage{bussproofs} \usepackage{cancel} \begin{document} \begin{prooftree} \AxiomC{\qquad\textcircled{\scriptsize1}} \noLine ...

2


2

The ebproof package is indeed handy. The only drawback it that I was'nt able to align all the lines of the inference rules. Some twicking with tikz could help you to achieve that, but, in the meantime, that is what you could get: \documentclass{article} \usepackage{ebproof} % \usepackage{tikz} % Useless, but might be handy to draw fancier lines. ...

1

Another solution is to use saveboxes: \documentclass[ ,crop=true ,varwidth=\maxdimen ]{standalone} \usepackage{forest} \newsavebox{\tempbox} \begin{document} \savebox{\tempbox}{A\tikz{\node[circle,draw,inner sep=.15ex]{1};}} \Forest{ [\usebox{\tempbox} [B] [C]] } \end{document}

2

Nesting tikzpicture environments should be avoided. It guarantees unpredictability ;). However, there is a straightforward way to do this using forest which provides a tikz key for adding annotations to nodes after the tree is drawn: \documentclass[border=10pt,tikz]{standalone} \usepackage{forest} \usetikzlibrary{positioning} \begin{document} \Forest{ ...

2

Your answer will work but is needlessly verbose as you can simply use relative node names to specify the edge path. \noexpand\path[\forestoption{edge}](!u.parent anchor) -- +(5pt,0) |- (.child anchor)\forestoption{edge label};}, (!u) refers to the parent of the current node. () refers to the current node. You can also align the terminal nodes for ...

3

This solution uses an experimental package, justtrees, based on forest. More specifically, it uses version 0.5. Please ask if you wish to use it. I am really using questions here to test it, but I can provide the code to the foolhardy. (An older version is around here somewhere but won't suffice for this example.) One key advantage of forest is the ...

1

Actually, tikz is not that bad... After looking a little more at the manuel and few test here it is -- +(8pt,0) |- or complete version: edge path={\noexpand\path[\forestoption{edge}] (\forestOve{\forestove{@parent}}{name}.parent anchor) -- +(8pt,0) |- (\forestove{name}.child anchor)\forestoption{edge label};} From what i understand, -- is for drawing ...

1

I played with this a bit: \documentclass[a4paper,10pt]{book} \usepackage[ngerman]{babel} % Deutsche Sprachanpassungen \usepackage[utf8]{inputenc} % Direkte Angabe von Umlauten im Dokument. \usepackage[left=1.0cm,right=1cm,top=1cm,bottom=1cm,includeheadfoot]{geometry} \usepackage{tikz} \usepackage{color} \usetikzlibrary{positioning} \begin{document} ...

1

Here is a solution which uses the powerful forest package. I have created two versions. The first uses the package currently on CTAN and in TeX distributions. The second uses the new beta version currently being tested and available on Git Hub. For now, I present the first solution: \documentclass[tikz,border=10pt]{standalone} \usepackage{forest} ...

4

I think you will be more comfortable with dirtree package as in Henri's answer. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,shapes,positioning,shadows} \begin{document} \begin{tikzpicture}[>=latex] \node[anchor=west] (c1) {Here is text}; \node [below right = of c1.south west] (c11) {Hello}; \node [below=of c11.west,anchor=west] ...

3

Would this dirtree solution fit your needs? \documentclass{article} \usepackage{dirtree} \renewcommand\DTstyle{} \begin{document} \dirtree{% .1 . .2 Here is text. .3 Hello. .3 Hello. .3 Hello. .3 Hello. .2 This is some more text. .3 Hello. .3 Hello. .3 Hello. } \end{document}

0

After years avoiding tikz because I thought it was complicated (having used latex for 20 years), I moved to it, because my 2nd month intern, who never used latex before, got into it so fast. So it might be worth some of your time. Pointers: Genogram or family tree with PGF/TikZ Typesetting genealogical trees TeXample: A family tree

Top 50 recent answers are included