2

Is it possible to format a table so that in one column you get some text over multiple rows where the text appears vertically oriented from bottom to top or vice versa? In this case, given should be that column and the text size should be appropriate for several-rows span.

\begin{center}
\begin{tabular}{r|c|r|r|l|l|l|r|l}
\multicolumn{1}{c|}{$i$} & class & \multicolumn{1}{c|}{$x_i$} & \multicolumn{1}{c|}{$f_i$} & \multicolumn{1}{c|}{$f_{r_i} = \frac{f_i}{n+1}$} & \multicolumn{1}{c|}{$\Phi_i = \sum\limits_{i=1} f_{r_i}$} & \multicolumn{1}{c|}{$f_{tr_i}$} & \multicolumn{1}{c|}{$f_{t_i} = n \cdot f_{tr_i}$} & \multicolumn{1}{c}{$F_i = \sum\limits_{i=1} f_{tr_i}$} \\\hline
1                       & 14–18 & 16                        & 28                        &                              &                                   & given                          & 27,7                         &                                    \\
2                       & 18–22 & 20                        & 18                        &                              &                                   & given                          & 18,3                         &                                    \\
3                       & 22–26 & 24                        & 11                        &                              &                                   & given                          & 11,05                        &                                    \\
4                       & 26–30 & 28                        & 9                         &                              &                                   & given                          & 6,5                          &                                    \\
5                       & 30–34 & 32                        & 2                         &                              &                                   & given                          & 3,8                          &                                    \\
6                       & 34–38 & 36                        & 2                         &                              &                                   & given                          & 2,2                          &                                    \\
7                       & 38–42 & 40                        & 0                         &                              &                                   & given                          & 1,9                          &                                    \\
8                       & 42–46 & 44                        & 1                         &                              &                                   & given                          & 0,7                          &                                    \\
9                       & 46–50 & 48                        & 1                         &                              &                                   & given                          & 0,43                         &                                    \\
10                      & 50–52 & 52                        & 1                         &                              &                                   & given                          & 0,24                         &                                   
\end{tabular}
\end{center}

Or here, how to span the text given, again, preferably in bigger font size, over several columns?

\begin{center}
\begin{tabular}{c|cccccc}
    T                                    & 2    & 5    & 10   & 25   & 50   & 100  \\ \hline
    $x_T$                                & given & given & given & given & given & given \\
    $x'_T$                               &      &      &      &      &      &      \\
    $x''_T$                              &      &      &      &      &      &      \\
    $\displaystyle\frac{B}{\sqrt{n}}$ & given & given & given & given & given & given
\end{tabular}
\end{center}

Thank you so much!

2

Perhaps something like this?

\documentclass{article}
\usepackage{multirow, rotating, graphicx}
\usepackage{siunitx, makecell, bigstrut}

\begin{document}

\begin{center}
\sisetup{table-format=2.2, output-decimal-marker={,}}
\setcellgapes{2pt}\makegapedcells
\begin{tabular}{r|c|r|r|l|c|l|S|l}
\multicolumn{1}{c|}{$i$} & class & \multicolumn{1}{c|}{$x_i$} & \multicolumn{1}{c|}{$f_i$} & \multicolumn{1}{c|}{$f_{r_i} = \frac{f_i}{n+1}$} & \multicolumn{1}{c|}{$\Phi_i = \sum\limits_{i=1} f_{r_i}$} & \multicolumn{1}{c|}{$f_{tr_i}$} & \bigstrut{$f_{t_i} = n \cdot f_{tr_i}$} & \multicolumn{1}{c}{$F_i = \sum\limits_{i=1} f_{tr_i}$} \\\hline
\bigstrut[t] 1 & 14–18 & 16 & 28 & & & \multirow{11}{*}{\Large \hspace{0.2ex}\rotatebox{90}{given}} & 27,7 & \\%
2 & 18–22 & 20 & 18 & & & & 18,3 & \\
3 & 22–26 & 24 & 11 & & & & 11,05 & \\
4 & 26–30 & 28 & 9 & & & & 6,5 & \\
5 & 30–34 & 32 & 2 & & & & 3,8 & \\
6 & 34–38 & 36 & 2 & & & & 2,2 & \\
7 & 38–42 & 40 & 0 & & & & 1,9 & \\
8 & 42–46 & 44 & 1 & & & & 0,7 & \\
9 & 46–50 & 48 & 1 & & & & 0,43 & \\
10 & 50–52 & 52 & 1 & & & & 0,24 &
\end{tabular}
\end{center}

\end{document} 

enter image description here

0

Bernard, thank you very much!

Here is what I did in the end:

\begin{center}
\sisetup{table-format=2.2, output-decimal-marker={,}}
\setcellgapes{2pt}\makegapedcells
\begin{tabular}{rcrrlclSl}
\multicolumn{1}{c}{$i$} & classes & \multicolumn{1}{c}{$x_i$} & \multicolumn{1}{c}{$f_i$} & \multicolumn{1}{c}{${\scriptstyle f_{r_i} = \frac{f_i}{n+1}}$} & \multicolumn{1}{c}{${\scriptstyle\Phi_i = \sum\limits_{i=1} f_{r_i}}$} & \multicolumn{1}{c}{$f_{tr_i}$} & \bigstrut{${\scriptstyle f_{t_i} = n \cdot f_{tr_i}}$} & \multicolumn{1}{c}{${\scriptstyle F_i = \sum\limits_{i=1} f_{tr_i}}$} \\\midrule
\bigstrut[t] 1 & 14–18 & 16 & 28 & & \multirow{11}{*}{  \hspace{0.2ex}\rotatebox{90}{not wanted}} & \multirow{11}{*}{ \hspace{0.2ex}\rotatebox{90}{Scientific WorkPlace}} & 27,7 & \multirow{11}{*}{\hspace{0.2ex}\rotatebox{90}{not wanted}}\\%
2 & 18–22 & 20 & 18 & & & & 18,3 & \\
3 & 22–26 & 24 & 11 & & & & 11,05 & \\
4 & 26–30 & 28 & 9 & & & & 6,5 & \\
5 & 30–34 & 32 & 2 & & & & 3,8 & \\
6 & 34–38 & 36 & 2 & & & & 2,2 & \\
7 & 38–42 & 40 & 0 & & & & 1,9 & \\
8 & 42–46 & 44 & 1 & & & & 0,7 & \\
9 & 46–50 & 48 & 1 & & & & 0,43 & \\
10 & 50–52 & 52 & 1 & & & & 0,24 &

\end{tabular} \end{center}

However, I don’t seem to be able to center the text in the last column.

Do you know what I’m doing wrong?

  • that is not really an answer ... try to edit your question and put it content to it. – Zarko Jun 27 '16 at 14:26

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.