1

I need to connect tables with an arrow and would like to have text over the arrow. It should more or less look like this:

table <--- table <--- table <--- "some short text".

Each table is just a small balance sheet:

\caption*{Bank \\XYZ}
\begin{tabular}{|m{1cm}|m{1cm}|}
\multicolumn{1}{c}{A} &\multicolumn{1}{c}{L} \\
\hline
& \\
& \\
Some text & some text \\
& \\
& \\
\hline
\end{tabular}

The arrows should be in the middle

I tried to implement this in a subfig environment with three separated tables, but it didn't really work out. Moreover I didn't figure how to center the text horizontally ;-) ! I have the empty rows because I don't know how to set the column length manually.

So if anyone has in can help me out, this is of course highly appreciated.

1

Like this?

enter image description here

he MWE below should be self explanatory ...

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{array}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\usepackage{caption}

\begin{document}
    \begin{table}
\caption*{Bank \\XYZ}
\begin{tabular}{|@{}l@{} % <-- faked column, serves determining  for second row cells' height
                *{2}{M{1cm}|}}
\hline
&   A           &   L       \\
\hline
\rule[-3.5em]{0pt}{7em}
& som text      & some longer text  \\
    \hline
\end{tabular}
    $\longleftarrow$
\begin{tabular}{|@{}l@{}*{2}{M{1cm}|}}
\hline
&   A           &   L       \\
\hline
\rule[-3.5em]{0pt}{7em}
&    Some text   & some text \\
    \hline
\end{tabular}
    $\longleftarrow$
\begin{tabular}{|@{}l@{}*{2}{M{1cm}|}}
\hline
&   A           &   L       \\
\hline
\rule[-3.5em]{0pt}{7em}
&    Some text   & some more longer text \\
    \hline
\end{tabular}
    $\longleftarrow$
some short text in one line
    \end{table}
\end{document}

Column types of table are not very clear expressed, so I assume, that columns had to be vertical and horizontal centered. Table with out option are vertically centered regard to baseline (the same is achieved with position option m:

\begin{tabular}[m]{|@{}l@{}*{2}{M{1cm}|}}

is the text on the right side table has more lines, it had to be set in \parbox or in table, for example:

 ...
    $\longleftarrow$
\begin{tabular}[m]{m{3cm}}
no so short text in two lines ...
\end{tabular}

enter image description here

Edit: the formating of table is now changed so, that tables still have the same height regardles ov text lines in the cells in the second row. This is achieved with added one more column in which is placed rule of zero width and 7em heght. If you need more height, than accordongly change rule size.

5
  • thank you very much! When the texts in the columns differ in length, than so do the tables. Do you have a suggestion how to have tables with the same column length and width starting in the same line and all having a caption?! Sorry for not specifying this before! If this includes tikz, fill free, I am glad for any advice.
    – Jannik
    Dec 12 '16 at 11:27
  • I wass afraid that your recent request will be an issue ... this will not change align of table, however, the table will not have the same heights anymore. This can solved ... see edited answer.
    – Zarko
    Dec 12 '16 at 14:24
  • very cool! thank a lot! any idea how to add a caption to every single balance sheet (which have different length and should not be in the frame)? I am playing around with multicolumn but that does not give the desired outcome.
    – Jannik
    Dec 13 '16 at 10:15
  • @Jannik, this almost new question ... for captions of tables you need to decide do tables have subcaptions or caption. In the first case you encapsulate them into subtables or subfloats, in the second case in minipages with caption. See my answer on question tex.stackexchange.com/questions/343748/….
    – Zarko
    Dec 13 '16 at 15:14
  • yes stupid question. I achieved the desired result. Thank you very much for your help.
    – Jannik
    Jan 17 '17 at 10:08

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.