2

I'm trying to build a table containing text, equations and diagrams like this one:

I know how to make the diagrams using the figure+tikzpicture environment and also how to make tables with table+tabular environment. But just inserting one into the other didn't work.

Is there a standard solution for this?

4
  • 2
    And what you try so far? – Zarko Nov 23 '20 at 19:24
  • @Zarko I've made the table the way I usually do and tried to insert the diagram in a cell, but it didn't work. – rmdmc89 Nov 23 '20 at 19:29
  • 1
    Dynkin diagrams can be conveniently produced with the dynking-diagrams package. – user228539 Nov 23 '20 at 19:29
  • Well, thabn show what you try, then we can more easily help you. It may only need to be added baseline option to your picture, – Zarko Nov 23 '20 at 19:33
2
\documentclass[]{standalone}
%\usepackage{tikz}
\usepackage{dynkin-diagrams}


\begin{document}

\begin{tabular}{|c|c|}
\hline
 text &  \dynkin[fold right,label,edge length=.75cm]D8 \\
\hline
 &  \\
\hline
\end{tabular}


\end{document}
1

I think I've got your solution using Tikz

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{table}[h]
\centering
\begin{tabular}{|c|c|} \hline
Hello &  Tikz Diagram \\ \hline
This is text & 
%Now here i put the command \tikz, that allows you to draw outside tikzpicture and figure.
\tikz[baseline=-0.5ex]{% <-- Here I open tikz code.
\coordinate (A) at (0,0);
\coordinate (B) at (1,0);
\fill (A) circle (2pt);
\fill (B) circle (4pt);
\draw (A) -- (B);
}% <-- Here I close the tikz code
\\ \hline
    \end{tabular}
\end{table}

\end{document}

Tikz in table

1

As suggested @abcdefg in his comment, use of dynkin-diagrams package can be very convenient for drawing your images in table. For example:

\documentclass{article}
\usepackage[edge length=8mm]{dynkin-diagrams}

\begin{document}
\[
    \begin{array}{|l|l|l|}
    \hline
r=0,1   &   I_3^*   &  \dynkin B3   \\
    \hline
r=0,1,2 &   I_2^*   &  \dynkin[label,
                               label macro/.code={\alpha_{\drlap{#1}}}]D5\\
    \hline
    \end{array}
\]
\end{document}

enter image description here

To make yourself more familiar with this package, read package documentation Dynkin Diagrams

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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