Ich habe folgenden Baum erstellt:

Open in Online-Editor
Code, hier editierbar zum Übersetzen:
\begin{tikzpicture}[->,>=stealth',level/.style={sibling distance = 2cm,
level distance = 1.5cm}]
\node {@}
child{ node {@}
child{ node {$\lambda$}
child{ node {x} }
child{ node {$\mathrm{case_{List}}$}
child {node {x}}
child {node {2}}
child {node {3}}}
}
child{ node [sibling distance = 20cm] {Cons}
child{ node {$\lambda$}
child {node {z}}
child {node {z}}}
child{ node {Nil}}
}
}
child{ node {True}
}
;
\end{tikzpicture}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Irgendwie funktioniert das nicht, dass der Abstand zwischen Cons und lambda größer wird. Deswegen überschneiden sich da die Kinder :/

gefragt 01 Nov '15, 20:48

Maedel's gravatar image

Maedel
11111
Akzeptiert-Rate: 0%

bearbeitet 01 Nov '15, 20:49

1

Herzlich willkommen in der TeXwelt!Bitte gib immer ein vollständiges Minimalbeispiel an. Also ein möglichst kurzes, aber komplettes Dokument, von \documentclass{...} bis zu \end{document}, was das Problem zeigt. Das vereinfacht die Bearbeitung erheblich.

(01 Nov '15, 21:56) esdd

Es gibt übrigens \textsubscript für tiefer gestellten Text im Textmodus. Wenn x, 2, True etc. nicht im Mathemodus gesetzt werden, würde ich das für case\textsubscript{List} verwenden.

(03 Nov '15, 12:05) saputello

Verwende die das geänderte sibling distance als Option von child statt von node:

Open in Online-Editor
Code, hier editierbar zum Übersetzen:
\documentclass[tikz,margin=5pt]{standalone}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[->,>=stealth',
level/.style={sibling distance = 2cm,level distance = 1.5cm}
]
\node {@}
child{ node {@}
child{ node {$\lambda$}
child{ node {x} }
child{ node {$\mathrm{case_{List}}$}
child {node {x}}
child {node {2}}
child {node {3}}}
}
child[sibling distance = 10cm]{node {Cons}
child{ node {$\lambda$}
child {node {z}}
child {node {z}}}
child{ node {Nil}}
}
}
child{ node {True}
}
;
\end{tikzpicture}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

alt text

Hier ist mal außerdem noch eine alternative Darstellungsmöglichkeit:

Open in Online-Editor
Code, hier editierbar zum Übersetzen:
\documentclass[tikz,margin=5pt]{standalone}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[
->,>=stealth',
level/.style={level distance=1.5cm,sibling distance=2cm},
level 2/.style={sibling distance=5cm},
level 4/.style={sibling distance=1cm}
]
\node {@}
child{ node {@}
child{ node {$\lambda$}
child{ node {x} }
child{ node {$\mathrm{case_{List}}$}
child {node {x}}
child {node {2}}
child {node {3}}}
}
child{ node {Cons}
child{ node {$\lambda$}
child {node {z}}
child {node {z}}}
child{ node {Nil}}
}
}
child{ node {True}
}
;
\end{tikzpicture}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

alt text

Permanenter link

beantwortet 01 Nov '15, 21:53

esdd's gravatar image

esdd
17.8k284257
Akzeptiert-Rate: 62%

Zum Spaß mit TikZ graphdrawing.

Open in Online-Editor
Code, hier editierbar zum Übersetzen:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
\begin{document}
\begin{tikzpicture}
\graph [fresh nodes,tree layout] {
"@" -> {
"@" -> {
"$\lambda$" -> {
"x", "$\mathrm{case_{List}}$" -> {
"x", "2", "3"
}
},
"Cons" -> {
"$\lambda$" -> {
"z", "z"
},
"Nil"
}
},
"True"
}
};
\end{tikzpicture}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

alt text

Permanenter link

beantwortet 02 Nov '15, 23:26

Henri's gravatar image

Henri
15.7k133943
Akzeptiert-Rate: 46%

bearbeitet 02 Nov '15, 23:30

Deine Antwort
[Vorschau ausblenden]

Folgen dieser Frage

Per E-Mail:

Wenn sie sich anmelden, kommen Sie für alle Updates hier in Frage

Per RSS:

Antworten

Antworten und Kommentare

Frage-Themen:

×731
×11

gestellte Frage: 01 Nov '15, 20:48

Frage wurde gesehen: 14,354 Mal

zuletzt geändert: 03 Nov '15, 12:05

Willkommen, erstes Mal hier? Schau mal unter FAQ!

×