[table]{xcolor} and array v2.4k conflict
I'm trying to create a table with:
- different formatting across cells
- footnotes
- minipages
- coloured rows
For the coloured rows I'm trying to use xcolor
with the [table]
option.
However, this throws an error with the >{bfseries}
column spec. I'm using MiKTeX 2.9.6972 on Windows 10 x64 and version 2.4k of the array
package as described in here, and XeLaTeX to compile (although PDFLaTeX seems to generate the same error). This works if I switch off the xcolor
package, but then the rowcolor
command is no longer available.
My question is two-fold:
- Is it possible to use
[table]{xcolor}
and{array}
together? - If not, is there an alternative to color a row of a table?
MWE:
documentclass{article}
usepackage[table]{xcolor} % works if we remove the 'table' option, but then we don't have access to cellcolor/rowcolor
%usepackage{xcolor}
usepackage{booktabs}
% force the new array package to be loaded.
usepackage{tabularx}
% https://texfaq.org/FAQ-wholerow
newcolumntype{@}{>{globalletcurrentrowstylerelax}}
newcolumntype{^}{>{currentrowstyle}}
newcommand{rowstyle}[1]{gdefcurrentrowstyle{#1}%
#1ignorespaces
}
begin{document}
begin{tabular}{>{bfseries}@p{5.5cm}^r}
Col A & Col B \
midrule
rowstyle{bfseriesitshapelarge}This row should be large, bold, italics with shading & So this cell too. \
rowcolor{blue}This bold but shaded & this just normal.footnote{I.e., no extra mark-up} \
Remark & multicolumn{1}{c}{begin{minipage}[t]{3.5cm}raggedright {footnotesize Some cells are included as a minipage to accommodate extra text.}end{minipage}} \
midrule
end{tabular}
end{document}
The error I get is:
! Use of @startpbox doesn't match its definition.
<inserted text> @startpbox {
>{bfseries }@p{5.5cm}^r}
l.19 begin{tabular}{>{bfseries}@p{5.5cm}^r}
If you say, e.g., `defa1{...}', then you must always put `1' after `a',
since control sequence names are made up of letters only.
The macro here has not been followed by the required stuff, so I'm ignoring
it.
! LaTeX Error: Command bfseries invalid in math mode.
tables color miktex
|
show 3 more comments
I'm trying to create a table with:
- different formatting across cells
- footnotes
- minipages
- coloured rows
For the coloured rows I'm trying to use xcolor
with the [table]
option.
However, this throws an error with the >{bfseries}
column spec. I'm using MiKTeX 2.9.6972 on Windows 10 x64 and version 2.4k of the array
package as described in here, and XeLaTeX to compile (although PDFLaTeX seems to generate the same error). This works if I switch off the xcolor
package, but then the rowcolor
command is no longer available.
My question is two-fold:
- Is it possible to use
[table]{xcolor}
and{array}
together? - If not, is there an alternative to color a row of a table?
MWE:
documentclass{article}
usepackage[table]{xcolor} % works if we remove the 'table' option, but then we don't have access to cellcolor/rowcolor
%usepackage{xcolor}
usepackage{booktabs}
% force the new array package to be loaded.
usepackage{tabularx}
% https://texfaq.org/FAQ-wholerow
newcolumntype{@}{>{globalletcurrentrowstylerelax}}
newcolumntype{^}{>{currentrowstyle}}
newcommand{rowstyle}[1]{gdefcurrentrowstyle{#1}%
#1ignorespaces
}
begin{document}
begin{tabular}{>{bfseries}@p{5.5cm}^r}
Col A & Col B \
midrule
rowstyle{bfseriesitshapelarge}This row should be large, bold, italics with shading & So this cell too. \
rowcolor{blue}This bold but shaded & this just normal.footnote{I.e., no extra mark-up} \
Remark & multicolumn{1}{c}{begin{minipage}[t]{3.5cm}raggedright {footnotesize Some cells are included as a minipage to accommodate extra text.}end{minipage}} \
midrule
end{tabular}
end{document}
The error I get is:
! Use of @startpbox doesn't match its definition.
<inserted text> @startpbox {
>{bfseries }@p{5.5cm}^r}
l.19 begin{tabular}{>{bfseries}@p{5.5cm}^r}
If you say, e.g., `defa1{...}', then you must always put `1' after `a',
since control sequence names are made up of letters only.
The macro here has not been followed by the required stuff, so I'm ignoring
it.
! LaTeX Error: Command bfseries invalid in math mode.
tables color miktex
1
you look like you have an old version somewhere, can you post your log file for the above, after defining grey?
– David Carlisle
Mar 3 at 7:35
2
We do not like going to sites for data. I cannot read from Dropbox on my tablet, but remember: under miktex you essentially have two installations, admin and user. If you only updated admin, user may still have an old version dangling (user takes precedence). Did you update as both user and admin?
– daleif
Mar 3 at 7:42
1
Now I got access to the log. As expected, you have old versions dangling under AppData (see the log)
– daleif
Mar 3 at 7:43
1
standard miktex issue (it's the only thing I know about miktex:-) you only updated half of it you have an old xcolor in C:UsersthijsvAppDataRoamingMiKTeX2.9tex/latex/xcolorxcolor.sty
– David Carlisle
Mar 3 at 7:44
3
See also tex.stackexchange.com/q/55437/35864 and tex.stackexchange.com/q/108447/35864. If you installed MikTeX as a multi-user system, you will have two more or less independent package trees: One managed by the user and one by the admin. Files in the user tree are given preference over the global admin files. If you update your system it is important to update in both admin and user mode to make sure that everything is up to date and that versions match. Contrary to what one might think the Admin updater is not more powerful in that it would also update the user installs.
– moewe
Mar 3 at 7:51
|
show 3 more comments
I'm trying to create a table with:
- different formatting across cells
- footnotes
- minipages
- coloured rows
For the coloured rows I'm trying to use xcolor
with the [table]
option.
However, this throws an error with the >{bfseries}
column spec. I'm using MiKTeX 2.9.6972 on Windows 10 x64 and version 2.4k of the array
package as described in here, and XeLaTeX to compile (although PDFLaTeX seems to generate the same error). This works if I switch off the xcolor
package, but then the rowcolor
command is no longer available.
My question is two-fold:
- Is it possible to use
[table]{xcolor}
and{array}
together? - If not, is there an alternative to color a row of a table?
MWE:
documentclass{article}
usepackage[table]{xcolor} % works if we remove the 'table' option, but then we don't have access to cellcolor/rowcolor
%usepackage{xcolor}
usepackage{booktabs}
% force the new array package to be loaded.
usepackage{tabularx}
% https://texfaq.org/FAQ-wholerow
newcolumntype{@}{>{globalletcurrentrowstylerelax}}
newcolumntype{^}{>{currentrowstyle}}
newcommand{rowstyle}[1]{gdefcurrentrowstyle{#1}%
#1ignorespaces
}
begin{document}
begin{tabular}{>{bfseries}@p{5.5cm}^r}
Col A & Col B \
midrule
rowstyle{bfseriesitshapelarge}This row should be large, bold, italics with shading & So this cell too. \
rowcolor{blue}This bold but shaded & this just normal.footnote{I.e., no extra mark-up} \
Remark & multicolumn{1}{c}{begin{minipage}[t]{3.5cm}raggedright {footnotesize Some cells are included as a minipage to accommodate extra text.}end{minipage}} \
midrule
end{tabular}
end{document}
The error I get is:
! Use of @startpbox doesn't match its definition.
<inserted text> @startpbox {
>{bfseries }@p{5.5cm}^r}
l.19 begin{tabular}{>{bfseries}@p{5.5cm}^r}
If you say, e.g., `defa1{...}', then you must always put `1' after `a',
since control sequence names are made up of letters only.
The macro here has not been followed by the required stuff, so I'm ignoring
it.
! LaTeX Error: Command bfseries invalid in math mode.
tables color miktex
I'm trying to create a table with:
- different formatting across cells
- footnotes
- minipages
- coloured rows
For the coloured rows I'm trying to use xcolor
with the [table]
option.
However, this throws an error with the >{bfseries}
column spec. I'm using MiKTeX 2.9.6972 on Windows 10 x64 and version 2.4k of the array
package as described in here, and XeLaTeX to compile (although PDFLaTeX seems to generate the same error). This works if I switch off the xcolor
package, but then the rowcolor
command is no longer available.
My question is two-fold:
- Is it possible to use
[table]{xcolor}
and{array}
together? - If not, is there an alternative to color a row of a table?
MWE:
documentclass{article}
usepackage[table]{xcolor} % works if we remove the 'table' option, but then we don't have access to cellcolor/rowcolor
%usepackage{xcolor}
usepackage{booktabs}
% force the new array package to be loaded.
usepackage{tabularx}
% https://texfaq.org/FAQ-wholerow
newcolumntype{@}{>{globalletcurrentrowstylerelax}}
newcolumntype{^}{>{currentrowstyle}}
newcommand{rowstyle}[1]{gdefcurrentrowstyle{#1}%
#1ignorespaces
}
begin{document}
begin{tabular}{>{bfseries}@p{5.5cm}^r}
Col A & Col B \
midrule
rowstyle{bfseriesitshapelarge}This row should be large, bold, italics with shading & So this cell too. \
rowcolor{blue}This bold but shaded & this just normal.footnote{I.e., no extra mark-up} \
Remark & multicolumn{1}{c}{begin{minipage}[t]{3.5cm}raggedright {footnotesize Some cells are included as a minipage to accommodate extra text.}end{minipage}} \
midrule
end{tabular}
end{document}
The error I get is:
! Use of @startpbox doesn't match its definition.
<inserted text> @startpbox {
>{bfseries }@p{5.5cm}^r}
l.19 begin{tabular}{>{bfseries}@p{5.5cm}^r}
If you say, e.g., `defa1{...}', then you must always put `1' after `a',
since control sequence names are made up of letters only.
The macro here has not been followed by the required stuff, so I'm ignoring
it.
! LaTeX Error: Command bfseries invalid in math mode.
tables color miktex
tables color miktex
edited Mar 3 at 9:07
Mico
282k31385774
282k31385774
asked Mar 3 at 6:59
user3754505user3754505
294
294
1
you look like you have an old version somewhere, can you post your log file for the above, after defining grey?
– David Carlisle
Mar 3 at 7:35
2
We do not like going to sites for data. I cannot read from Dropbox on my tablet, but remember: under miktex you essentially have two installations, admin and user. If you only updated admin, user may still have an old version dangling (user takes precedence). Did you update as both user and admin?
– daleif
Mar 3 at 7:42
1
Now I got access to the log. As expected, you have old versions dangling under AppData (see the log)
– daleif
Mar 3 at 7:43
1
standard miktex issue (it's the only thing I know about miktex:-) you only updated half of it you have an old xcolor in C:UsersthijsvAppDataRoamingMiKTeX2.9tex/latex/xcolorxcolor.sty
– David Carlisle
Mar 3 at 7:44
3
See also tex.stackexchange.com/q/55437/35864 and tex.stackexchange.com/q/108447/35864. If you installed MikTeX as a multi-user system, you will have two more or less independent package trees: One managed by the user and one by the admin. Files in the user tree are given preference over the global admin files. If you update your system it is important to update in both admin and user mode to make sure that everything is up to date and that versions match. Contrary to what one might think the Admin updater is not more powerful in that it would also update the user installs.
– moewe
Mar 3 at 7:51
|
show 3 more comments
1
you look like you have an old version somewhere, can you post your log file for the above, after defining grey?
– David Carlisle
Mar 3 at 7:35
2
We do not like going to sites for data. I cannot read from Dropbox on my tablet, but remember: under miktex you essentially have two installations, admin and user. If you only updated admin, user may still have an old version dangling (user takes precedence). Did you update as both user and admin?
– daleif
Mar 3 at 7:42
1
Now I got access to the log. As expected, you have old versions dangling under AppData (see the log)
– daleif
Mar 3 at 7:43
1
standard miktex issue (it's the only thing I know about miktex:-) you only updated half of it you have an old xcolor in C:UsersthijsvAppDataRoamingMiKTeX2.9tex/latex/xcolorxcolor.sty
– David Carlisle
Mar 3 at 7:44
3
See also tex.stackexchange.com/q/55437/35864 and tex.stackexchange.com/q/108447/35864. If you installed MikTeX as a multi-user system, you will have two more or less independent package trees: One managed by the user and one by the admin. Files in the user tree are given preference over the global admin files. If you update your system it is important to update in both admin and user mode to make sure that everything is up to date and that versions match. Contrary to what one might think the Admin updater is not more powerful in that it would also update the user installs.
– moewe
Mar 3 at 7:51
1
1
you look like you have an old version somewhere, can you post your log file for the above, after defining grey?
– David Carlisle
Mar 3 at 7:35
you look like you have an old version somewhere, can you post your log file for the above, after defining grey?
– David Carlisle
Mar 3 at 7:35
2
2
We do not like going to sites for data. I cannot read from Dropbox on my tablet, but remember: under miktex you essentially have two installations, admin and user. If you only updated admin, user may still have an old version dangling (user takes precedence). Did you update as both user and admin?
– daleif
Mar 3 at 7:42
We do not like going to sites for data. I cannot read from Dropbox on my tablet, but remember: under miktex you essentially have two installations, admin and user. If you only updated admin, user may still have an old version dangling (user takes precedence). Did you update as both user and admin?
– daleif
Mar 3 at 7:42
1
1
Now I got access to the log. As expected, you have old versions dangling under AppData (see the log)
– daleif
Mar 3 at 7:43
Now I got access to the log. As expected, you have old versions dangling under AppData (see the log)
– daleif
Mar 3 at 7:43
1
1
standard miktex issue (it's the only thing I know about miktex:-) you only updated half of it you have an old xcolor in C:UsersthijsvAppDataRoamingMiKTeX2.9tex/latex/xcolorxcolor.sty
– David Carlisle
Mar 3 at 7:44
standard miktex issue (it's the only thing I know about miktex:-) you only updated half of it you have an old xcolor in C:UsersthijsvAppDataRoamingMiKTeX2.9tex/latex/xcolorxcolor.sty
– David Carlisle
Mar 3 at 7:44
3
3
See also tex.stackexchange.com/q/55437/35864 and tex.stackexchange.com/q/108447/35864. If you installed MikTeX as a multi-user system, you will have two more or less independent package trees: One managed by the user and one by the admin. Files in the user tree are given preference over the global admin files. If you update your system it is important to update in both admin and user mode to make sure that everything is up to date and that versions match. Contrary to what one might think the Admin updater is not more powerful in that it would also update the user installs.
– moewe
Mar 3 at 7:51
See also tex.stackexchange.com/q/55437/35864 and tex.stackexchange.com/q/108447/35864. If you installed MikTeX as a multi-user system, you will have two more or less independent package trees: One managed by the user and one by the admin. Files in the user tree are given preference over the global admin files. If you update your system it is important to update in both admin and user mode to make sure that everything is up to date and that versions match. Contrary to what one might think the Admin updater is not more powerful in that it would also update the user installs.
– moewe
Mar 3 at 7:51
|
show 3 more comments
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477514%2ftablexcolor-and-array-v2-4k-conflict%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477514%2ftablexcolor-and-array-v2-4k-conflict%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
you look like you have an old version somewhere, can you post your log file for the above, after defining grey?
– David Carlisle
Mar 3 at 7:35
2
We do not like going to sites for data. I cannot read from Dropbox on my tablet, but remember: under miktex you essentially have two installations, admin and user. If you only updated admin, user may still have an old version dangling (user takes precedence). Did you update as both user and admin?
– daleif
Mar 3 at 7:42
1
Now I got access to the log. As expected, you have old versions dangling under AppData (see the log)
– daleif
Mar 3 at 7:43
1
standard miktex issue (it's the only thing I know about miktex:-) you only updated half of it you have an old xcolor in C:UsersthijsvAppDataRoamingMiKTeX2.9tex/latex/xcolorxcolor.sty
– David Carlisle
Mar 3 at 7:44
3
See also tex.stackexchange.com/q/55437/35864 and tex.stackexchange.com/q/108447/35864. If you installed MikTeX as a multi-user system, you will have two more or less independent package trees: One managed by the user and one by the admin. Files in the user tree are given preference over the global admin files. If you update your system it is important to update in both admin and user mode to make sure that everything is up to date and that versions match. Contrary to what one might think the Admin updater is not more powerful in that it would also update the user installs.
– moewe
Mar 3 at 7:51