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:
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 likeh
(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.UPDATE after follow up question.
Try this code.