3

I would like to create the following table bases on the answer of @Zarko since i use the same code for another kind of table enter link description here

https://tex.stackexchange.com/questions/427064/itemize-inside-itemize-and-some-of-borders-around-the-gray-title-section-are-mis

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[table]{xcolor}
\usepackage{tabularx}
\usepackage{enumitem}
\usepackage{etoolbox}
\AtBeginEnvironment{center}{%
    \setlist[itemize,1]{nosep,
                        topsep     = 0pt,
                        partopsep  = 0pt,
                        leftmargin = *,
                        label      = \textendash,
                        before     = \vspace{-0.6\baselineskip},
                        after      = \vspace{-\baselineskip}
                        }
    \setlist[itemize]{  nosep,
                        leftmargin=*,
                        label = $\bullet$
                      } }

\begin{document}
    \begin{center}
\bfseries
\begin{tabularx}{\linewidth}{ | l | X |X| }
    \hline
\multicolumn{2}{|>{\centering\arraybackslash}%
                 p{\dimexpr\linewidth-2\tabcolsep-2\arrayrulewidth\relax}|}{\cellcolor{gray!30}
    Very long text here and centered
    Very long text here and centered
    Very long text here and centered}    \\
    \hline
\multicolumn{3}{c}{}                    \\
    \hline
Year &   Cycle & Issues     \\
    \hline
2018-2019   & High School & very \\
    \hline
\end{tabularx}
    \end{center}
\end{document}
2
  • 1
    and what you try so far? what is the problem? rotating text in the first column? please, copy your code to here! it is not convenient to search links – Zarko Apr 18 '18 at 7:27
  • Check my update – Educ Apr 18 '18 at 7:33
5

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[table]{xcolor}
\usepackage{makecell, multirow, rotating, tabularx}

\begin{document}
    \begin{center}
\bfseries
\settowidth\rotheadsize{High School}
\begin{tabularx}{\linewidth}{|c|c|>{\centering\arraybackslash}X|}
    \hline
\multicolumn{3}{|>{\centering\arraybackslash}%
                 p{\dimexpr\linewidth-2\tabcolsep-2\arrayrulewidth\relax}|}{\cellcolor{gray!30}
    Issues}    \\
    \hline
Year &   Cycle & Issues     \\
    \hline
\multirow[b]{3}{*}{\rothead{2018-2019}}   
    & \multirowcell{1}{\rothead{High School}} 
        & long text centered here   \rule[-1em]{0pt}{2.5em} \\
    \cline{3-3}
    &   & long text centered here   \rule[-1em]{0pt}{2.5em} \\
    \cline{3-3}
    &   & long text centered here   \rule[-1em]{0pt}{2.5em} \\
    \hline
\end{tabularx}
    \end{center}
\end{document}
2
  • The very long text is not centred. – Bernard Apr 18 '18 at 10:19
  • @Bernard, thank you very much! corrected now. – Zarko Apr 18 '18 at 11:39

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.