0

I want to make my table look ike this, but also align the lines of the cells wit rotated text

enter image description here

3
  • 1
    Welcome to TeX. SE! What you try so far? Please, be so kind and post a minimal, yet complete, example code illustrating your problem? Content you can rotate by employing rotate and makecell packages, or by rotatebox defined in the graphicx package.
    – Zarko
    Dec 6, 2020 at 1:10
  • 1
    And. What mean exactly "also align the line of the cells with rotated text"? That cell are aligned with the horizontal center and they are aligned with the bottom of the cell. So?
    – Fran
    Dec 6, 2020 at 8:59
  • Any news? You receive two answer .. does any of them solve your problem satisfactorily. If, please accept it (by clicking on the check mark at top left side of selected answer).
    – Zarko
    Jan 24, 2021 at 15:21

2 Answers 2

1

Do you mean a table like this:

\documentclass{article}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{caption}
\captionsetup{%
    labelsep=colon,
    justification=raggedright,
    labelfont=default,
    singlelinecheck=off
}


\begin{document}
    
    \begin{table}[]
        \centering
        \resizebox{0.8\textwidth}{!}{
        \begin{minipage}{\textwidth}
        \caption{Table description}
        \label{Some Table}
        \begin{tabular}{|c|c|c|c|c|c|cc|ccc|}
            \hline
            \multicolumn{11}{|c|}{Complete name}                                                                                                  \\ \hline
            \multicolumn{11}{|c|}{Description}                                                                                                    \\ \hline
            \multirow{4}{*}{Exam} &
            \multirow{4}{*}{Assistance} &
            \multirow{4}{*}{Questionary} &
            \multirow{4}{*}{Homework} &
            \multirow{4}{*}{Second Program} &
            \multirow{4}{*}{Frist Program} &
            \multicolumn{2}{c|}{Grup Characters} &
            \multicolumn{1}{l}{Comments} &
            &
            \\ \cline{9-10}
            &    &    &    &    &    & \multicolumn{2}{l|}{Date:}                          & \multicolumn{1}{l}{S}  & \multicolumn{1}{c|}{} &  \\ \cline{9-9}
            &    &    &    &    &    & \multicolumn{2}{l|}{Serial No:}                     & \multicolumn{1}{l|}{U} & \multicolumn{1}{c|}{} &  \\
            &    &    &    &    &    & \multicolumn{1}{l}{No:} & \multicolumn{1}{l|}{Name} & \multicolumn{1}{l|}{}  & \multicolumn{1}{c|}{} &  \\ \hline
            10 & 10 & 10 & 10 & 10 & 10 & \multicolumn{1}{c|}{1}  & Jane Doe                  & \multicolumn{1}{c|}{}  & \multicolumn{1}{c|}{} &  \\ \hline
            9  & 9  & 9  & 9  & 9  & 9  & \multicolumn{1}{c|}{2}  & Jane Doe                  & \multicolumn{1}{c|}{}  & \multicolumn{1}{c|}{} &  \\ \hline
            8  & 8  & 8  & 8  & 8  & 8  & \multicolumn{1}{c|}{3}  & Jane Doe                  & \multicolumn{1}{c|}{}  & \multicolumn{1}{c|}{} &  \\ \hline
            10 & 10 & 10 & 10 & 10 & 10 & \multicolumn{1}{c|}{4}  & Jane Doe                  & \multicolumn{1}{c|}{}  & \multicolumn{1}{c|}{} &  \\ \hline
            5  & 5  & 5  & 5  & 5  & 5  & \multicolumn{1}{c|}{5}  & Jane Doe                  & \multicolumn{1}{c|}{}  & \multicolumn{1}{c|}{} &  \\ \hline
            10 & 10 & 10 & 10 & 10 & 10 & \multicolumn{1}{c|}{6}  & Jane Doe                  & \multicolumn{1}{c|}{}  & \multicolumn{1}{c|}{} &  \\ \hline
        \end{tabular}
        \end{minipage}}
    \end{table}
\end{document}

enter image description here

0
  • you not provide any code of your table nor information about document layout, so answers can be based only on guessing
  • as starting I use @Roland answer (+1)
  • in comparison to @Roland answer in the following MWE the following changes are done:
    • for table is used is tabularx
    • added rotated column headers as shown in image
\documentclass{article}
\usepackage{geometry}
%---------------- show page layout. don't use in a real document!
\usepackage{rotating}
\usepackage{makecell, multirow, tabularx}
\NewExpandableDocumentCommand\mcc{O{1}m}%
    {\multicolumn{#1}{|c|}{#2}}
\NewExpandableDocumentCommand\mcl{O{1}m}%
    {\multicolumn{#1}{l|}{#2}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage{caption}
\usepackage[labelsep=colon,
            justification=raggedright,
            labelfont=default,
            singlelinecheck=off
            ]{caption}


\begin{document}
    \begin{table}[ht]
    \centering
    \small
\caption{Table description}
\label{Some Table}
    \settowidth\rotheadsize{Questionary}
    \renewcommand\cellrotangle{60}
    \setcellgapes{1pt}
    \makegapedcells
\begin{tabularx}{\linewidth}{|*{6}{C|}c|c|*{3}{C|}}
    \hline
\mcc[11]{\thead{Complete name}}             \\
    \hline
\mcc[11]{\thead{Description}}               \\
    \hline
\multirow{4}{*}[1.5ex]{\rothead{Exam}}
    &   \multirow{4}{*}[1.5ex]{\rothead{Assistance}}
        &   \multirow{4}{*}[1.5ex]{\rothead{Questionary}}
            &   \multirow{4}{*}[1.5ex]{\rothead{Homework}}
                &   \multirow{4}{*}[1.5ex]{\rothead{Second\\ Program}}
                    &   \multirow{4}{*}[1.5ex]{\rothead{First\\ Program}}
                        &   \mcl[2]{Grup Characters}
                                &   \mcl[3]{Comments}       \\
    \cline{9-10}
    &   &   &   &   &   &   \mcl[2]{Date}
                                &   \mcl[2]{S}
                                    &                       \\
    \cline{9-9}
    &   &   &   &   &   &   \mcl[2]{Serial No:}
                                & \mcl{U} 
                                    &   &                   \\
    \cline{7-8}
    &   &   &   &   &   &   No:
                            &   Name
                                &   &   &                   \\
    \hline
10  & 10 & 10 & 10 & 10 & 10 & 1 & Jane Doe &   &   &       \\
    \hline
9   & 9  & 9  & 9  & 9  & 9  & 2 & Jane Doe &   &   &       \\  \hline
8   & 8  & 8  & 8  & 8  & 8  & 3 & Jane Doe &   &   &       \\  \hline
10  & 10 & 10 & 10 & 10 & 10 & 4 & Jane Doe &   &   &       \\  \hline
5   & 5  & 5  & 5  & 5  & 5  & 5 & Jane Doe &   &   &       \\  \hline
10  & 10 & 10 & 10 & 10 & 10 & 6 & Jane Doe &   &   &       \\  \hline
\end{tabularx}
    \end{table}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .