# Two lines in two columns are not aligned

Honestly, I'm trying to edit a CV template to fit my need. I could not figure out how to make the line "Department ..." aligned with "CONTACT".

%%%%%%%%%%%%%%%%%%%%%%%%%%%% Document Setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Don't like 10pt? Try 11pt or 12pt
\documentclass[10pt]{article}

% This is a helpful package that puts math inside length specifications
\usepackage{calc}
\usepackage{pifont}
\usepackage{marvosym}
\usepackage{amsmath, amsthm, amssymb, amsfonts}

% Simpler bibsection for CV sections
% (thanks to natbib for inspiration)
\makeatletter
\newlength{\bibhang}
\setlength{\bibhang}{1em}
\newlength{\bibsep}
\newenvironment{bibsection}%
{\begin{list}{}{%
\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibsep}%
\setlength{\parsep}{\z@}%
\setlength{\partopsep}{0pt}%
\setlength{\topsep}{0pt}}}
{\end{list}\vspace{-.6\baselineskip}}
\makeatother

% Layout: Puts the section titles on left side of page
\reversemarginpar

% Use these lines for A4-sized paper
\usepackage[paper=a4paper,
%includefoot, % Uncomment to put page number above margin
marginparwidth = 24mm,    % Length of section titles
marginparsep = 10mm,       % Space between titles and text
left = 22mm,              % 25mm margins
right = 22mm,
includemp]{geometry}

%% More layout: Get rid of indenting throughout entire document
\setlength{\parindent}{0in}

%% This gives us fun enumeration environments. compactitem will be nice.

\usepackage[shortlabels]{enumitem}

%% Reference the last page in the page number
%
% NOTE: comment the +LP line and uncomment the -LP line to have page
%       numbers without the of ##'' last page reference)
%
% NOTE: uncomment the \pagestyle{empty} line to get rid of all page
%       numbers (make sure includefoot is commented out above)
%
\usepackage{fancyhdr,lastpage}
\pagestyle{fancy}
%\pagestyle{empty}      % Uncomment this to get rid of page numbers
\fancyfootoffset{\marginparsep+\marginparwidth}
\newlength{\footpageshift}
\setlength{\footpageshift}
{0.5\textwidth+0.5\marginparsep+0.5\marginparwidth-2in}
\lfoot{\hspace{\footpageshift}%
\parbox{4in}{\, \hfill %
\arabic{page} of \protect\pageref*{LastPage} % +LP
%                    \arabic{page}                               % -LP
\hfill \,}}

%%%%%%%%%%%%%%%%%%%%%%%%%%% Helper Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%

