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'm using the exam package and want to use \fillwithlines{\stretch{1}} but only so it goes .6\textwidth across the page. I've tried using minipage, parbox, and makebox, but none of them work with the \stretch{1} command.

The code below does not print any lines at all.


        \question Question\newline
share|improve this question
Welcome to TeX.SE! Please edit your question to provide a MWE (minimum working example) of a LaTeX program that generates the issues you're trying to solve. – Mico Nov 2 '12 at 11:11
up vote 3 down vote accepted

Use the following variation of \fillwithlines allowing you to specify as optional argument the width of the lines (default=\textwidth):


    \leaders\hrule height \linefillthickness\hfill%

  \hrule height \z@
  \setbox0=\hbox to \hsize{\hskip \@totalleftmargin
          \vrule height \linefillheight depth \z@ width \z@
  % We use \cleaders (rather than \leaders) so that a given
  % vertical space will always produce the same number of lines
  % no matter where on the page it happens to start:
  \cleaders \copy0 \vskip #2 \hbox{}%

        \question Question\newline
share|improve this answer

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.