4

Is there a way to limit the length of a hline, so that it behaves like a cline? What I want to achieve is to have the the double lines you will get, when calling \hline twice.

What I basically want is the following table without the first 'box' (7C0, 3700, 11111000000). And that the top, left, and bottom border of that column/row is removed.

sample table

Basically this MWE without the top and left border.

\documentclass{article}

\begin{document}
\begin{tabular}{|r|l|}
  \hline
  & hexadecimal \\
  & octal \\ \cline{2-2}
  & binary \\
  \hline \hline
  1984 & decimal \\
  \hline
\end{tabular}
\end{document}

3 Answers 3

6

If you only want the bottom half of the double line to extend to the first column you can use

enter image description here

\documentclass{article}
\usepackage{hhline}
\begin{document}
\begin{tabular}{r|l|}
  \hhline{~|-}
  & hexadecimal \\
  & octal \\ \cline{2-2}
  & binary \\
  \hhline{-:=}
  \multicolumn{1}{|r|}{1984} & decimal \\
  \hline
\end{tabular}
\end{document}
1

Like this?

enter image description here

\documentclass{standalone}

\begin{document}
\begin{tabular}{r|l|} \cline{2-2}
  & hexadecimal \\
  & octal \\ \cline{2-2}
  & binary \\
  \hline \hline
  \multicolumn{1}{|r|}{1984} & decimal \\
  \hline
\end{tabular}
\end{document}
1
  • Sorry, my bad explanation. I wanted the bottom border of the first hline removed as well. David Carlisle's answer is what I wanted, though I didn't explaine correctly. Commented Feb 26, 2014 at 13:06
0

A solution with only the package array.

\documentclass{article}
\usepackage{array}

\begin{document}

\begin{tabular}{|c|l|}
\cline{2-2} 
\multicolumn{1}{c|}{} & hexadecimal \\
\multicolumn{1}{c|}{} & octal \\
\cline{2-2} 
\multicolumn{1}{c|}{} & binary \\
\cline{2-2} 
\noalign{\vspace{\doublerulesep}}
\hline
1984 & decimal \\
\hline
\end{tabular}

\end{document}

Output of the above code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .