Table: Alternating rowcolours / bandingHow to create alternating rows in a table?Table rows alternating between column and notes-rowTable with colored rows alternating every n rowsSideways label for table with alternating row coloursAlternating row color two at a time in tablesAlternating column AND row colors with tabu?Alternating row colours in tabulary?Alternating coloured rows in table - line width of colouring -how do I have alternating background colors for a table?Alternating color in itemize

What should you do when eye contact makes your subordinate uncomfortable?

Is there a way to get `mathscr' with lower case letters in pdfLaTeX?

On a tidally locked planet, would time be quantized?

Calculating total slots

Does the Linux kernel need a file system to run?

Why should universal income be universal?

When were female captains banned from Starfleet?

How does the math work for Perception checks?

Mimic lecturing on blackboard, facing audience

What is Cash Advance APR?

Keeping a ball lost forever

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

Invalid date error by date command

Yosemite Fire Rings - What to Expect?

Open a doc from terminal, but not by its name

Limits and Infinite Integration by Parts

How do you make your own symbol when Detexify fails?

Biological Blimps: Propulsion

Why would a new[] expression ever invoke a destructor?

Why is this estimator biased?

Creepy dinosaur pc game identification

Can I still be respawned if I die by falling off the map?

Hero deduces identity of a killer

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?



Table: Alternating rowcolours / banding


How to create alternating rows in a table?Table rows alternating between column and notes-rowTable with colored rows alternating every n rowsSideways label for table with alternating row coloursAlternating row color two at a time in tablesAlternating column AND row colors with tabu?Alternating row colours in tabulary?Alternating coloured rows in table - line width of colouring -how do I have alternating background colors for a table?Alternating color in itemize













0















I have a table with over 400 entries. I wanted to make it more readable by colouring the cells in grey and white. I know how to do it with a regular table. But I cannot get it to work with a longtable environment. Thanks!



Below: A two page MWE.



documentclass[11pt]article

usepackage[dvipsnames, table]xcolor
usepackagelongtable
usepackagebooktabs


begindocument

beginlongtable
>centeringarraybackslashm1cm
>centeringarraybackslashm4cm
>centeringarraybackslashm7cm
>centeringarraybackslashm1.8cm


%header
rowcolor[rgb] .149, .149, .149
textcolor[rgb] 1, 1, 1textbfID &
textcolor[rgb] 1, 1, 1textbfJournal &
textcolor[rgb] 1, 1, 1textbfArticle &
textcolor[rgb] 1, 1, 1textbfYear \
%content
1 & arxiv & Platzhalter & 2019 \
midrule
2 & arxiv & Platzhalter & 2019 \
midrule
3 & arxiv & Platzhalter & 2019 \
midrule
4 & arxiv & Platzhalter & 2019 \
midrule
5 & arxiv & Platzhalter & 2019 \
midrule
6 & arxiv & Platzhalter & 2019 \
midrule
7 & arxiv & Platzhalter & 2019 \
midrule
8 & arxiv & Platzhalter & 2019 \
midrule
9 & arxiv & Platzhalter & 2019 \
midrule
10 & arxiv & Platzhalter & 2019 \
midrule
11 & arxiv & Platzhalter & 2019 \
midrule
12 & arxiv & Platzhalter & 2019 \
midrule
13 & arxiv & Platzhalter & 2019 \
midrule
14 & arxiv & Platzhalter & 2019 \
midrule
15 & arxiv & Platzhalter & 2019 \
midrule
16 & arxiv & Platzhalter & 2019 \
midrule
17 & arxiv & Platzhalter & 2019 \
midrule
18 & arxiv & Platzhalter & 2019 \
midrule
19 & arxiv & Platzhalter & 2019 \
midrule
20 & arxiv & Platzhalter & 2019 \
midrule
21 & arxiv & Platzhalter & 2019 \
midrule
22 & arxiv & Platzhalter & 2019 \
midrule
23 & arxiv & Platzhalter & 2019 \
midrule
24 & arxiv & Platzhalter & 2019 \
midrule
25 & arxiv & Platzhalter & 2019 \
midrule
26 & arxiv & Platzhalter & 2019 \
midrule
27 & arxiv & Platzhalter & 2019 \
midrule
28 & arxiv & Platzhalter & 2019 \
midrule
29 & arxiv & Platzhalter & 2019 \
midrule
30 & arxiv & Platzhalter & 2019 \
midrule
31 & arxiv & Platzhalter & 2019 \
midrule
32 & arxiv & Platzhalter & 2019 \
midrule
33 & arxiv & Platzhalter & 2019 \
midrule
34 & arxiv & Platzhalter & 2019 \
midrule
35 & arxiv & Platzhalter & 2019 \
bottomrule
endlongtable
labeltab:addlabel


enddocument









share


























    0















    I have a table with over 400 entries. I wanted to make it more readable by colouring the cells in grey and white. I know how to do it with a regular table. But I cannot get it to work with a longtable environment. Thanks!



    Below: A two page MWE.



    documentclass[11pt]article

    usepackage[dvipsnames, table]xcolor
    usepackagelongtable
    usepackagebooktabs


    begindocument

    beginlongtable
    >centeringarraybackslashm1cm
    >centeringarraybackslashm4cm
    >centeringarraybackslashm7cm
    >centeringarraybackslashm1.8cm


    %header
    rowcolor[rgb] .149, .149, .149
    textcolor[rgb] 1, 1, 1textbfID &
    textcolor[rgb] 1, 1, 1textbfJournal &
    textcolor[rgb] 1, 1, 1textbfArticle &
    textcolor[rgb] 1, 1, 1textbfYear \
    %content
    1 & arxiv & Platzhalter & 2019 \
    midrule
    2 & arxiv & Platzhalter & 2019 \
    midrule
    3 & arxiv & Platzhalter & 2019 \
    midrule
    4 & arxiv & Platzhalter & 2019 \
    midrule
    5 & arxiv & Platzhalter & 2019 \
    midrule
    6 & arxiv & Platzhalter & 2019 \
    midrule
    7 & arxiv & Platzhalter & 2019 \
    midrule
    8 & arxiv & Platzhalter & 2019 \
    midrule
    9 & arxiv & Platzhalter & 2019 \
    midrule
    10 & arxiv & Platzhalter & 2019 \
    midrule
    11 & arxiv & Platzhalter & 2019 \
    midrule
    12 & arxiv & Platzhalter & 2019 \
    midrule
    13 & arxiv & Platzhalter & 2019 \
    midrule
    14 & arxiv & Platzhalter & 2019 \
    midrule
    15 & arxiv & Platzhalter & 2019 \
    midrule
    16 & arxiv & Platzhalter & 2019 \
    midrule
    17 & arxiv & Platzhalter & 2019 \
    midrule
    18 & arxiv & Platzhalter & 2019 \
    midrule
    19 & arxiv & Platzhalter & 2019 \
    midrule
    20 & arxiv & Platzhalter & 2019 \
    midrule
    21 & arxiv & Platzhalter & 2019 \
    midrule
    22 & arxiv & Platzhalter & 2019 \
    midrule
    23 & arxiv & Platzhalter & 2019 \
    midrule
    24 & arxiv & Platzhalter & 2019 \
    midrule
    25 & arxiv & Platzhalter & 2019 \
    midrule
    26 & arxiv & Platzhalter & 2019 \
    midrule
    27 & arxiv & Platzhalter & 2019 \
    midrule
    28 & arxiv & Platzhalter & 2019 \
    midrule
    29 & arxiv & Platzhalter & 2019 \
    midrule
    30 & arxiv & Platzhalter & 2019 \
    midrule
    31 & arxiv & Platzhalter & 2019 \
    midrule
    32 & arxiv & Platzhalter & 2019 \
    midrule
    33 & arxiv & Platzhalter & 2019 \
    midrule
    34 & arxiv & Platzhalter & 2019 \
    midrule
    35 & arxiv & Platzhalter & 2019 \
    bottomrule
    endlongtable
    labeltab:addlabel


    enddocument









    share
























      0












      0








      0








      I have a table with over 400 entries. I wanted to make it more readable by colouring the cells in grey and white. I know how to do it with a regular table. But I cannot get it to work with a longtable environment. Thanks!



      Below: A two page MWE.



      documentclass[11pt]article

      usepackage[dvipsnames, table]xcolor
      usepackagelongtable
      usepackagebooktabs


      begindocument

      beginlongtable
      >centeringarraybackslashm1cm
      >centeringarraybackslashm4cm
      >centeringarraybackslashm7cm
      >centeringarraybackslashm1.8cm


      %header
      rowcolor[rgb] .149, .149, .149
      textcolor[rgb] 1, 1, 1textbfID &
      textcolor[rgb] 1, 1, 1textbfJournal &
      textcolor[rgb] 1, 1, 1textbfArticle &
      textcolor[rgb] 1, 1, 1textbfYear \
      %content
      1 & arxiv & Platzhalter & 2019 \
      midrule
      2 & arxiv & Platzhalter & 2019 \
      midrule
      3 & arxiv & Platzhalter & 2019 \
      midrule
      4 & arxiv & Platzhalter & 2019 \
      midrule
      5 & arxiv & Platzhalter & 2019 \
      midrule
      6 & arxiv & Platzhalter & 2019 \
      midrule
      7 & arxiv & Platzhalter & 2019 \
      midrule
      8 & arxiv & Platzhalter & 2019 \
      midrule
      9 & arxiv & Platzhalter & 2019 \
      midrule
      10 & arxiv & Platzhalter & 2019 \
      midrule
      11 & arxiv & Platzhalter & 2019 \
      midrule
      12 & arxiv & Platzhalter & 2019 \
      midrule
      13 & arxiv & Platzhalter & 2019 \
      midrule
      14 & arxiv & Platzhalter & 2019 \
      midrule
      15 & arxiv & Platzhalter & 2019 \
      midrule
      16 & arxiv & Platzhalter & 2019 \
      midrule
      17 & arxiv & Platzhalter & 2019 \
      midrule
      18 & arxiv & Platzhalter & 2019 \
      midrule
      19 & arxiv & Platzhalter & 2019 \
      midrule
      20 & arxiv & Platzhalter & 2019 \
      midrule
      21 & arxiv & Platzhalter & 2019 \
      midrule
      22 & arxiv & Platzhalter & 2019 \
      midrule
      23 & arxiv & Platzhalter & 2019 \
      midrule
      24 & arxiv & Platzhalter & 2019 \
      midrule
      25 & arxiv & Platzhalter & 2019 \
      midrule
      26 & arxiv & Platzhalter & 2019 \
      midrule
      27 & arxiv & Platzhalter & 2019 \
      midrule
      28 & arxiv & Platzhalter & 2019 \
      midrule
      29 & arxiv & Platzhalter & 2019 \
      midrule
      30 & arxiv & Platzhalter & 2019 \
      midrule
      31 & arxiv & Platzhalter & 2019 \
      midrule
      32 & arxiv & Platzhalter & 2019 \
      midrule
      33 & arxiv & Platzhalter & 2019 \
      midrule
      34 & arxiv & Platzhalter & 2019 \
      midrule
      35 & arxiv & Platzhalter & 2019 \
      bottomrule
      endlongtable
      labeltab:addlabel


      enddocument









      share














      I have a table with over 400 entries. I wanted to make it more readable by colouring the cells in grey and white. I know how to do it with a regular table. But I cannot get it to work with a longtable environment. Thanks!



      Below: A two page MWE.



      documentclass[11pt]article

      usepackage[dvipsnames, table]xcolor
      usepackagelongtable
      usepackagebooktabs


      begindocument

      beginlongtable
      >centeringarraybackslashm1cm
      >centeringarraybackslashm4cm
      >centeringarraybackslashm7cm
      >centeringarraybackslashm1.8cm


      %header
      rowcolor[rgb] .149, .149, .149
      textcolor[rgb] 1, 1, 1textbfID &
      textcolor[rgb] 1, 1, 1textbfJournal &
      textcolor[rgb] 1, 1, 1textbfArticle &
      textcolor[rgb] 1, 1, 1textbfYear \
      %content
      1 & arxiv & Platzhalter & 2019 \
      midrule
      2 & arxiv & Platzhalter & 2019 \
      midrule
      3 & arxiv & Platzhalter & 2019 \
      midrule
      4 & arxiv & Platzhalter & 2019 \
      midrule
      5 & arxiv & Platzhalter & 2019 \
      midrule
      6 & arxiv & Platzhalter & 2019 \
      midrule
      7 & arxiv & Platzhalter & 2019 \
      midrule
      8 & arxiv & Platzhalter & 2019 \
      midrule
      9 & arxiv & Platzhalter & 2019 \
      midrule
      10 & arxiv & Platzhalter & 2019 \
      midrule
      11 & arxiv & Platzhalter & 2019 \
      midrule
      12 & arxiv & Platzhalter & 2019 \
      midrule
      13 & arxiv & Platzhalter & 2019 \
      midrule
      14 & arxiv & Platzhalter & 2019 \
      midrule
      15 & arxiv & Platzhalter & 2019 \
      midrule
      16 & arxiv & Platzhalter & 2019 \
      midrule
      17 & arxiv & Platzhalter & 2019 \
      midrule
      18 & arxiv & Platzhalter & 2019 \
      midrule
      19 & arxiv & Platzhalter & 2019 \
      midrule
      20 & arxiv & Platzhalter & 2019 \
      midrule
      21 & arxiv & Platzhalter & 2019 \
      midrule
      22 & arxiv & Platzhalter & 2019 \
      midrule
      23 & arxiv & Platzhalter & 2019 \
      midrule
      24 & arxiv & Platzhalter & 2019 \
      midrule
      25 & arxiv & Platzhalter & 2019 \
      midrule
      26 & arxiv & Platzhalter & 2019 \
      midrule
      27 & arxiv & Platzhalter & 2019 \
      midrule
      28 & arxiv & Platzhalter & 2019 \
      midrule
      29 & arxiv & Platzhalter & 2019 \
      midrule
      30 & arxiv & Platzhalter & 2019 \
      midrule
      31 & arxiv & Platzhalter & 2019 \
      midrule
      32 & arxiv & Platzhalter & 2019 \
      midrule
      33 & arxiv & Platzhalter & 2019 \
      midrule
      34 & arxiv & Platzhalter & 2019 \
      midrule
      35 & arxiv & Platzhalter & 2019 \
      bottomrule
      endlongtable
      labeltab:addlabel


      enddocument







      tables color





      share












      share










      share



      share










      asked 1 min ago









      slandoltslandolt

      485




      485




















          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%2f481005%2ftable-alternating-rowcolours-banding%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%2f481005%2ftable-alternating-rowcolours-banding%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

          Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

          Lioubotyn Sommaire Géographie | Histoire | Population | Notes et références | Liens externes | Menu de navigationlubotin.kharkov.uamodifier« Recensements et estimations de la population depuis 1897 »« Office des statistiques d'Ukraine : population au 1er janvier 2010, 2011 et 2012 »« Office des statistiques d'Ukraine : population au 1er janvier 2011, 2012 et 2013 »Informations officiellesCartes topographiquesCarte routièrem

          Mpande kaSenzangakhona Biographie | Références | Menu de navigationmodifierMpande kaSenzangakhonavoir la liste des auteursm