4
  1. I want to extend the horizontal line and the colored box all the way to the end of the page, however using \hrulefill (instead of \hline, screws up the format.)

    This is my code: http://pastebin.com/Xd1jWqBb and this is what it looks like:

enter image description here

  1. Also, how do i reduce the gap between the colorbox and the start of the text within it?

  2. If I were to use Answer 2 (located in my code) i get this:

enter image description here

however the heading should be shifted towards the left. If I do that, how do i extend the color and the line all the way to the end.

So ultimately i want

enter image description here

but with the colorbox extended as well.

I posted a similar question and the above problems are the by products of the answers given from the other post. (Ref: How to edit the length of a color box?)

4
  • Please edit your question to add minimal working example (MWE) on this site. A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it).
    – jub0bs
    Commented May 24, 2013 at 9:12
  • Maybe you could use and \indent at the beginning of "Seeking a Full Time..." instead? Commented May 24, 2013 at 10:00
  • This appears to be the identical question to your previous one? Commented May 24, 2013 at 10:51
  • @David: No it wasnt identical, but as i said similar. this was a problem which was a byproduct of that
    – Karan
    Commented May 26, 2013 at 5:11

1 Answer 1

5

For such a color box problem I would recommend a color box package like mdframed or tcolorbox.

A tcolorbox solution would be:

\usepackage{tcolorbox}%  preamble AFTER \usepackage[usenames,dvipsnames]{color} 

...

\newcommand{\headergrey}[1]{%
  \begin{tcolorbox}[enlarge left by=-15pt,width=\linewidth+15pt,
    arc=0pt,toprule=0pt,bottomrule=0.4pt,leftrule=0pt,rightrule=0pt,
    boxsep=0pt,left=6pt,right=6pt,bottom=4pt,top=4pt,
    colback=black!10!white,fontupper=\scshape,
    after=\par\nobreak]#1\end{tcolorbox}}%

\headergrey{Objective}
Seeking a Full Time position in the area of balh blah blah blah.
\vspace*{6pt}

\headergrey{Education}
\school {University of Latex}{Latex U.S.A.}{May 2013}{Masters of Science in Latex}{Adviser: }{GPA: xxxx}

This gives the following result (with your output in comparison):

enter image description here

You can shift OBJECTIVE by adjusting the left=6pt option value.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .