How to use multirow












69















I can compile this table separately but when I want to compile the whole file, it gives me an error, which is fixed by removing multirow.



usepackage{multirow}

begin{table}[htbp]
begin{center}
begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
hline
A & B & C & D & multicolumn{7}{|c|}{F} \ hline
multirow{ 2}{}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
& 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
end{tabular}
end{center}
label{table2}
end{table}









share|improve this question





























    69















    I can compile this table separately but when I want to compile the whole file, it gives me an error, which is fixed by removing multirow.



    usepackage{multirow}

    begin{table}[htbp]
    begin{center}
    begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
    hline
    A & B & C & D & multicolumn{7}{|c|}{F} \ hline
    multirow{ 2}{}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
    & 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
    end{tabular}
    end{center}
    label{table2}
    end{table}









    share|improve this question



























      69












      69








      69


      19






      I can compile this table separately but when I want to compile the whole file, it gives me an error, which is fixed by removing multirow.



      usepackage{multirow}

      begin{table}[htbp]
      begin{center}
      begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
      hline
      A & B & C & D & multicolumn{7}{|c|}{F} \ hline
      multirow{ 2}{}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
      & 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
      end{tabular}
      end{center}
      label{table2}
      end{table}









      share|improve this question
















      I can compile this table separately but when I want to compile the whole file, it gives me an error, which is fixed by removing multirow.



      usepackage{multirow}

      begin{table}[htbp]
      begin{center}
      begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
      hline
      A & B & C & D & multicolumn{7}{|c|}{F} \ hline
      multirow{ 2}{}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
      & 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
      end{tabular}
      end{center}
      label{table2}
      end{table}






      tables multirow






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 3 '17 at 14:10









      Moriambar

      7,83731846




      7,83731846










      asked Sep 19 '12 at 22:32









      annaanna

      482148




      482148






















          1 Answer
          1






          active

          oldest

          votes


















          113














          There are some errors in your code; you need to give a second argument to multirow (an explicit value for the cell width or * to use the natural width of the contents); also, label must always appear after caption in floating environments:



          documentclass{article}
          usepackage{multirow}

          begin{document}

          begin{table}[htbp]
          centering
          begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
          hline
          A & B & C & D & multicolumn{7}{|c|}{F} \ hline
          multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
          & 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
          end{tabular}
          caption{A test caption}
          label{table2}
          end{table}

          end{document}


          enter image description here



          It is not clear why you are using p{...} columns if the cells are not containing paragraphs.



          As a side note, I used centering instead of the center environment to avoid adding extra vertical spacing (which in most cases is not desired).



          You are not using all the columns you declared, but I guess that this was just for the example.






          share|improve this answer





















          • 4





            Source for multirow

            – Jost
            Aug 8 '14 at 13:34






          • 7





            Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.

            – Steven C. Howell
            Sep 28 '15 at 14:06








          • 3





            @Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.

            – Abhinav
            Jan 31 '17 at 4:17











          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%2f73283%2fhow-to-use-multirow%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          113














          There are some errors in your code; you need to give a second argument to multirow (an explicit value for the cell width or * to use the natural width of the contents); also, label must always appear after caption in floating environments:



          documentclass{article}
          usepackage{multirow}

          begin{document}

          begin{table}[htbp]
          centering
          begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
          hline
          A & B & C & D & multicolumn{7}{|c|}{F} \ hline
          multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
          & 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
          end{tabular}
          caption{A test caption}
          label{table2}
          end{table}

          end{document}


          enter image description here



          It is not clear why you are using p{...} columns if the cells are not containing paragraphs.



          As a side note, I used centering instead of the center environment to avoid adding extra vertical spacing (which in most cases is not desired).



          You are not using all the columns you declared, but I guess that this was just for the example.






          share|improve this answer





















          • 4





            Source for multirow

            – Jost
            Aug 8 '14 at 13:34






          • 7





            Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.

            – Steven C. Howell
            Sep 28 '15 at 14:06








          • 3





            @Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.

            – Abhinav
            Jan 31 '17 at 4:17
















          113














          There are some errors in your code; you need to give a second argument to multirow (an explicit value for the cell width or * to use the natural width of the contents); also, label must always appear after caption in floating environments:



          documentclass{article}
          usepackage{multirow}

          begin{document}

          begin{table}[htbp]
          centering
          begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
          hline
          A & B & C & D & multicolumn{7}{|c|}{F} \ hline
          multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
          & 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
          end{tabular}
          caption{A test caption}
          label{table2}
          end{table}

          end{document}


          enter image description here



          It is not clear why you are using p{...} columns if the cells are not containing paragraphs.



          As a side note, I used centering instead of the center environment to avoid adding extra vertical spacing (which in most cases is not desired).



          You are not using all the columns you declared, but I guess that this was just for the example.






          share|improve this answer





















          • 4





            Source for multirow

            – Jost
            Aug 8 '14 at 13:34






          • 7





            Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.

            – Steven C. Howell
            Sep 28 '15 at 14:06








          • 3





            @Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.

            – Abhinav
            Jan 31 '17 at 4:17














          113












          113








          113







          There are some errors in your code; you need to give a second argument to multirow (an explicit value for the cell width or * to use the natural width of the contents); also, label must always appear after caption in floating environments:



          documentclass{article}
          usepackage{multirow}

          begin{document}

          begin{table}[htbp]
          centering
          begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
          hline
          A & B & C & D & multicolumn{7}{|c|}{F} \ hline
          multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
          & 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
          end{tabular}
          caption{A test caption}
          label{table2}
          end{table}

          end{document}


          enter image description here



          It is not clear why you are using p{...} columns if the cells are not containing paragraphs.



          As a side note, I used centering instead of the center environment to avoid adding extra vertical spacing (which in most cases is not desired).



          You are not using all the columns you declared, but I guess that this was just for the example.






          share|improve this answer















          There are some errors in your code; you need to give a second argument to multirow (an explicit value for the cell width or * to use the natural width of the contents); also, label must always appear after caption in floating environments:



          documentclass{article}
          usepackage{multirow}

          begin{document}

          begin{table}[htbp]
          centering
          begin{tabular}{|c|c|c|c|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}|}
          hline
          A & B & C & D & multicolumn{7}{|c|}{F} \ hline
          multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & 40 & 55 & 25 & 40 & 35 & \
          & 1 & 5 & 195 & 25 & 50 & 35 & 40 & 45 & & \ hline
          end{tabular}
          caption{A test caption}
          label{table2}
          end{table}

          end{document}


          enter image description here



          It is not clear why you are using p{...} columns if the cells are not containing paragraphs.



          As a side note, I used centering instead of the center environment to avoid adding extra vertical spacing (which in most cases is not desired).



          You are not using all the columns you declared, but I guess that this was just for the example.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Oct 5 '18 at 22:01









          Phelype Oleinik

          21.6k54381




          21.6k54381










          answered Sep 19 '12 at 22:40









          Gonzalo MedinaGonzalo Medina

          397k4113011569




          397k4113011569








          • 4





            Source for multirow

            – Jost
            Aug 8 '14 at 13:34






          • 7





            Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.

            – Steven C. Howell
            Sep 28 '15 at 14:06








          • 3





            @Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.

            – Abhinav
            Jan 31 '17 at 4:17














          • 4





            Source for multirow

            – Jost
            Aug 8 '14 at 13:34






          • 7





            Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.

            – Steven C. Howell
            Sep 28 '15 at 14:06








          • 3





            @Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.

            – Abhinav
            Jan 31 '17 at 4:17








          4




          4





          Source for multirow

          – Jost
          Aug 8 '14 at 13:34





          Source for multirow

          – Jost
          Aug 8 '14 at 13:34




          7




          7





          Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.

          – Steven C. Howell
          Sep 28 '15 at 14:06







          Note the need for using cline{2-10} if you want a horizontal line between rows 2 and 3.

          – Steven C. Howell
          Sep 28 '15 at 14:06






          3




          3





          @Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.

          – Abhinav
          Jan 31 '17 at 4:17





          @Gonzalo Medina In the table environment in the example code, the '' character should be replaced by '\'.

          – Abhinav
          Jan 31 '17 at 4:17


















          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%2f73283%2fhow-to-use-multirow%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

          How to change which sound is reproduced for terminal bell?

          Can I use Tabulator js library in my java Spring + Thymeleaf project?

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents