page split between longtable caption and tableTable number skips 1LaTeX split long table in multiple pages...

Why zero tolerance on nudity in space?

If I sold a PS4 game I owned the disc for, can I reinstall it digitally?

Can you earn endless XP using a Flameskull and its self-revival feature?

Disable the ">" operator in Rstudio linux terminal

It took me a lot of time to make this, pls like. (YouTube Comments #1)

What's the most convenient time of year in the USA to end the world?

Why exactly do action photographers need high fps burst cameras?

Cat is tipping over bed-side lamps during the night

Word or phrase for showing great skill at something without formal training in it

Quenching swords in dragon blood; why?

How do I say "Brexit" in Latin?

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

Placing an adverb between a verb and an object?

Strange Sign on Lab Door

Why is "points exist" not an axiom in geometry?

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

Do authors have to be politically correct in article-writing?

Reference on complex cobordism

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

Overfitting and Underfitting

A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?

If I delete my router's history can my ISP still provide it to my parents?

What does Cypher mean when he says Neo is "gonna pop"?

Broken patches on a road



page split between longtable caption and table


Table number skips 1LaTeX split long table in multiple pages and resize the widthHow to prevent page break between section heading and longtabu table?Table caption not appearing in PNAS document classwhy in the second row, the second column is taller than the otherHow to caption a longtable imported from a file by input{file} and use a smaller font?Longtable listed in list of tables indicates different page number than linked tolongtable: change table caption locationStopping table legend running over end of page when using longtablelongtable with caption has extra edge lines in tex4htIssues with footnotes using wrapping parbox with longtable, threeparttable and tablenotes













3















Consider this example



documentclass{report}
usepackage{lipsum}
usepackage{longtable}
begin{document}
lipsum[1-4]

another paragraph

another paragraph

another paragraph

another paragraph

anoteher paragraph

another paragraph

another paragraph

%anoteher paragraph

%another paragraph

begin{longtable}{lr}
caption{long table}\
A&B\
c&D
end{longtable}
end{document}


When compiled, the caption of long table is in one page, while the table itself in another page:



enter image description here



How to avoid such an awkward situation?










share|improve this question


















  • 2





    Have you tried \* instead of \ after the caption?

    – Arash Esbati
    1 hour ago













  • @ArashEsbati, it worked. What is the difference?

    – Viesturs
    1 hour ago











  • From the documentation: "\*: The same as \ but disallows a page break after the row."

    – moewe
    59 mins ago


















3















Consider this example



documentclass{report}
usepackage{lipsum}
usepackage{longtable}
begin{document}
lipsum[1-4]

another paragraph

another paragraph

another paragraph

another paragraph

anoteher paragraph

another paragraph

another paragraph

%anoteher paragraph

%another paragraph

begin{longtable}{lr}
caption{long table}\
A&B\
c&D
end{longtable}
end{document}


When compiled, the caption of long table is in one page, while the table itself in another page:



enter image description here



How to avoid such an awkward situation?










share|improve this question


















  • 2





    Have you tried \* instead of \ after the caption?

    – Arash Esbati
    1 hour ago













  • @ArashEsbati, it worked. What is the difference?

    – Viesturs
    1 hour ago











  • From the documentation: "\*: The same as \ but disallows a page break after the row."

    – moewe
    59 mins ago
















3












3








3








Consider this example



documentclass{report}
usepackage{lipsum}
usepackage{longtable}
begin{document}
lipsum[1-4]

another paragraph

another paragraph

another paragraph

another paragraph

anoteher paragraph

another paragraph

another paragraph

%anoteher paragraph

%another paragraph

begin{longtable}{lr}
caption{long table}\
A&B\
c&D
end{longtable}
end{document}


When compiled, the caption of long table is in one page, while the table itself in another page:



enter image description here



How to avoid such an awkward situation?










share|improve this question














Consider this example



documentclass{report}
usepackage{lipsum}
usepackage{longtable}
begin{document}
lipsum[1-4]

another paragraph

another paragraph

another paragraph

another paragraph

anoteher paragraph

another paragraph

another paragraph

%anoteher paragraph

%another paragraph

begin{longtable}{lr}
caption{long table}\
A&B\
c&D
end{longtable}
end{document}


When compiled, the caption of long table is in one page, while the table itself in another page:



enter image description here



How to avoid such an awkward situation?







captions page-breaking longtable






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









ViestursViesturs

1,81341125




1,81341125








  • 2





    Have you tried \* instead of \ after the caption?

    – Arash Esbati
    1 hour ago













  • @ArashEsbati, it worked. What is the difference?

    – Viesturs
    1 hour ago











  • From the documentation: "\*: The same as \ but disallows a page break after the row."

    – moewe
    59 mins ago
















  • 2





    Have you tried \* instead of \ after the caption?

    – Arash Esbati
    1 hour ago













  • @ArashEsbati, it worked. What is the difference?

    – Viesturs
    1 hour ago











  • From the documentation: "\*: The same as \ but disallows a page break after the row."

    – moewe
    59 mins ago










2




2





Have you tried \* instead of \ after the caption?

– Arash Esbati
1 hour ago







Have you tried \* instead of \ after the caption?

– Arash Esbati
1 hour ago















@ArashEsbati, it worked. What is the difference?

– Viesturs
1 hour ago





@ArashEsbati, it worked. What is the difference?

– Viesturs
1 hour ago













From the documentation: "\*: The same as \ but disallows a page break after the row."

– moewe
59 mins ago







From the documentation: "\*: The same as \ but disallows a page break after the row."

– moewe
59 mins ago












3 Answers
3






active

oldest

votes


















4














You can simply use \* instead of \ after the caption. From the manual:




\*: The same as \ but disallows a page break after the row.







share|improve this answer































    5














    Assuming you want to have at least 3 rows of the longtable to show up before considering a page break to be unacceptable, you could load the needspace package and issue the directive



    Needspace{5baselineskip}


    immediately before begin{longtable}. That way, unless there are at least 5 lines of text still free at the bottom of the page, the longtable will start at the top of the next page.



    Why 5baselineskip? Because the longtable's caption and the blank line between the caption and the start of the body of the text take up 2 more lines.






    share|improve this answer































      0














      Put the table in a new page .



      enter image description here



      documentclass{report}
      usepackage{lipsum}
      usepackage{longtable}
      begin{document}
      lipsum[1-4]

      another paragraph

      another paragraph

      another paragraph

      another paragraph

      anoteher paragraph

      another paragraph

      another paragraph

      %anoteher paragraph

      %another paragraph

      newpage
      begin{longtable}{lr}
      caption{long table}\
      A&B\
      c&D
      end{longtable}
      end{document}





      share|improve this answer



















      • 3





        What if the OP had to insert something more in the previous page, and the another paragraphs expanded to the next page? In that case the longtable would be placed in a whole new page, which means you would have to delete newpage. That is bad. This is tricky and can be used only in this case.

        – JouleV
        1 hour ago













      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%2f477409%2fpage-split-between-longtable-caption-and-table%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      You can simply use \* instead of \ after the caption. From the manual:




      \*: The same as \ but disallows a page break after the row.







      share|improve this answer




























        4














        You can simply use \* instead of \ after the caption. From the manual:




        \*: The same as \ but disallows a page break after the row.







        share|improve this answer


























          4












          4








          4







          You can simply use \* instead of \ after the caption. From the manual:




          \*: The same as \ but disallows a page break after the row.







          share|improve this answer













          You can simply use \* instead of \ after the caption. From the manual:




          \*: The same as \ but disallows a page break after the row.








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 51 mins ago









          Arash EsbatiArash Esbati

          5,2931825




          5,2931825























              5














              Assuming you want to have at least 3 rows of the longtable to show up before considering a page break to be unacceptable, you could load the needspace package and issue the directive



              Needspace{5baselineskip}


              immediately before begin{longtable}. That way, unless there are at least 5 lines of text still free at the bottom of the page, the longtable will start at the top of the next page.



              Why 5baselineskip? Because the longtable's caption and the blank line between the caption and the start of the body of the text take up 2 more lines.






              share|improve this answer




























                5














                Assuming you want to have at least 3 rows of the longtable to show up before considering a page break to be unacceptable, you could load the needspace package and issue the directive



                Needspace{5baselineskip}


                immediately before begin{longtable}. That way, unless there are at least 5 lines of text still free at the bottom of the page, the longtable will start at the top of the next page.



                Why 5baselineskip? Because the longtable's caption and the blank line between the caption and the start of the body of the text take up 2 more lines.






                share|improve this answer


























                  5












                  5








                  5







                  Assuming you want to have at least 3 rows of the longtable to show up before considering a page break to be unacceptable, you could load the needspace package and issue the directive



                  Needspace{5baselineskip}


                  immediately before begin{longtable}. That way, unless there are at least 5 lines of text still free at the bottom of the page, the longtable will start at the top of the next page.



                  Why 5baselineskip? Because the longtable's caption and the blank line between the caption and the start of the body of the text take up 2 more lines.






                  share|improve this answer













                  Assuming you want to have at least 3 rows of the longtable to show up before considering a page break to be unacceptable, you could load the needspace package and issue the directive



                  Needspace{5baselineskip}


                  immediately before begin{longtable}. That way, unless there are at least 5 lines of text still free at the bottom of the page, the longtable will start at the top of the next page.



                  Why 5baselineskip? Because the longtable's caption and the blank line between the caption and the start of the body of the text take up 2 more lines.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 1 hour ago









                  MicoMico

                  281k31384772




                  281k31384772























                      0














                      Put the table in a new page .



                      enter image description here



                      documentclass{report}
                      usepackage{lipsum}
                      usepackage{longtable}
                      begin{document}
                      lipsum[1-4]

                      another paragraph

                      another paragraph

                      another paragraph

                      another paragraph

                      anoteher paragraph

                      another paragraph

                      another paragraph

                      %anoteher paragraph

                      %another paragraph

                      newpage
                      begin{longtable}{lr}
                      caption{long table}\
                      A&B\
                      c&D
                      end{longtable}
                      end{document}





                      share|improve this answer



















                      • 3





                        What if the OP had to insert something more in the previous page, and the another paragraphs expanded to the next page? In that case the longtable would be placed in a whole new page, which means you would have to delete newpage. That is bad. This is tricky and can be used only in this case.

                        – JouleV
                        1 hour ago


















                      0














                      Put the table in a new page .



                      enter image description here



                      documentclass{report}
                      usepackage{lipsum}
                      usepackage{longtable}
                      begin{document}
                      lipsum[1-4]

                      another paragraph

                      another paragraph

                      another paragraph

                      another paragraph

                      anoteher paragraph

                      another paragraph

                      another paragraph

                      %anoteher paragraph

                      %another paragraph

                      newpage
                      begin{longtable}{lr}
                      caption{long table}\
                      A&B\
                      c&D
                      end{longtable}
                      end{document}





                      share|improve this answer



















                      • 3





                        What if the OP had to insert something more in the previous page, and the another paragraphs expanded to the next page? In that case the longtable would be placed in a whole new page, which means you would have to delete newpage. That is bad. This is tricky and can be used only in this case.

                        – JouleV
                        1 hour ago
















                      0












                      0








                      0







                      Put the table in a new page .



                      enter image description here



                      documentclass{report}
                      usepackage{lipsum}
                      usepackage{longtable}
                      begin{document}
                      lipsum[1-4]

                      another paragraph

                      another paragraph

                      another paragraph

                      another paragraph

                      anoteher paragraph

                      another paragraph

                      another paragraph

                      %anoteher paragraph

                      %another paragraph

                      newpage
                      begin{longtable}{lr}
                      caption{long table}\
                      A&B\
                      c&D
                      end{longtable}
                      end{document}





                      share|improve this answer













                      Put the table in a new page .



                      enter image description here



                      documentclass{report}
                      usepackage{lipsum}
                      usepackage{longtable}
                      begin{document}
                      lipsum[1-4]

                      another paragraph

                      another paragraph

                      another paragraph

                      another paragraph

                      anoteher paragraph

                      another paragraph

                      another paragraph

                      %anoteher paragraph

                      %another paragraph

                      newpage
                      begin{longtable}{lr}
                      caption{long table}\
                      A&B\
                      c&D
                      end{longtable}
                      end{document}






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered 1 hour ago









                      subham sonisubham soni

                      4,02082981




                      4,02082981








                      • 3





                        What if the OP had to insert something more in the previous page, and the another paragraphs expanded to the next page? In that case the longtable would be placed in a whole new page, which means you would have to delete newpage. That is bad. This is tricky and can be used only in this case.

                        – JouleV
                        1 hour ago
















                      • 3





                        What if the OP had to insert something more in the previous page, and the another paragraphs expanded to the next page? In that case the longtable would be placed in a whole new page, which means you would have to delete newpage. That is bad. This is tricky and can be used only in this case.

                        – JouleV
                        1 hour ago










                      3




                      3





                      What if the OP had to insert something more in the previous page, and the another paragraphs expanded to the next page? In that case the longtable would be placed in a whole new page, which means you would have to delete newpage. That is bad. This is tricky and can be used only in this case.

                      – JouleV
                      1 hour ago







                      What if the OP had to insert something more in the previous page, and the another paragraphs expanded to the next page? In that case the longtable would be placed in a whole new page, which means you would have to delete newpage. That is bad. This is tricky and can be used only in this case.

                      – JouleV
                      1 hour ago




















                      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%2f477409%2fpage-split-between-longtable-caption-and-table%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

                      is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

                      How do i solve the “ No module named 'mlxtend' ” issue on Jupyter?

                      Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...