-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[colortbl] "breaks" '\hdotsfor' command #2
Comments
Hmm yes, colortbl does document that any commands that add stretchable glue to an array cell need adjusting, however I agree it isn't obvious that colortbl is being used here (it modifies the underlying array/tabular implementation so affects all arrays even if they do not use colour) I'll see what I can do |
colortbl already had some AtBeginDocument clauses fixing up specific
package incompatibilities, I think that here something like this should
work, I have added it to the test document but would be added to
colortbl.sty in a real fix
```
\documentclass{article}
\usepackage{colortbl}
\makeatletter
\AtBeginDocument{%
\ifx\hdots@for\@undefined\else
\def\hdots@for#1#2{\multicolumn{#2}c%
{\m@th\[email protected]\mkern-#1\dotsspace@
\hskip\stretch{-.5}%
\xleaders\hbox{$\m@th\mkern#1\dotsspace@.\mkern#1\dotsspace@$}%
\hfill
\hskip\stretch{-.5}%
\mkern-#1\dotsspace@}%
}%
\fi
}
\makeatother
\usepackage{amsmath}
\begin{document}
This is an example borrowed from the amsmath package documentation:
\begin{equation}
\begin{pmatrix}
D_1t&-a_{12}t_2&\dots&-a_{1n}t_n\\
-a_{21}t_1&D_2t&\dots&-a_{2n}t_n\\
\hdotsfor[2]{4}\\
-a_{n1}t_1&-a_{n2}t_2&\dots&D_nt
\end{pmatrix}
\end{equation}
\end{document}
```
|
Thank you, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I noticed that colortbl "breaks" '\hdotsfor' command from amsmath package. Please consider the following two examples.
First example without package 'colortbl':
Second example, with package 'colortbl'
The second example shows that '\hdotsfor' command works differently when the 'colortbl' package is used.
The text was updated successfully, but these errors were encountered: