Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm writing a document that will be printed for a hands-on workshop. I'd like to include some pages in the back of the handout that contain ruled tables that fill the page up to the margins. The trainees could then use this for writing comments, questions etc either for their notes or for feedback.

I'd like to be able to say: Draw a table with width = \textwidth, height = \textheight and 2 columns, the first being 3cm wide and the other filling the remaining space. In addition, I only want to specify the row height and have a table drawn with rules without explicitly coding each row.

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

I borrowed some code from exam.cls and slightly modified it to define a \myruledpage command with two mandatory arguments; the first one gives the length of the first column of rules, and the second one controls the separation between rules; a simple example:

\usepackage[paperheight=10cm]{geometry}% just for the example
% Code taken from exam.cls and modified

    \rule{#1}{\linefillthickness}\ \leaders\hrule height \linefillthickness \hfill\kern\z@}

  \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 #1 \hbox{}%





enter image description here

share|improve this answer
Perfect! Exactly what I wanted. The ability to control the width of the first column as well as the line height is fantastic! The speedy, well formed, useful and insightful responses from this site amazes me - Thanks! –  Nathan S. Watson-Haigh Oct 25 '12 at 20:18
add comment

It's not clear to me from the statement of your objectives if you want various horizontal rules within the table. I'll assume that this isn't the case as the participants' comments on various topics might vary greatly in length; hence, I'll assume that you want horizontal rules only at the top (to delimit the header row) and at the very bottom of each table. With that in mind, I'd recommend using the tabularx package as well as the booktabs package. The latter comes in handy for drawing well-spaced horizontal rules.

The following MWE illustrates how this might be done.


\begin{tabularx}{\textwidth}{@{} p{3cm} X} % "X" column seizes remaining space
Topic & Comment\\
share|improve this answer
add comment

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.