I was playing up with \colorbox
for my resume and really loved the way I can create styling for the document.
Anyway I was trying to center align the text but failed to achieve it using the \centering
command and if I use \begin{center}
to allign the text, \colorbox
width increase two fold which I don't want.
\newcommand \reshead [1]{\par \noindent \colorbox{black}{\begin{minipage}
{\textwidth}{\color{white} \centering \bfseries {#1}} \hfill \end{minipage}}}
Apart from this issue, I wanted to my resume to look like this, the top line should be lesser in length compared to \colorbox
However with my code both are equal, is there a way I can stretch the \colorbox
a bit more.? –
%% (c) Shashwat Pant
%% Resume - C.V of Shashwat Pant
%% September 17th 2012
\documentclass[letterpaper,12pt]{article}
%\usepackage[charter]{mathdesign}
% \usepackage{charter}
% \usepackage{mathpazo}
%\usepackage{kpfonts}
%\usepackage{geometry}
\usepackage{palatino}
\usepackage{url}
\usepackage[empty]{fullpage}
\usepackage{color}
%\definecolor{mygrey}{gray}{0.95}
%\usepackage{xcolor}
\newcommand \reshead [1]{\par \noindent \colorbox{black}{\begin{minipage}{\textwidth}{ \color{white} \centering \bfseries {#1}} \hfill \end{minipage}}}
\begin{document}
\begin{center}
\bfseries {\huge {Shashwat Pant}} \\
\bfseries E-Mail - shashwat.pant@gmail.com ~ Voice -
\hrule \hrule
\end{center}
\noindent Seeking a challenging career to gain experience in rich evolving computing in the areas of :
\begin{itemize}
\item
\item Parallel and Vector computing (Open CL)
\end{itemize}
\reshead{Professional Profile}
\end{document}
With my code the output look like this
Is there a way to stretch the colorbox
and underlying text a bit towards left so that are not in same symmetry?
Best Answer
Here is an option that you can use:
Some things I've changed:
\hrule\hrule
, use a specified rule width:\rule{\dimexpr\linewidth-2em}{2pt}
. With the horizontal movement, this rule overhangs on both sides by1em
;chngpage
which provides theadjustwidth
environment for modifying the margins locally; and\makebox
instead ofminipage
to specify the contents of your\reshead
. Also updated the width to fix within the margins exactly (\linewidth-2\fboxrule-2\fboxsep
).