Table: Alternating rowcolours / bandingHow to create alternating rows in a table?Table rows alternating...

Temporarily disable WLAN internet access for children, but allow it for adults

Does Doodling or Improvising on the Piano Have Any Benefits?

A social experiment. What is the worst that can happen?

Hero deduces identity of a killer

Is this toilet slogan correct usage of the English language?

Why "had" in "[something] we would have made had we used [something]"?

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

How do you make your own symbol when Detexify fails?

How much character growth crosses the line into breaking the character

Are Captain Marvel's powers affected by Thanos' actions in Infinity War

Quoting Keynes in a lecture

Terse Method to Swap Lowest for Highest?

Why did the EU agree to delay the Brexit deadline?

Yosemite Fire Rings - What to Expect?

Invalid date error by date command

How does a computer interpret real numbers?

Limits and Infinite Integration by Parts

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

putting logo on same line but after title, latex

Is aluminum electrical wire used on aircraft?

How should I respond when I lied about my education and the company finds out through background check?

Angel of Condemnation - Exile creature with second ability

Why is it that I can sometimes guess the next note?

PTIJ: Haman's bad computer



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}
usepackage{longtable}
usepackage{booktabs}


begin{document}

begin{longtable}{
>{centeringarraybackslash}m{1cm}
>{centeringarraybackslash}m{4cm}
>{centeringarraybackslash}m{7cm}
>{centeringarraybackslash}m{1.8cm}
}

%header
rowcolor[rgb]{ .149, .149, .149}
textcolor[rgb]{ 1, 1, 1}{textbf{ID}} &
textcolor[rgb]{ 1, 1, 1}{textbf{Journal}} &
textcolor[rgb]{ 1, 1, 1}{textbf{Article}} &
textcolor[rgb]{ 1, 1, 1}{textbf{Year}} \
%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
end{longtable}
label{tab:addlabel}


end{document}









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}
    usepackage{longtable}
    usepackage{booktabs}


    begin{document}

    begin{longtable}{
    >{centeringarraybackslash}m{1cm}
    >{centeringarraybackslash}m{4cm}
    >{centeringarraybackslash}m{7cm}
    >{centeringarraybackslash}m{1.8cm}
    }

    %header
    rowcolor[rgb]{ .149, .149, .149}
    textcolor[rgb]{ 1, 1, 1}{textbf{ID}} &
    textcolor[rgb]{ 1, 1, 1}{textbf{Journal}} &
    textcolor[rgb]{ 1, 1, 1}{textbf{Article}} &
    textcolor[rgb]{ 1, 1, 1}{textbf{Year}} \
    %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
    end{longtable}
    label{tab:addlabel}


    end{document}









    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}
      usepackage{longtable}
      usepackage{booktabs}


      begin{document}

      begin{longtable}{
      >{centeringarraybackslash}m{1cm}
      >{centeringarraybackslash}m{4cm}
      >{centeringarraybackslash}m{7cm}
      >{centeringarraybackslash}m{1.8cm}
      }

      %header
      rowcolor[rgb]{ .149, .149, .149}
      textcolor[rgb]{ 1, 1, 1}{textbf{ID}} &
      textcolor[rgb]{ 1, 1, 1}{textbf{Journal}} &
      textcolor[rgb]{ 1, 1, 1}{textbf{Article}} &
      textcolor[rgb]{ 1, 1, 1}{textbf{Year}} \
      %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
      end{longtable}
      label{tab:addlabel}


      end{document}









      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}
      usepackage{longtable}
      usepackage{booktabs}


      begin{document}

      begin{longtable}{
      >{centeringarraybackslash}m{1cm}
      >{centeringarraybackslash}m{4cm}
      >{centeringarraybackslash}m{7cm}
      >{centeringarraybackslash}m{1.8cm}
      }

      %header
      rowcolor[rgb]{ .149, .149, .149}
      textcolor[rgb]{ 1, 1, 1}{textbf{ID}} &
      textcolor[rgb]{ 1, 1, 1}{textbf{Journal}} &
      textcolor[rgb]{ 1, 1, 1}{textbf{Article}} &
      textcolor[rgb]{ 1, 1, 1}{textbf{Year}} \
      %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
      end{longtable}
      label{tab:addlabel}


      end{document}







      tables color





      share












      share










      share



      share










      asked 9 mins 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

          El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

          Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...

          Castillo d'Acher Características Menú de navegación