0

The following code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{float}
\graphicspath{ {./images/} }
\usepackage[top=2.5cm, bottom=2.5cm, left=2.75cm, right=2.75cm, a4paper]{geometry}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{multirow}
\usepackage{longtable}
\usepackage{pbox}

\usepackage[table]{xcolor} \definecolor{UniBlue}{RGB}{0,102,204} \definecolor{UniOrange}{RGB}{255,128,0} \usepackage{makecell} \usepackage{subcaption} \setlength{\parindent}{0pt} \usepackage[]{xcolor} \usepackage{multirow} \usepackage{graphicx} \usepackage{geometry} \usepackage{booktabs} \newcommand{\todo}[1]{\textcolor{red}{(#1)}} \usepackage{notoccite} \usepackage{textcomp} \usepackage{nomencl} \usepackage{xpatch} \usepackage{etoolbox} \usepackage{chemfig, upgreek, siunitx, chemformula, enumitem} % PACKAGES GERARDO \usepackage{lscape}

\begin{document}

% Table generated by Excel2LaTeX from sheet 'Hoja7' \begin{table}[htbp] \centering \caption{Research schedule for the project.} \rotatebox{90}{ \scalebox{0.8}{ \begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{Activity / Term }}} & \multicolumn{3}{c|}{\textbf{2022}} & \multicolumn{3}{c|}{\textbf{2023}} & \multicolumn{3}{c|}{\textbf{2024}} & \multicolumn{3}{c|}{\textbf{2025}} \ \cline{2-13} & \textbf{Summer} & \textbf{Fall } & \textbf{Winter} & \textbf{Summer} & \textbf{Fall } & \textbf{Winter} & \textbf{Summer} & \textbf{Fall } & \textbf{Winter} & \textbf{Summer} & \textbf{Fall } & \textbf{Winter} \ \hline 1. Literature review & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} \ \hline 2. Courses and workshops & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & & & & & & & & \ \hline 3. Comprehensive exam & & & \cellcolor[rgb]{ .647, .647, .647} & & & & & & & & & \ \hline 4. Acquisition of chemical reagents and equipment & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & & & & & & & & \ \hline 5. Design of the photocatalytic floating device & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & & & & \ \hline 6. Synthesis of \ch{TiO_2/Ag} composites & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & & & & & & & & \ \hline 7. Characterization of \ch{TiO_2/Ag} composites & & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & & & & & & & \ \hline 8. Synthesis of \ch{PU/TiO_2/Ag} fibers & & & & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & & & \ \hline 9. Characterization of \ch{PU/TiO_2/Ag} fibers & & & & & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & & & \ \hline 10. Construction of the photocatalytic floating device & & & & & & & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & & \ \hline 11. Photocatalytic floating device tests & & & & & & & & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & \ \hline 12. Article writting and submission & & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & & \ \hline 13. Thesis writing & & & & & & & & & & \cellcolor[rgb]{ .647, .647, .647} & \cellcolor[rgb]{ .647, .647, .647} & \ \hline 14. Doctoral dissertation defense & & & & & & & & & & & & \cellcolor[rgb]{ .647, .647, .647} \ \hline \end{tabular}% } } \label{tab:research_schedule}% \end{table}%

%\end{landscape}

\end{document}

produces the table shown in the picture:

enter image description here

I would like to increase the height of the rows. Is there any package or command that I can use for that? Also, is it possible to set the same width for Summer, Fall, Winter columns?

  • 1
    Did you try: \def\arraystretch{1.5}? Rmemeber to reset the arraystretch to 1 after the table (if needed). – jak123 Jan 18 '22 at 00:42
  • You can use also some like \extrarowheight 1em using the array package. For consistency of font sizes, avoid \scalebox and just use \footnotesize or so in the float. For the columns sizes, instead of c use some like p{5em} or read about the packages tabularx and tabulary. BTW, what you posted is not minimal example. People will be more prone to help if you remove unnecessary packages, irrelevant code for the problem, (e.g., the code to colorizing cells), and the amount of contents (the problem could be seen and solved in a much smaller table). – Fran Jan 18 '22 at 01:09
  • Off-topic: cleanup your preamble. Many packages are loaded multiple time even with different options. Package hyperref should be loaded last (with few exception). – Zarko Jan 18 '22 at 03:36

1 Answers1

2

Like this?

enter image description here

With use of (relative new) package tabularray the MWE, which produce above result, is:

\documentclass{article}
\usepackage[a4paper, vmargin=2.5cm, hmargin=2.75cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{chemfig, chemformula}
\usepackage[skip=1ex, font=small, labelfont=bf]{caption} 
\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}
\usepackage{pdflscape}
\usepackage{hyperref}

\begin{document}

% Table generated by Excel2LaTeX from sheet 'Hoja7' \begin{landscape} \begin{table}[htbp] \centering %\small \caption{Research schedule for the project.} \begin{tblr}{hline{2,4-Y}, vline{1,3-Z}, colspec = {r @{\ } X[l] *{12}{c}}, colsep = 3.5pt, rowsep=4pt, cell{3}{3-14} = {bg=gray8}, cell{4}{3-5} = {bg=gray8}, cell{5}{5} = {bg=gray8}, cell{6}{4-5} = {bg=gray8}, cell{7}{4-9} = {bg=gray8}, cell{8}{4-5} = {bg=gray8}, cell{9}{5-6} = {bg=gray8}, cell{10}{7-10} = {bg=gray8}, cell{11}{8-10} = {bg=gray8}, cell{12}{9-11} = {bg=gray8}, cell{13}{11-12} = {bg=gray8}, cell{14}{5-6, 8-9,11-12} = {bg=gray8}, cell{15}{12-13} = {bg=gray8}, cell{16}{14} = {bg=gray8}, row{1,2} = {font=\small\bfseries} } \toprule \SetCell[r=2]{c} & \SetCell[r=2]{c} Activity / Term & \SetCell[c=3]{c} 2022 & & & \SetCell[c=3]{c} 2023 & & & \SetCell[c=3]{c} 2024 & & & \SetCell[c=3]{c} 2025 & & \ & & Summer & Fall & Winter & Summer & Fall & Winter & Summer & Fall & Winter & Summer & Fall & Winter \ \midrule

  1. & Literature review & & & & & & & & & & & & \
  2. & Courses and workshops & & & & & & & & & & & & \
  3. & Comprehensive exam & & & & & & & & & & & & \
  4. & Acquisition of chemical reagents and equipment & & & & & & & & & & & & \
  5. & Design of the photocatalytic floating device & & & & & & & & & & & & \
  6. & Synthesis of \ch{TiO_2/Ag} composites & & & & & & & & & & & & \
  7. & Characterization of \ch{TiO_2/Ag} composites & & & & & & & & & & & & \
  8. & Synthesis of \ch{PU/TiO_2/Ag} fibers & & & & & & & & & & & & \
  9. & Characterization of \ch{PU/TiO_2/Ag} fibers & & & & & & & & & & & & \
  10. & Construction of the photocatalytic floating device & & & & & & & & & & & & \
  11. & Photocatalytic floating device tests & & & & & & & & & & & & \
  12. & Article writing and submission & & & & & & & & & & & & \
  13. & Thesis writing & & & & & & & & & & & & \
  14. & Doctoral dissertation defense & & & & & & & & & & & & \ \bottomrule

\end{tblr} \end{table} \end{landscape} \end{document}

As you can observe, In preamble are loaded only to table relevant packages nad tabularray libraries. Exception are siunitx and hyperref which are added only to show how and where to be in your document preamble.

Zarko
  • 296,517