Vertical-Spacing – How to Efficiently Remove Vertical Space on a Page

vertical-spacing

I am trying to remove blank vertical space on a page.
I tried this solution (Reduce vertical space between text and table and remove table indentation) but it didn't work.

Here is my MWE:

\documentclass[12pt,a4paper]{report}
\usepackage{graphicx}
\begin{document}
\chapter{Securities Activities Licensed}
The Capital Market Law provides a mechanism for licensing the following activities
\begin{enumerate}
\item advising; 
\item arranging; 
\item managing; and 
\item custody
\end{enumerate}
\vspace{-1cm}
\begin{table}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|c|c|c|c|}
\hline
\begin{tabular}[c]{@{}l@{}}Activity/\\ Type of Company
\end{tabular}
\end{tabular}}
\end{table}




\end{document}

As to the second point, I'm not sure \tablularx is the solution:

table

using this code (after adding tabularx package in the preamble:

    \begin{table}[ht!]
    \centering
    \begin{tabularx}{\textwidth}{|l|X|X|X|X|}

    \hline
    \begin{tabular}[c]{@{}l@{}}Activity/\\ Type of Company\end{tabular}                                                      & \multicolumn{1}{l|}{Custody} & \multicolumn{1}{l|}{Dealing} & \multicolumn{1}{l|}{Managing} & \multicolumn{1}{l|}{Arranging/Advising} \\ 
    \hline
Joint Stock Company                                                                                                      & X                            & X                            & X                             & X                                       \\ \hline
Local Bank Subsidiary                                                                                                    & X                            & X                            & X                             & X                                       \\ \hline
Saudi Joint Stock Company                                                                                                & X                            & X                            & X                             & X                                       \\ \hline
    \begin{tabular}[c]{@{}l@{}}Subsidiary of foreign financial institution licensed\\ under Banking Control law\end{tabular} & X                            & X                            & X                             & X                                       \\ 
    \hline
Any other legal entity                                                                                                   &                              &                              &                               & X                                       \\ 
    \hline
    \end{tabularx}
    \end{table}

Best Answer

The table environment is a float and its place will be chosen by LaTeX. You can suggest to LaTeX the place you want using optionals parameters like h (here), t (top), b (bottom). The ! makes LateX ignore other restrictions like the number of floats on the page, etc. Their order does not matter.

See fine tune the placement of tables and figures for a short explanation and/or the full history on floats placement for a complete one.

So by being a float the \vspace after the items will not have any effect whatsoever over its final position.

Not related with your question.

The problem with resizebox is that it changes font sizes.

If you want a table that uses the full line width, one possibility is the tabularx package. The X columns will accommodate their width to achieve that.

a

\documentclass[11pt,a4paper]{report}

\usepackage{graphicx}

\usepackage{tabularx} % added <<<<<<<<<<<<
\newcolumntype{Y}{>{\centering\arraybackslash}X} % centered X column

\begin{document}
    \chapter{Securities Activities Licensed}
    The Capital Market Law provides a mechanism for licensing the following activities
    \begin{enumerate}
        \item advising; 
        \item arranging; 
        \item managing; and 
        \item custody
    \end{enumerate}
    
    \begin{table}[!ht]
        \centering
        \caption{Using \texttt{tabularx}}
            \begin{tabularx}{\textwidth}{|l|X|X|X|X|}
                \hline
                \begin{tabular}{l}
                    Activity/\\ Type of Company
                \end{tabular}  & zz & zz & zz \\ \hline         
        \end{tabularx}
    \end{table}
    
        \begin{table}[!ht]
        \centering
        \caption{Using \texttt{tabularx} and centered columns}
        \begin{tabularx}{\textwidth}{|l|Y|Y|Y|Y|}
            \hline
            \begin{tabular}{>{\Large\bfseries}l}
                Activity/\\ Type of Company
            \end{tabular}  & zz & zz & zz \\ \hline         
        \end{tabularx}

    \end{table}
    
    \begin{table}
        \centering
        \caption{Using \texttt{resizebox} changes the font size}
        \resizebox{\textwidth}{!}{
            \begin{tabular}{|l|c|c|c|c|}
                \hline
                \begin{tabular}[c]{@{}l@{}}Activity/\\ Type of Company
                \end{tabular} 
        \end{tabular}}
    \end{table} 
    
\end{document}

UPDATE after follow up question.

b

Try this code.

\documentclass[11pt,a4paper]{article}

\usepackage[left=3.00cm, right=3.00cm, top=4.00cm, bottom=3.00cm]{geometry}

\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X} % centered X column

\begin{document}
    
     \begin{table}[ht!]
        \centering
        \setlength{\extrarowheight}{4pt}% extra row separation <<<%
        \begin{tabularx}{\textwidth}{|l|Y|Y|Y|Y|}                       
            \hline
            \begin{tabular}[c]{@{}l}Activity/\\ Type of Company\end{tabular}   & Custody & Dealing & Managing 
            &\begin{tabular}{c} Arranging/ \\ Advising\end{tabular} \\ \hline   
            Joint Stock Company                 & X & X & X & X     \\ \hline
            Local Bank Subsidiary               & X & X & X & X     \\ \hline
            Saudi Joint Stock Company           & X & X & X & X     \\ \hline
            \begin{tabular}[c]{@{}l@{}}Subsidiary of foreign \\ financial institution licensed\\ under Banking Control law\end{tabular}
                                                & X & X & X & X     \\ \hline
            Any other legal entity              &   &   &   & X     \\ \hline
        \end{tabularx}
    \end{table} 
    
\end{document}
Related Question