Following from my problems from here - Formatting resume header!
I wanted to make the code simpler by adding the tabular part under a method so I tried \newcommand
Here is the code
\newcommand\headtitle[4]{
\begin{tabular}{p{\dimexpr\linewidth-2\tabcolsep}}
\textbf{#1} \\
\hline
{\bfseries #2, \hfill #3 \hfill #4} \\
\quad
\end{tabular}
Unfortunately after using this I am running into alignment issues- I dont want to over complex the code so I used it -
Input for the above is --
\headtitle{Freelancer Work}{Author}{Linux Journal}{2011}
But if I use stuff after that - it appears like this

and i wanted an alignment like this -

Also I wanted to make it even simpler by seprating the \hline and the heading but removing the \hline too throws an error (from the original code)
Any inputs will be good :)
Edit - Complete code as of now ~
\documentclass[a4paper,10pt]{article}
\usepackage[margin=1in]{geometry}
\setlength{\parindent}{0pt}
%\newcommand\headone[1]{%
% \begin{tabular}{@{}p{\linewidth}@{}}
% \textbf{#1} \\
% \hline
%\end{tabular}
\newcommand\headtitle[4]{%
\begin{tabular}{@{}p{\linewidth}@{}}
\textbf{#1} \\
\hline
{\bfseries #2 \hfill #3 \hfill #4} \\
%\mbox{}
\end{tabular}%
}
\renewcommand{\labelitemi}{\raise .5ex\hbox{\tiny$\bullet$}}
\begin{document}
\sffamily
% Top - Resume Header
{ \small \begin{tabular}[c]{l}
\texttt{\#1212, Block xzxzx3} \\
\texttt{ABCD, XYX} \\
\texttt{US CAN (IL) 1212121}
\end{tabular}} \hfill %
{\LARGE\bfseries\begin{tabular}[c]{c}
SHASHWAT PANT
\end{tabular}}\hfill%
{ \small \begin{tabular}[c]{r}
\texttt{(91) 1212122121}\\
\texttt{(91) 12333636 }\\
\texttt{@gmail.com}
\end{tabular}}
\vspace{.75 \baselineskip}
\headtitle{Author}{Linux Journal}{2011}
\quad Indepth Articles and Analysis
\begin {itemize}
\item Worked on an indepth analysis on Secure boot, Intel's UEFI implementation, its shortcommings and effect on Linux.
\item Worked on a comprehensive comparison of various Display Managers covering implementation, development and performance aspect of each.
\end{itemize}
\headtitle{Author}{Linux Journal}{2011}
\quad Indepth Articles and Analysis
\end{document}