% The title (name) with a horizontal rule under it
%
%
% Place at top of document. It should be the first thing.
{\hspace*{-\marginparsep minus \marginparwidth}%
\begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}%
{\large \bfseries #2 \hfill #1}\\[-0.15\baselineskip]%
\rule{\columnwidth}{0.5pt}%
\end{minipage}}
%
% Usage: \section{section name}
%
% Follow this section IMMEDIATELY with the first line of the section
% text. Do not put whitespace in between. That is, do this:
%
%       \section{My Information}
%       Here is my information.
%
% and NOT this:
%
%       \section{My Information}
%
%       Here is my information.
%
% Otherwise the top of the section header will not line up with the top
% of the section. Of course, using a single comment character (%) on
% empty lines allows for the function of the first example with the
% readability of the second example.
\renewcommand{\section}[2]%
{\pagebreak[2]\vspace{1\baselineskip}%
\hspace{0in}%
\marginpar{
\raggedright \scshape #1}#2}

% An itemize-style list with lots of space between items
\usepackage{pifont}
\setlist[itemize]{leftmargin=*}
\newenvironment{outerlist}[1][\enskip\textbullet]%
{\begin{itemize}[\ding{113}]}
{\end{itemize}%
\vspace{-0.6\baselineskip}}

%%%%%%%%%%%%%%%%%%%%%%%% End Helper Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%% Begin CV Document %%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\hyphenpenalty = 9999
\def\vs{\vspace{-0.1in}}
\begin{document}

\makeheading{Le Anh Dung -- Curriculum Vitae \hfill {\small Last update: July 29, 2019}}

\halfblankline

\halfblankline

%% =======================================
\section{Contact Information}

% NOTE: Mind where the & separators and \\ breaks are in the following
%       table.
%
% ALSO: \rcollength is the width of the right column of the table
%
\newlength{\rcollength}\setlength{\rcollength}{2.20in}%
%
\begin{tabular}[t]{@{}p{\textwidth-\rcollength}p{\rcollength}}
\href{http://www.cse.osu.edu/}%
{Department of Astronomy and Astrophysics} & \\
& \textit{Phone:} +56-2-354-1645 \\
4860 Avenida Vicu\~{n}a Mackenna            & \textit{Fax:} +1-509-461-2250 \\
7820436, Macul           & \textit{E-mail:} \email{tpuzia@astro.puc.cl}\\
Santiago, Chile    & \textit{WWW:}
\href{http://www.astro.puc.cl/$\sim$tpuzia/}{www.astro.puc.cl}\\
\end{tabular}

%% ==============================================================
\vspace{0.2in}
\section{Research Background} % (fold)
\label{sec:research_backg}
\vspace{-0.25in}
\begin{outerlist}
\item {\bf Social Network}: more descriptions here.
\end{outerlist}
% section research_backg (end)
\end{document}


PS: I used this template ...

• Since this is your sixth question, I think we can expect you to provide an MWE with your question. Your code is neither working nor minimal. Also, I have to say, your template does not look very tidy. Maybe a class like moderncv would be better suited for you? That said, your problem can easily be fixed by removing a blank line. Try making an MWE and you will find it immediately. – schtandard Jul 30 at 16:05
• \halfblankline is undefined. If two lines containing \halfblankline are commented out, the code work fine for me. – ferahfeza Jul 30 at 16:08

Well, that template is not the best as it seems to me, but nevertheless ...

I corrected some errors you left in the code (for example the missing definition of \email or \halfblankline; see marked code with <========= for important code changings ...). But the culprit you have lies in the following lines:

\section{Contact Information}
\newlength{\rcollength}\setlength{\rcollength}{2.20in}%

\begin{tabular}[t]{@{}p{\textwidth-\rcollength}p{\rcollength}}
\href{http://www.cse.osu.edu/}%
{Department of Astronomy and Astrophysics} & \\
& \textit{Phone:} +56-2-354-1645 \\
4860 Avenida Vicu\~{n}a Mackenna            & \textit{Fax:} +1-509-461-2250 \\
7820436, Macul           & \textit{E-mail:} \href{mailto:tpuzia@astro.puc.cl}{tpuzia@astro.puc.cl}\\
Santiago, Chile    & \textit{WWW:}
\href{http://www.astro.puc.cl/$\sim$tpuzia/}{www.astro.puc.cl}\\
\end{tabular}


Your tabular will be added at the same height your \section before ends.

To get rid of that you can do the following quick workaround, simmply add:

\vspace{-\baselineskip} % <=============================================


before you start your table (that moves your table above the space for one line).

Please see the following complete compiling (;-)) code:

\documentclass[10pt]{article}

% This is a helpful package that puts math inside length specifications
\usepackage{calc}
\usepackage{pifont}
\usepackage{marvosym}
\usepackage{amsmath, amsthm, amssymb, amsfonts}

% Simpler bibsection for CV sections
% (thanks to natbib for inspiration)
\makeatletter
\newlength{\bibhang}
\setlength{\bibhang}{1em}
\newlength{\bibsep}
\newenvironment{bibsection}%
{\begin{list}{}{%
\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibsep}%
\setlength{\parsep}{\z@}%
\setlength{\partopsep}{0pt}%
\setlength{\topsep}{0pt}}}
{\end{list}\vspace{-.6\baselineskip}}
\makeatother

% Layout: Puts the section titles on left side of page
\reversemarginpar

% Use these lines for A4-sized paper
\usepackage[paper=a4paper,
%includefoot, % Uncomment to put page number above margin
marginparwidth = 24mm,    % Length of section titles
marginparsep = 10mm,       % Space between titles and text
left = 22mm,              % 25mm margins
right = 22mm,
includemp]{geometry}

%% More layout: Get rid of indenting throughout entire document
\setlength{\parindent}{0in}

%% This gives us fun enumeration environments. compactitem will be nice.

\usepackage[shortlabels]{enumitem}

%% Reference the last page in the page number
%
% NOTE: comment the +LP line and uncomment the -LP line to have page
%       numbers without the of ##'' last page reference)
%
% NOTE: uncomment the \pagestyle{empty} line to get rid of all page
%       numbers (make sure includefoot is commented out above)
%
\usepackage{fancyhdr,lastpage}
\pagestyle{fancy}
%\pagestyle{empty}      % Uncomment this to get rid of page numbers
\fancyfootoffset{\marginparsep+\marginparwidth}
\newlength{\footpageshift}
\setlength{\footpageshift}
{0.5\textwidth+0.5\marginparsep+0.5\marginparwidth-2in}
\lfoot{\hspace{\footpageshift}%
\parbox{4in}{\, \hfill %
\arabic{page} of \protect\pageref*{LastPage} % +LP
%                    \arabic{page}                               % -LP
\hfill \,}}

%%%%%%%%%%%%%%%%%%%%%%%%%%% Helper Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%

% The title (name) with a horizontal rule under it
%
%
% Place at top of document. It should be the first thing.
{\hspace*{-\marginparsep minus \marginparwidth}%
\begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}%
{\large \bfseries #2 \hfill #1}\\[-0.15\baselineskip]%
\rule{\columnwidth}{0.5pt}%
\end{minipage}}
%
% Usage: \section{section name}
%
% Follow this section IMMEDIATELY with the first line of the section
% text. Do not put whitespace in between. That is, do this:
%
%       \section{My Information}
%       Here is my information.
%
% and NOT this:
%
%       \section{My Information}
%
%       Here is my information.
%
% Otherwise the top of the section header will not line up with the top
% of the section. Of course, using a single comment character (%) on
% empty lines allows for the function of the first example with the
% readability of the second example.
\renewcommand{\section}[2]%
{\pagebreak[2]\vspace{1\baselineskip}%
\hspace{0in}%
\marginpar{
\raggedright \scshape #1}#2}

% An itemize-style list with lots of space between items
\usepackage{pifont}
\setlist[itemize]{leftmargin=*}
\newenvironment{outerlist}[1][\enskip\textbullet]%
{\begin{itemize}[\ding{113}]}
{\end{itemize}%
\vspace{-0.6\baselineskip}}

%%%%%%%%%%%%%%%%%%%%%%%% End Helper Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}

%%%%%%%%%%%%%%%%%%%%%%%%% Begin CV Document %%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\hyphenpenalty = 9999
\def\vs{\vspace{-0.1in}}
\def\halfblankline{\vspace{0.1in}} % <==================================

\begin{document}

\makeheading{Le Anh Dung -- Curriculum Vitae \hfill {\small Last update: July 29, 2019}}

%\halfblankline

%\halfblankline

%% =======================================
\section{Contact Information}
\newlength{\rcollength}\setlength{\rcollength}{2.20in}%
\vspace{-\baselineskip} % <=============================================
\begin{tabular}[t]{@{}p{\textwidth-\rcollength}p{\rcollength}}
\href{http://www.cse.osu.edu/}%
{Department of Astronomy and Astrophysics} & \\
& \textit{Phone:} +56-2-354-1645 \\
4860 Avenida Vicu\~{n}a Mackenna            & \textit{Fax:} +1-509-461-2250 \\
7820436, Macul           & \textit{E-mail:} \href{mailto:tpuzia@astro.puc.cl}{tpuzia@astro.puc.cl}\\ % <=============================================
Santiago, Chile    & \textit{WWW:}
\href{http://www.astro.puc.cl/$\sim$tpuzia/}{www.astro.puc.cl}\\
\end{tabular}

%% ==============================================================
\vspace{0.2in}
\section{Research Background} % (fold)
\label{sec:research_backg}
\vspace{-0.25in}
\begin{outerlist}
\item {\bf Social Network}: more descriptions here.

• Change {\bf Social Network} to \textbf{Social Network}, old command \bf is outdated ... – Mensch Jul 30 at 19:04