0

I am currently working with table and I want to do a landscape table for a particular page but the table is too small and condensed, and not centering. How do I magnify it?

\documentclass[12pt, a4paper]{article}
\usepackage[margin=1.9cm, left=2.1cm, right=1.8cm]{geometry}
\usepackage{graphicx}
\usepackage{lscape}
\usepackage{afterpage}
\usepackage{multirow}
\usepackage[table,xcdraw]{xcolor}
\begin{document}
\afterpage{
\begin{landscape}
\section{Time Frame}
\centering
\begin{table}[ht]
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
                      &                                   & \multicolumn{13}{c|}{Week}                                                                                                                                                                                                                                                                                                                                   \\ \cline{3-15} 
\multirow{-2}{*}{No.} & \multirow{-2}{*}{Activities}      & 1                        & 2                        & 3                        & 4                        & 5                        & 6                        & 7                        & 8                        & 9                        & 10                       & 11                       & 12                       & 13                       \\ \hline
1                     & Course Briefing                   & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          \\ \hline
2                     & Committee Selection               &                          & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          \\ \hline
3                     & Topic Selection                   &                          & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          \\ \hline
4                     & Budget Estimation                 &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          &                          &                          &                          \\ \hline
6                     & Teaser Design                     &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
7                     & Attracting Sponsors               &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
8                     & T-Shirt Design                    &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
9                     & Mural Design                      &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
10                    & Certificate Design                &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
11                    & Proposal Preparation              &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
12                    & Planning Approval                 &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
13                    & Video Filming/ Taking Photography &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          \\ \hline
14                    & Event Promotion                   &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          \\ \hline
15                    & Event Preparation                 &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          \\ \hline
16                    & Mural-painting                    &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          & \cellcolor[HTML]{009901} &                          &                          \\ \hline
17                    & Video Editing                     &                          &                          &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          \\ \hline
18                    & Final Report Preparation          &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} \\ \hline
\end{tabular}
\end{table}
\end{landscape}}
\end{document}

enter image description here

7
  • For centering of table you need to move \centering inside table environment. Please, explain how you like to enlarge table? Also please tell us, which document class you use.
    – Zarko
    Commented May 16, 2019 at 11:46
  • I am using article class, and I would like to enlarge table so it covers 90% of the whole page
    – weilam06
    Commented May 16, 2019 at 11:49
  • 1
    What you like to enlarge? Width of columns? Size of fonts?
    – Zarko
    Commented May 16, 2019 at 11:52
  • Enlarge as a figure, for both column and rows
    – weilam06
    Commented May 16, 2019 at 11:56
  • And what about font size?
    – Zarko
    Commented May 16, 2019 at 11:56

2 Answers 2

4

Like this?

enter image description here

\documentclass{article}
\usepackage[margin=1.9cm, left=2.1cm, right=1.8cm]{geometry}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{cellspace,
            multirow}
\setlength\cellspacetoplimit{5pt}    % <----
\setlength\cellspacebottomlimit{5pt} % <---- 

\usepackage[table,xcdraw]{xcolor}
\newcommand\CCG{\cellcolor[HTML]{009901}}
\newcommand\CCY{\cellcolor[HTML]{FFC702}}

