TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a tree using TikZ and would like to add tabular explanation data to the right of it.

The figure definition currently looks like this:


...and renders to the following tree:


The explanation text is defined as follows:

\begin{tabular}{l l}
  A = 100 & p = 0.2 \\
  B = 1101 & p = 0.1 \\
  C = 1100 & p = 0.1 \\
  D = 111 & p = 0.2 \\
  E = 0 & p = 0.4 \\

CEBA: 1100 / 0 / 1101 / 100

...and renders to:


I tried both placing the figure in a table and floating the figure using the wrapfig package, but both attempts were not fruitful.

How can I add the explanation text to the right of the figure (like in simple HTML table layout)?

share|improve this question
Hi Danilo. It is always preferable to post complete minimal working examples rather than code snippets because this helps people to answer you. – Claudio Fiandrino Dec 30 '12 at 13:28
@ClaudioFiandrino thanks, I'll do that next time! :) – Danilo Bargen Dec 30 '12 at 13:34
up vote 1 down vote accepted

As you don't give a caption to the figure and try to fix it at the position in text with the [!h] parameter, you maybe won't need the figure environment at all. You could consider my example code below, where I replaced your figure with some text as you don't give the source code of it.

The image
\begin{tabular}{l l}
  A = 100 & p = 0.2 \\
  B = 1101 & p = 0.1 \\
  C = 1100 & p = 0.1 \\
  D = 111 & p = 0.2 \\
  E = 0 & p = 0.4 \\

CEBA: 1100 / 0 / 1101 / 100

This renders as follows:

enter image description here

share|improve this answer
[!h] doesn't fix the position of the figure, it can still float. – Torbjørn T. Dec 30 '12 at 13:43
Thanks for your answer. This seems to work using the standalone documentclass, but not inside the normal scrartcl class. Is there a way to fix this, or do I have to include the standalone file in the main document? – Danilo Bargen Dec 30 '12 at 13:44
@TorbjørnT. right, I should have written "try to fix it". – Benedikt Bauer Dec 30 '12 at 13:47
@DaniloBargen Benedikt's code works fine in scrartcl as well, so there is something else that's wrong. – Torbjørn T. Dec 30 '12 at 13:48
@DaniloBargen What exactly does not work? Do you get errors or warnings? Does it render correctly? If you get an overfull box warning you have to add a % sign right after the first \end{minipage}. I will edit my post to take this into account. – Benedikt Bauer Dec 30 '12 at 13:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.