I have the following code:
\documentclass{article}
\usepackage{amssymb}
\usepackage{caption,sansmath}
\usepackage{array}
\DeclareCaptionFont{sansmath}{\sansmath}
\captionsetup{textfont={sf,sansmath}}
\newlength\Origarrayrulewidth
% horizontal rule equivalent to \cline but with 2pt width
\newcommand{\Cline}[1]{%
\noalign{\global\setlength\Origarrayrulewidth{\arrayrulewidth}}%
\noalign{\global\setlength\arrayrulewidth{2pt}}\cline{#1}%
\noalign{\global\setlength\arrayrulewidth{\Origarrayrulewidth}}%
}
% draw a vertical rule of width 2pt on both sides of a cell
\newcommand\Thickvrule[1]{%
\multicolumn{1}{!{\vrule width 2pt}c!{\vrule width 2pt}}{#1}%
}
% draw a vertical rule of width 2pt on the left side of a cell
\newcommand\Thickvrulel[1]{%
\multicolumn{1}{!{\vrule width 2pt}c|}{#1}%
}
% draw a vertical rule of width 2pt on the right side of a cell
\newcommand\Thickvruler[1]{%
\multicolumn{1}{|c!{\vrule width 2pt}}{#1}%
}
% Square cells in the matrix, so we just increase the space between rows
\renewcommand{\arraystretch}{1.5}
\begin{document}
\begin{table}
\parbox{.45\linewidth}{
\centering
\begin{tabular}{ c |c|c|c|c|c|}
\multicolumn{1}{c}{~} & \multicolumn{1}{c}{$c_{1}$} & \multicolumn{1}{c}{$c_{2}$} & \multicolumn{1}{c}{$c_{3}$} & \multicolumn{1}{c}{$c_{4}$} & \multicolumn{1}{c}{$c_{5}$} \\ \cline{2-6}
$r_{1}$ & 2 & 8 & 4 & 5 & 3 \\ \cline{2-6}
$r_{2}$ & 4 & 9 & 6 & 7 & 1 \\ \cline{2-6}
$r_{3}$ & 3 & 4 & 2 & 0 & 9 \\ \cline{2-6}
$r_{4}$ & 1 & 0 & 9 & 8 & 4 \\ \cline{2-6}
$r_{5}$ & 8 & 3 & 7 & 6 & 5 \\ \cline{2-6}
\end{tabular}
\caption{}
}
\hfill
\parbox{.45\linewidth}{
\centering
\begin{tabular}{ c |c|c|c|c|c|}
\multicolumn{1}{c}{~} & \multicolumn{1}{c}{1} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{5} \\ \Cline{2-2}\cline{2-6}
1 & \Thickvrule{\hspace{0.8em}} & \hspace{0.8em} & \hspace{0.8em} & \hspace{0.8em} & \hspace{0.8em} \\ \Cline{2-3}\cline{3-6}
2 & \hspace{0.8em} & \Thickvrule{~} & \hspace{0.8em} & \hspace{0.8em} &\hspace{0.8em} \\ \cline{2-3}\Cline{3-4}\cline{4-6}
3 & \hspace{0.8em} & \hspace{0.8em} & \Thickvrule{\hspace{0.8em}} & \hspace{0.8em} & \hspace{0.8em} \\ \cline{2-4}\Cline{4-5}\cline{6-6}
4 & \hspace{0.8em} & \hspace{0.8em} & \hspace{0.8em} & \Thickvrule{\hspace{0.8em}} & \hspace{0.8em} \\ \cline{2-5}\Cline{5-6}
5 & \hspace{0.8em} & \hspace{0.8em} & \hspace{0.8em} & \hspace{0.8em} & \Thickvrule{\hspace{0.8em}} \\ \cline{2-6}\Cline{6-6}
\end{tabular}
\caption{}
}
\end{table}
\end{document}
This code was copied from here:
Change border of a few cells in a table
The code is correct. When I am trying to use the pdfpages package, the thick horizontal line is not shown. Could you please answer what is the reason? When I remove this package, the line is shown successfully. I have a lot of matrices in the article, I can't remove them or rewrite, but also I must add an appendix at the end of the document.
After redefining \setlength I have the error:
! Missing number, treated as zero.
<to be read again>
(
l.1584 \includepdf[pages=-]{nosingl1.pdf}
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
! Illegal unit of measure (pt inserted).
<to be read again>
(
l.1584 \includepdf[pages=-]{nosingl1.pdf}
Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)
If I don't redefine it, the code is compiled successfully, that is the compilation error occurs when I am including a pdf file:
\includepdf[pages=-]{nosingl1.pdf}
\includepdf[angle=90]{nosingl2.pdf}
\includepdf[angle=90]{nosingl3.pdf}

pdfpagespackage, ..." is ambiguous: Are you trying to include the output of the current MWE in some other file and that's when the problem occurs, or does the mere loading of thepdfpagesdocument in the current document cause the problem behavior? Please elaborate. – Mico Jun 24 '12 at 18:14texpowerpackage which is required bypdfpagespackage. Just add\usepackage{texpower}and you get the same effect (\Clinedon't produce thick rule). – Paul Gaborit Jun 24 '12 at 20:25pdfpagesdoesn't loadtexpower... well, not in version 2012/04/03 v0.4s. – Werner Jun 24 '12 at 20:47calcpackage which is required bypdfpagespackage. Just add\usepackage{calc}and you get the same effect (\Clinedon't produce thick rule).calcredefines\setlength. – Paul Gaborit Jun 24 '12 at 21:05