2

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

enter image description here

and i wanted an alignment like this -

enter image description here

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}
Mensch
  • 65,388
Shashwat
  • 425

1 Answers1

3

Without a minimal example it's difficult to say; but I believe that what you need is

\newcommand\headtitle[4]{%
  \begin{tabular}{@{}p{\linewidth}@{}}
  \textbf{#1} \\
  \hline
  {\bfseries #2, \hfill #3 \hfill #4} \\
  \mbox{}
  \end{tabular}%
}

You want the tabular to be the whole linewidth wide, so you don't want to shrink it by twice the \tabcolsep, but rather to remove the padding.

Troy
  • 13,741
egreg
  • 1,121,712
  • The issue is not specially with the above layout - but after i use the bullets \items a lot of space is left betwee heading ichat from above example and the details for that work! What I want is to reduce that space as shown in second image from OP.

    I even tried using \tiny for \bulles but that doesn't solve the alignment issue .

    Check image - http://i.imgur.com/sUJp3Gq.png

    – Shashwat Nov 22 '13 at 06:23
  • @Shashwat It's impossible to say more without seeing the code. – egreg Nov 22 '13 at 10:12
  • Seems like I was using an empty line command \\ after the title which seems to create extra space- Is there anyway I can separate Header Title( Freelancer work ) and \hline` from the above format yet attain the same alignment? Cause when I try I get errors ! P.s updated the main post with teh code! – – Shashwat Nov 23 '13 at 18:06