I am trying to create my CV, using tables. I want them in the center of the page, but they continue to position a little bit to the left. I am using the command \centering
before the environment tabular
. I think I understood the reason, that is the text on the first column is not long enough, in the second table. How can I solve this?
The first table is centered, but the second, as you can noticed, is not.
This is the code:
\documentclass[12pt, Arial]{article}
\usepackage{float} % force LaTex to not reposition the tables
\usepackage{xcolor} % used to change the colour of the author
\usepackage{hyperref} % to use links
% BEGINNING OF THE DOCUMENT
\begin{document}
%
\renewcommand{\baselinestretch}{1.3}
%
\maketitle
%
\subsection*{Personal Information}
\begin{table}[H]
\centering
\setlength{\tabcolsep}{25pt}
\begin{tabular}{ r | l}
\textbf{Name and surname} & Barack \\
\textbf{Address} & Washington\\
&USA\\
\textbf{Number} & +1231231231231 \\
\textbf{E-mail addresses} & barack@obama.usa \\
\textbf{Nationality} & American \\
\textbf{Birth} & 28/10/1923 \\
\textbf{Gender} & Male \\
\end{tabular}
\end{table}
%
%
\subsection*{Education}
\begin{table}[H]
\centering
\setlength{\tabcolsep}{25pt}
\begin{tabular}{ r | l}
\textbf{University} & \textcolor{blue}{\href{https://www.google.com}{google}} \\
\textbf{Faculty} & Science of Informatics\\
\textbf{Date} & 1900 - present \\
\textbf{Country} & Earth \\
\end{tabular}
\end{table}
\end{document}
p@{.5\linewidth}
rather thanr
andl
.\begin{table}[H]
here, just don't use\begin{table}
at all, you don't want a float, just a cemtred tabular.