calstable
is always left aligned.
\documentclass{article}
\usepackage{cals}
\begin{document}
\begin{center}
\begin{calstable}
\colwidths{{1.5cm}{1.5cm}{1.5cm}}
\brow\cell{test1}\cell{test2}\cell{test3}\erow
\brow\cell{test1}\cell{test2}\cell{test3}\erow
\end{calstable}
\end{center}
\end{document}
As you can see center
environment has no effect. How can you change the alignment of calstable
environment?
Note: This is a multipage table so putting it inside minipage will not help. I am also not looking to load another package to fix this.
Edit: David's solution work, however if you add bottom rule, it does not move to center:
\documentclass{article}
\usepackage{cals}
\makeatletter
\renewcommand\cals@issue@row{%
\nointerlineskip
\setbox0=\vtop{\hbox to \textwidth{\hskip\leftskip \box\cals@current@cs \hskip\rightskip}}%
\ht0=0pt \box0
\nointerlineskip
\hbox to \textwidth{\hskip\leftskip\hbox{\cals@issue@rowsep}\hskip\rightskip}%
\nointerlineskip
\hbox to \textwidth{\hskip\leftskip \box\cals@current@row \hskip\rightskip}%
\let\cals@last@rs@below=\cals@current@rs@below
\let\cals@last@context=\cals@current@context}
\makeatother
\begin{document}
\begin{calstable}\leftskip\fill\rightskip\fill
\makeatletter
\def\cals@borderB{0.4pt}
\makeatother
\colwidths{{1.5cm}{1.5cm}{1.5cm}}
\brow\cell{test1}\cell{test2}\cell{test3}\erow
\brow\cell{test1}\cell{test2}\cell{test3}\erow
\end{calstable}
\end{document}