# Is there a command similar to \cline{i-j} but works with vertical line? [duplicate]

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".

-

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

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

-

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

-