[table]{xcolor} and array v2.4k conflictArrayjob vs array conflictLatex: rowcolor in tabular not respecting...

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

Using only 1s, make 29 with the minimum number of digits

Cat is tipping over bed-side lamps during the night

Is there a better way to make this?

Is there any differences between “gucken” and “schauen”?

Does Windows 10's telemetry include sending *.doc files if Word crashed?

Does 'rm -fr` remove the boot loader?

How would one buy a used TIE Fighter or X-Wing?

Why don't I see the difference between two different files in insert mode in vim?

Can we use the stored gravitational potential energy of a building to produce power?

Getting a UK passport renewed when you have dual nationality and a different name in your second country?

High pressure canisters of air as gun-less projectiles

What to do when being responsible for data protection in your lab, yet advice is ignored?

Manipulating a general length function

Quenching swords in dragon blood; why?

Avoiding morning and evening handshakes

How is the Incom shipyard still in business?

What is the wife of a henpecked husband called?

How to acknowledge an embarrassing job interview, now that I work directly with the interviewer?

Integral inequality of length of curve

Why is working on the same position for more than 15 years not a red flag?

How to deal with an incendiary email that was recalled

What is this metal M-shaped device for?

What is the time complexity of enqueue and dequeue of a queue implemented with a singly linked list?



[table]{xcolor} and array v2.4k conflict


Arrayjob vs array conflictLatex: rowcolor in tabular not respecting table widthtabu package - gaps in vertical linesDeclaring array of integersVertically aligning fixed height tablesIs there a simple way to create a latex equivalent of this (ms)word table template?Table xcolor @{,} rowcolor broken textLearning latex; not satisfied with my tablesAre beamer, hhline, and [table]{xcolor} incompatible?Zebra-effect table affects array environments













0















I'm trying to create a table with:




  1. different formatting across cells

  2. footnotes

  3. minipages

  4. 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 array package update, 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:




  1. Is it possible to use [table]{xcolor} and {array} together?

  2. 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{grey}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.









share|improve this question



























    0















    I'm trying to create a table with:




    1. different formatting across cells

    2. footnotes

    3. minipages

    4. 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 array package update, 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:




    1. Is it possible to use [table]{xcolor} and {array} together?

    2. 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{grey}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.









    share|improve this question

























      0












      0








      0








      I'm trying to create a table with:




      1. different formatting across cells

      2. footnotes

      3. minipages

      4. 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 array package update, 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:




      1. Is it possible to use [table]{xcolor} and {array} together?

      2. 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{grey}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.









      share|improve this question














      I'm trying to create a table with:




      1. different formatting across cells

      2. footnotes

      3. minipages

      4. 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 array package update, 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:




      1. Is it possible to use [table]{xcolor} and {array} together?

      2. 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{grey}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 rowcolor






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 mins ago









      user3754505user3754505

      243




      243






















          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
          });


          }
          });














          draft saved

          draft discarded


















          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
















          draft saved

          draft discarded




















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Can't compile dgruyter and caption packagesLaTeX templates/packages for writing a patent specificationLatex...

          Schneeberg (Smreczany) Bibliografia | Menu...

          Hans Bellmer Spis treści Życiorys | Upamiętnienie | Przypisy | Bibliografia | Linki zewnętrzne |...