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.

Possible Duplicate:
Create a vertical line in a table that spans a range of rows but not all rows

The \cline command draws horizontal lines across the columns specified, beginning in column i and ending in column j, which are identified in the mandatory argument.

I would like to have a similar command vertical line across the rows, so that it is possible, for example, to draw a "ladder".

share|improve this question

marked as duplicate by lockstep, egreg, Gonzalo Medina, Joseph Wright Sep 21 '11 at 7:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers 2

You have to create a \multicolumn{1}{c|}{...} for that column cells.

share|improve this answer
add comment

It wasn't quite clear what knowledge level you have at the moment. In general a vertical line is produced by inserting a "pipe" character, which is on the "\" key or Alt + 0124. The | is placed on one side or other of a column specifier such as "c". If all you want to do is create a ladder with no missing pieces then you might want:

\begin{tabular}{|c|}
          \\[1cm] 
   \hline \\[1cm]
   \hline \\[1cm]
   \hline \\[1cm]
   \hline \\[1cm]
   \hline \\[1cm]
\end{tabular}

where the \\[1cm] tells it to leave a 1cm gap after row.

If you want to have missing parts of the ladder, then you need Herbert's suggestion. Replacing a given row with \multicolumn{1}{c}{} will tell it to affect 1 column (first argument) and replace the |c| with just c (second argument) and hence remove the lines either side of the ladder. The final argument is what ever you want to appear in the cell, if anything.

To make it easy for you, if you replace one of the lines of the code for the ladder with: \hline \multicolumn{1}{c|}{} \\[1cm] which was in basically what Herbert was suggesting, then between two rungs of the ladder, the left most vertical will be missed out.

If you want to make you ladder wider, while keeping it blank, then you can insert \hspace{3cm} between the \hline and the \\[1cm] on a line of your choice.

Hope that helps

share|improve this answer
add comment

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