\begin{document}
\afterpage{
\begin{landscape}
\section{Time Frame}
\begin{table}[ht]
\centering
\Large      % <----
\begin{tabular}{|Sc|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
    &   & \multicolumn{13}{c|}{Week}                                        \\ \cline{3-15}
\multirow{-2}{*}{No.}
    & \multirow{-2}{*}{Activities}
        & 1 & 2 & 3 &  4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13    \\ \hline
1   & Course Briefing
        & \CCG  &   &   &   &   &   &   &   &   &   &   &   &       \\ \hline
2   & Committee Selection
        &   & \CCG  &   &   &   &   &   &   &   &   &   &   &       \\ \hline
3   & Topic Selection
        &   & \CCG  &   &   &   &   &   &   &   &   &   &   &       \\ \hline
4   & Budget Estimation
        &   & \CCY & \CCY & \CCG &  &   &   &   &   &   &   &   &   \\ \hline
6   & Teaser Design                     &                          & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &                          &                          &                          &                          &                          &                          \\ \hline
7   & Attracting Sponsors               &                          & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &                          &                          &                          &                          &                          &                          \\ \hline
8   & T-Shirt Design                    &                          & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &                          &                          &                          &                          &                          &                          \\ \hline
9   & Mural Design                      &                          & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &                          &                          &                          &                          &                          &                          \\ \hline
10  & Certificate Design                &                          & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &                          &                          &                          &                          &                          &                          \\ \hline
11  & Proposal Preparation              &                          & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &                          &                          &                          &                          &                          &                          \\ \hline
12  & Planning Approval                 &                          & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &                          &                          &                          &                          &                          &                          \\ \hline
13  & Video Filming/ Taking Photography
        &   & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &   &   \\ \hline
14  & Event Promotion
        &   & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &   &   \\ \hline
15  & Event Preparation
        &   & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCG &   &   \\ \hline
16  & Mural-painting      &   &   &   &   &   &   &   &   &   &   & \CCG &    &           \\ \hline
17  & Video Editing       &   &   &   & \CCY  & \CCY & \CCY & \CCY & \CCY & \CCY
                                      & \CCY & \CCY & \CCG &                              \\ \hline
18  & Final Report Preparation
        & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY & \CCY
        & \CCY & \CCG &                                                                    \\ \hline
\end{tabular}
\end{table}
\end{landscape}}
1
  • Yes! Thanks, the cells have been adjusted its row and column
    – weilam06
    Commented May 16, 2019 at 12:19
0

As @Zarko mentioned, you should be placing \center in the table environment. You can use the following to resize your table:

{
\renewcommand{\arraystretch}{1.3} % row height
\setlength{\tabcolsep}{12pt} % column width
your table...
}

Output

\documentclass[12pt, a4paper]{article}
\usepackage[margin=1.9cm, left=2.1cm, right=1.8cm]{geometry}
\usepackage{graphicx}
\usepackage{lscape}
\usepackage{afterpage}
\usepackage{multirow}
\usepackage[table,xcdraw]{xcolor}
\begin{document}

\afterpage{
\begin{landscape}
\section{Time Frame}
{
\renewcommand{\arraystretch}{1.3} % row height
\setlength{\tabcolsep}{12pt} % column width

\begin{table}[ht]
\centering
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
                      &                                   & \multicolumn{13}{c|}{Week}                                                                                                                                                                                                                                                                                                                                   \\ \cline{3-15} 
\multirow{-2}{*}{No.} & \multirow{-2}{*}{Activities}      & 1                        & 2                        & 3                        & 4                        & 5                        & 6                        & 7                        & 8                        & 9                        & 10                       & 11                       & 12                       & 13                       \\ \hline
1                     & Course Briefing                   & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          \\ \hline
2                     & Committee Selection               &                          & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          \\ \hline
3                     & Topic Selection                   &                          & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          \\ \hline
4                     & Budget Estimation                 &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          &                          &                          &                          \\ \hline
6                     & Teaser Design                     &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
7                     & Attracting Sponsors               &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
8                     & T-Shirt Design                    &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
9                     & Mural Design                      &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
10                    & Certificate Design                &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
11                    & Proposal Preparation              &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
12                    & Planning Approval                 &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          &                          &                          &                          &                          \\ \hline
13                    & Video Filming/ Taking Photography &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          \\ \hline
14                    & Event Promotion                   &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          \\ \hline
15                    & Event Preparation                 &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          &                          \\ \hline
16                    & Mural-painting                    &                          &                          &                          &                          &                          &                          &                          &                          &                          &                          & \cellcolor[HTML]{009901} &                          &                          \\ \hline
17                    & Video Editing                     &                          &                          &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} &                          \\ \hline
18                    & Final Report Preparation          &                          & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{FFC702} & \cellcolor[HTML]{009901} \\ \hline
\end{tabular}
\end{table}
}
\end{landscape}}
\end{document}

You must log in to answer this question.

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