1

I have done many changes from the very beginning till the end and then with the help of another person here

I have achieved the result that I wish, let's say more or less. In trial and error, I got one thing corrected; the other got wrong. Long story short, I need your suggestions and help in achieving

What do I need to change that column study or perhaps the text below aligned with the header name study (left or right) or vice versa as in the header is left intended like all others?

How can I avoid a long table like that overlaps on the page numbers and moves continuously down without respecting the page size?

Is there any way to put the numbered list or bulleted list in a random cell without disturbing the whole format, style, or dimensions?

Also, will this code make problem if chnaged to Landscape page layout?

without Altered colored rows is also acceptable but a nice top and bottom rule is giving me hell lot of headache

enter image description here

\documentclass[svgnames, table]{article}
\usepackage[margin=1in]{geometry}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{colortbl}
\usepackage{longtable}
\usepackage{tabularx, caption, makecell}

\renewcommand{\theadfont}{\bfseries\scriptsize}

\begin{document}
    
    \begin{table}[!ht]
        \setlength{\aboverulesep}{0pt}
        \setlength{\belowrulesep}{0pt}
        \captionsetup{singlelinecheck=false, font=small}
        \caption{\textbf{Literature Review}}
        \centering
        \label{tab:my-table}
        \setlength{\tabcolsep}{5pt}
        \renewcommand{\tabularxcolumn}[1]{>{\arraybackslash}m{#1}}
        \begin{tabularx}{\linewidth}{l*{3}{>{\hsize=1\hsize}X}>{\hsize=1\hsize}X*{3}{>{\hsize=1\hsize}X}} 
            \noalign{\vspace*{-2ex}} \toprule
            \rowcolor[HTML]{C0C0C0} 
            \thead{Nr.} &
            \thead{Study} &
            \thead{Study's Purpose} &
            \thead{Methodology} &
            \thead{Environmental Scale\\ \& Sample size} &
            \thead{Key Findings} &
            \thead{Conclusions} \\ 
            1 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla  \\ 
            \rowcolor[HTML]{C0C0C0}
            2 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla \\ \midrule
            3 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla \\ 
            \rowcolor[HTML]{C0C0C0}
            4 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla \\ \midrule
            5 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla \\ 
            \rowcolor[HTML]{C0C0C0}
            6 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla \\ \midrule
            7 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla \\ 
            \rowcolor[HTML]{C0C0C0}
            8 & bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla \\ \midrule
            9 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla  \\ 
            \rowcolor[HTML]{C0C0C0}
            10 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla  \\ \midrule
            11 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla  \\ 
            \rowcolor[HTML]{C0C0C0}
            12 & bla bla bla bla bla bla bla bla bla bla bla bla  & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla & bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla  \\ \midrule
            \bottomrule
        \end{tabularx}%
    \end{table}
    
\end{document} 
3
  • If you want your table to occupy multiple pages, take a look at the longtable package (or at the xltabular package if you want to keep the X type columns you currently use).
    – leandriis
    Apr 10 at 10:08
  • Regarding "put the numbered list or bulleted list in a random cell without disturbing the whole format": I currently see neither numbered nor bulleted lists in your code. What did you try so far to get them and what exactly changed? For itemize and enumerate-like lists inside of table cells that don't take up too much space, you might be interested in something like this: tex.stackexchange.com/a/586735/134144
    – leandriis
    Apr 10 at 10:11
  • Regarding the alignment of column headers with respect to the text in the columns: \thead by default horizontally centers its contents. To override that, use its optional argument: \thead[l]{Study} should give you the expected left aligned column header.
    – leandriis
    Apr 10 at 10:13

Your Answer

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

Browse other questions tagged or ask your own question.