TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to put a horizontal line between homework problems, like this:

%stuff . . .
\item[Exercise 1]

If I knew how to get this to display on this website, you would see that the line begins over the second 'e' of 'Exercise', and looks off, as one would like the line to be exactly aligned over the capital 'E'. Does anyone know how to do this?

share|improve this question
Try \hspace*{\dimexpr-\labelwidth-\leftmargin\relax}\rule{\linewidth}{0.4mm} – Peter Grill Mar 9 '12 at 0:47
That translates the whole line left, leaving the right side of the text "un-underlined". – Nick Thompson Mar 9 '12 at 1:00
Of course, I forgot to adjust the right hand side: \hspace*{\dimexpr-\labelwidth-\leftmargin\relax}\rule{\dimexpr\linewidth+\label‌​width+\leftmargin\relax}{0.4mm}. But solution below seems to work just fine. – Peter Grill Mar 9 '12 at 1:05
Ah! That works! Thanks. – Nick Thompson Mar 9 '12 at 1:28
up vote 5 down vote accepted

This is a bit of a kludge, but it seems to work.

\usepackage{showframe} % as per PeterGrill's suggestion

   \item[Exercise 1] ...

   \item[Exercise 2] ...

    \item[Exercise 3] ...
share|improve this answer
Thank you very much! That worked perfectly. (I would accept this answer but I don't have enough rep!) – Nick Thompson Mar 9 '12 at 0:49
Excellent!!. If you add \usepackage{showframe} you get a nice image to show that the line is indeed the full width. – Peter Grill Mar 9 '12 at 1:06
neat! Didn't know about that package :) – huon Mar 9 '12 at 1:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.