Problem with longtable and \












5















The code is the following:



documentclass[a4paper,10pt]{article}

usepackage{longtable}
usepackage{tabularx}

newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
newcolumntype{R}{p{0.80textwidth}}

begin{document}
begin{longtable}{L!{---}R}
12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\[10pt]
12 & asdf asdf asdf asdf asdf.\[10pt]
12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\[10pt]
end{longtable}
end{document}


and the output is
enter image description here
that is, in each row, the vertical space 10pt is considered from the first line and not from the last line. If, for instance, in the first row you put 30pt instead of 10pt, then a vertical space appears between the first and the second row. I think this problem appeared in an updating of some packages of MikTeX.



Does anyone know of any solution to this problem?



Thanks










share|improve this question







New contributor




Saul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    5















    The code is the following:



    documentclass[a4paper,10pt]{article}

    usepackage{longtable}
    usepackage{tabularx}

    newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
    newcolumntype{R}{p{0.80textwidth}}

    begin{document}
    begin{longtable}{L!{---}R}
    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\[10pt]
    12 & asdf asdf asdf asdf asdf.\[10pt]
    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\[10pt]
    end{longtable}
    end{document}


    and the output is
    enter image description here
    that is, in each row, the vertical space 10pt is considered from the first line and not from the last line. If, for instance, in the first row you put 30pt instead of 10pt, then a vertical space appears between the first and the second row. I think this problem appeared in an updating of some packages of MikTeX.



    Does anyone know of any solution to this problem?



    Thanks










    share|improve this question







    New contributor




    Saul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      5












      5








      5


      0






      The code is the following:



      documentclass[a4paper,10pt]{article}

      usepackage{longtable}
      usepackage{tabularx}

      newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
      newcolumntype{R}{p{0.80textwidth}}

      begin{document}
      begin{longtable}{L!{---}R}
      12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\[10pt]
      12 & asdf asdf asdf asdf asdf.\[10pt]
      12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\[10pt]
      end{longtable}
      end{document}


      and the output is
      enter image description here
      that is, in each row, the vertical space 10pt is considered from the first line and not from the last line. If, for instance, in the first row you put 30pt instead of 10pt, then a vertical space appears between the first and the second row. I think this problem appeared in an updating of some packages of MikTeX.



      Does anyone know of any solution to this problem?



      Thanks










      share|improve this question







      New contributor




      Saul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      The code is the following:



      documentclass[a4paper,10pt]{article}

      usepackage{longtable}
      usepackage{tabularx}

      newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
      newcolumntype{R}{p{0.80textwidth}}

      begin{document}
      begin{longtable}{L!{---}R}
      12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\[10pt]
      12 & asdf asdf asdf asdf asdf.\[10pt]
      12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\[10pt]
      end{longtable}
      end{document}


      and the output is
      enter image description here
      that is, in each row, the vertical space 10pt is considered from the first line and not from the last line. If, for instance, in the first row you put 30pt instead of 10pt, then a vertical space appears between the first and the second row. I think this problem appeared in an updating of some packages of MikTeX.



      Does anyone know of any solution to this problem?



      Thanks







      longtable






      share|improve this question







      New contributor




      Saul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Saul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Saul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 7 hours ago









      SaulSaul

      261




      261




      New contributor




      Saul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Saul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Saul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          3 Answers
          3






          active

          oldest

          votes


















          3














          2 ways:



          Employ extrarowheight from array package



          documentclass[a4paper,10pt]{article}

          usepackage{longtable,array}
          usepackage{tabularx}
          newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
          newcolumntype{R}{p{0.80textwidth}}
          setlengthextrarowheight{10pt}
          begin{document}
          begin{longtable}{L!{---}R}
          12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
          12 & asdf asdf asdf asdf asdf.\
          12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
          end{longtable}
          end{document}


          Build a strut



          Here, I create mystrut, which you can just add to the end of each 3rd-column entry, in lieu of \[10pt]. One could have just chosen a simple fixed dimension as in newcommandmystrut{rule[-10pt]{0pt}{0pt}}, but I instead did a dimensional expression to be the equivalent of \[10pt].



          documentclass[a4paper,10pt]{article}

          usepackage{longtable}
          usepackage{tabularx}
          newcommandmystrut{rule[dimexpr-dpstrutbox-10ptrelax]{0pt}{0pt}}
          newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
          newcolumntype{R}{p{0.80textwidth}}

          begin{document}
          begin{longtable}{L!{---}R}
          12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
          asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
          asdf asdf asdf asdf asdf.mystrut\
          12 & asdf asdf asdf asdf asdf.mystrut\
          12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.mystrut\
          end{longtable}
          end{document}


          Either approach gives the following output (plus/minus some leading space at the beginning of the table)



          enter image description here






          share|improve this answer

































            2














            You can use addlinespace from booktabs:



            documentclass[a4paper,10pt]{article}

            usepackage{longtable}
            usepackage{tabularx}

            newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
            newcolumntype{R}{p{0.80textwidth}}

            usepackage{booktabs}
            setlength{defaultaddspace}{10pt}

            begin{document}

            begin{longtable}{L!{---}R}
            12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
            addlinespace
            12 & asdf asdf asdf asdf asdf.\
            addlinespace
            12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.
            end{longtable}

            end{document}


            enter image description here






            share|improve this answer































              1














              The \[<dimen> command in a table tells LaTeX that the current row extends at least <dimen> below the baseline, in addition to the depth of a strut. Since your row extends much deeper than 10pt, the [10pt] argument adds nothing.



              The addlinespace command provided by booktabs, which could simply called



              addlinespace[10pt]


              instead of globally changing defaultaddspace is good. Without packages, you can do



              noalign{vspace{10pt}}


              between rows.



              I suggest using the relatively new w column specifier instead of >{raggedleft}p{0.1textwidth}, for a column where line breaks are not needed.
              It requires usepackage{array}, which is automatically called by tabularx. In the code below I load it explicitly. It's needed anyway for newcolumntype.



              documentclass[a4paper,10pt]{article}

              usepackage{longtable}
              usepackage{array}

              newcolumntype{L}{w{r}{0.1textwidth}}
              newcolumntype{R}{p{0.80textwidth}}

              begin{document}

              begin{longtable}{L!{---}R}
              12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
              asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
              asdf asdf asdf asdf asdf asdf asdf.\
              noalign{vspace{10pt}}
              12 & asdf asdf asdf asdf asdf.\
              noalign{vspace{10pt}}
              12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
              end{longtable}

              end{document}


              enter image description here






              share|improve this answer























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


                }
                });






                Saul is a new contributor. Be nice, and check out our Code of Conduct.










                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473538%2fproblem-with-longtable-and%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









                3














                2 ways:



                Employ extrarowheight from array package



                documentclass[a4paper,10pt]{article}

                usepackage{longtable,array}
                usepackage{tabularx}
                newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                newcolumntype{R}{p{0.80textwidth}}
                setlengthextrarowheight{10pt}
                begin{document}
                begin{longtable}{L!{---}R}
                12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                12 & asdf asdf asdf asdf asdf.\
                12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                end{longtable}
                end{document}


                Build a strut



                Here, I create mystrut, which you can just add to the end of each 3rd-column entry, in lieu of \[10pt]. One could have just chosen a simple fixed dimension as in newcommandmystrut{rule[-10pt]{0pt}{0pt}}, but I instead did a dimensional expression to be the equivalent of \[10pt].



                documentclass[a4paper,10pt]{article}

                usepackage{longtable}
                usepackage{tabularx}
                newcommandmystrut{rule[dimexpr-dpstrutbox-10ptrelax]{0pt}{0pt}}
                newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                newcolumntype{R}{p{0.80textwidth}}

                begin{document}
                begin{longtable}{L!{---}R}
                12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                asdf asdf asdf asdf asdf.mystrut\
                12 & asdf asdf asdf asdf asdf.mystrut\
                12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.mystrut\
                end{longtable}
                end{document}


                Either approach gives the following output (plus/minus some leading space at the beginning of the table)



                enter image description here






                share|improve this answer






























                  3














                  2 ways:



                  Employ extrarowheight from array package



                  documentclass[a4paper,10pt]{article}

                  usepackage{longtable,array}
                  usepackage{tabularx}
                  newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                  newcolumntype{R}{p{0.80textwidth}}
                  setlengthextrarowheight{10pt}
                  begin{document}
                  begin{longtable}{L!{---}R}
                  12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                  12 & asdf asdf asdf asdf asdf.\
                  12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                  end{longtable}
                  end{document}


                  Build a strut



                  Here, I create mystrut, which you can just add to the end of each 3rd-column entry, in lieu of \[10pt]. One could have just chosen a simple fixed dimension as in newcommandmystrut{rule[-10pt]{0pt}{0pt}}, but I instead did a dimensional expression to be the equivalent of \[10pt].



                  documentclass[a4paper,10pt]{article}

                  usepackage{longtable}
                  usepackage{tabularx}
                  newcommandmystrut{rule[dimexpr-dpstrutbox-10ptrelax]{0pt}{0pt}}
                  newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                  newcolumntype{R}{p{0.80textwidth}}

                  begin{document}
                  begin{longtable}{L!{---}R}
                  12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                  asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                  asdf asdf asdf asdf asdf.mystrut\
                  12 & asdf asdf asdf asdf asdf.mystrut\
                  12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.mystrut\
                  end{longtable}
                  end{document}


                  Either approach gives the following output (plus/minus some leading space at the beginning of the table)



                  enter image description here






                  share|improve this answer




























                    3












                    3








                    3







                    2 ways:



                    Employ extrarowheight from array package



                    documentclass[a4paper,10pt]{article}

                    usepackage{longtable,array}
                    usepackage{tabularx}
                    newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                    newcolumntype{R}{p{0.80textwidth}}
                    setlengthextrarowheight{10pt}
                    begin{document}
                    begin{longtable}{L!{---}R}
                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                    12 & asdf asdf asdf asdf asdf.\
                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                    end{longtable}
                    end{document}


                    Build a strut



                    Here, I create mystrut, which you can just add to the end of each 3rd-column entry, in lieu of \[10pt]. One could have just chosen a simple fixed dimension as in newcommandmystrut{rule[-10pt]{0pt}{0pt}}, but I instead did a dimensional expression to be the equivalent of \[10pt].



                    documentclass[a4paper,10pt]{article}

                    usepackage{longtable}
                    usepackage{tabularx}
                    newcommandmystrut{rule[dimexpr-dpstrutbox-10ptrelax]{0pt}{0pt}}
                    newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                    newcolumntype{R}{p{0.80textwidth}}

                    begin{document}
                    begin{longtable}{L!{---}R}
                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                    asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                    asdf asdf asdf asdf asdf.mystrut\
                    12 & asdf asdf asdf asdf asdf.mystrut\
                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.mystrut\
                    end{longtable}
                    end{document}


                    Either approach gives the following output (plus/minus some leading space at the beginning of the table)



                    enter image description here






                    share|improve this answer















                    2 ways:



                    Employ extrarowheight from array package



                    documentclass[a4paper,10pt]{article}

                    usepackage{longtable,array}
                    usepackage{tabularx}
                    newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                    newcolumntype{R}{p{0.80textwidth}}
                    setlengthextrarowheight{10pt}
                    begin{document}
                    begin{longtable}{L!{---}R}
                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                    12 & asdf asdf asdf asdf asdf.\
                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                    end{longtable}
                    end{document}


                    Build a strut



                    Here, I create mystrut, which you can just add to the end of each 3rd-column entry, in lieu of \[10pt]. One could have just chosen a simple fixed dimension as in newcommandmystrut{rule[-10pt]{0pt}{0pt}}, but I instead did a dimensional expression to be the equivalent of \[10pt].



                    documentclass[a4paper,10pt]{article}

                    usepackage{longtable}
                    usepackage{tabularx}
                    newcommandmystrut{rule[dimexpr-dpstrutbox-10ptrelax]{0pt}{0pt}}
                    newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                    newcolumntype{R}{p{0.80textwidth}}

                    begin{document}
                    begin{longtable}{L!{---}R}
                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                    asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                    asdf asdf asdf asdf asdf.mystrut\
                    12 & asdf asdf asdf asdf asdf.mystrut\
                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.mystrut\
                    end{longtable}
                    end{document}


                    Either approach gives the following output (plus/minus some leading space at the beginning of the table)



                    enter image description here







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 7 hours ago

























                    answered 7 hours ago









                    Steven B. SegletesSteven B. Segletes

                    154k9195403




                    154k9195403























                        2














                        You can use addlinespace from booktabs:



                        documentclass[a4paper,10pt]{article}

                        usepackage{longtable}
                        usepackage{tabularx}

                        newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                        newcolumntype{R}{p{0.80textwidth}}

                        usepackage{booktabs}
                        setlength{defaultaddspace}{10pt}

                        begin{document}

                        begin{longtable}{L!{---}R}
                        12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                        addlinespace
                        12 & asdf asdf asdf asdf asdf.\
                        addlinespace
                        12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.
                        end{longtable}

                        end{document}


                        enter image description here






                        share|improve this answer




























                          2














                          You can use addlinespace from booktabs:



                          documentclass[a4paper,10pt]{article}

                          usepackage{longtable}
                          usepackage{tabularx}

                          newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                          newcolumntype{R}{p{0.80textwidth}}

                          usepackage{booktabs}
                          setlength{defaultaddspace}{10pt}

                          begin{document}

                          begin{longtable}{L!{---}R}
                          12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                          addlinespace
                          12 & asdf asdf asdf asdf asdf.\
                          addlinespace
                          12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.
                          end{longtable}

                          end{document}


                          enter image description here






                          share|improve this answer


























                            2












                            2








                            2







                            You can use addlinespace from booktabs:



                            documentclass[a4paper,10pt]{article}

                            usepackage{longtable}
                            usepackage{tabularx}

                            newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                            newcolumntype{R}{p{0.80textwidth}}

                            usepackage{booktabs}
                            setlength{defaultaddspace}{10pt}

                            begin{document}

                            begin{longtable}{L!{---}R}
                            12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                            addlinespace
                            12 & asdf asdf asdf asdf asdf.\
                            addlinespace
                            12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.
                            end{longtable}

                            end{document}


                            enter image description here






                            share|improve this answer













                            You can use addlinespace from booktabs:



                            documentclass[a4paper,10pt]{article}

                            usepackage{longtable}
                            usepackage{tabularx}

                            newcolumntype{L}{>{raggedleft}p{0.1textwidth}}
                            newcolumntype{R}{p{0.80textwidth}}

                            usepackage{booktabs}
                            setlength{defaultaddspace}{10pt}

                            begin{document}

                            begin{longtable}{L!{---}R}
                            12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                            addlinespace
                            12 & asdf asdf asdf asdf asdf.\
                            addlinespace
                            12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.
                            end{longtable}

                            end{document}


                            enter image description here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 7 hours ago









                            BernardBernard

                            169k773198




                            169k773198























                                1














                                The \[<dimen> command in a table tells LaTeX that the current row extends at least <dimen> below the baseline, in addition to the depth of a strut. Since your row extends much deeper than 10pt, the [10pt] argument adds nothing.



                                The addlinespace command provided by booktabs, which could simply called



                                addlinespace[10pt]


                                instead of globally changing defaultaddspace is good. Without packages, you can do



                                noalign{vspace{10pt}}


                                between rows.



                                I suggest using the relatively new w column specifier instead of >{raggedleft}p{0.1textwidth}, for a column where line breaks are not needed.
                                It requires usepackage{array}, which is automatically called by tabularx. In the code below I load it explicitly. It's needed anyway for newcolumntype.



                                documentclass[a4paper,10pt]{article}

                                usepackage{longtable}
                                usepackage{array}

                                newcolumntype{L}{w{r}{0.1textwidth}}
                                newcolumntype{R}{p{0.80textwidth}}

                                begin{document}

                                begin{longtable}{L!{---}R}
                                12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                                asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                                asdf asdf asdf asdf asdf asdf asdf.\
                                noalign{vspace{10pt}}
                                12 & asdf asdf asdf asdf asdf.\
                                noalign{vspace{10pt}}
                                12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                                end{longtable}

                                end{document}


                                enter image description here






                                share|improve this answer




























                                  1














                                  The \[<dimen> command in a table tells LaTeX that the current row extends at least <dimen> below the baseline, in addition to the depth of a strut. Since your row extends much deeper than 10pt, the [10pt] argument adds nothing.



                                  The addlinespace command provided by booktabs, which could simply called



                                  addlinespace[10pt]


                                  instead of globally changing defaultaddspace is good. Without packages, you can do



                                  noalign{vspace{10pt}}


                                  between rows.



                                  I suggest using the relatively new w column specifier instead of >{raggedleft}p{0.1textwidth}, for a column where line breaks are not needed.
                                  It requires usepackage{array}, which is automatically called by tabularx. In the code below I load it explicitly. It's needed anyway for newcolumntype.



                                  documentclass[a4paper,10pt]{article}

                                  usepackage{longtable}
                                  usepackage{array}

                                  newcolumntype{L}{w{r}{0.1textwidth}}
                                  newcolumntype{R}{p{0.80textwidth}}

                                  begin{document}

                                  begin{longtable}{L!{---}R}
                                  12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                                  asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                                  asdf asdf asdf asdf asdf asdf asdf.\
                                  noalign{vspace{10pt}}
                                  12 & asdf asdf asdf asdf asdf.\
                                  noalign{vspace{10pt}}
                                  12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                                  end{longtable}

                                  end{document}


                                  enter image description here






                                  share|improve this answer


























                                    1












                                    1








                                    1







                                    The \[<dimen> command in a table tells LaTeX that the current row extends at least <dimen> below the baseline, in addition to the depth of a strut. Since your row extends much deeper than 10pt, the [10pt] argument adds nothing.



                                    The addlinespace command provided by booktabs, which could simply called



                                    addlinespace[10pt]


                                    instead of globally changing defaultaddspace is good. Without packages, you can do



                                    noalign{vspace{10pt}}


                                    between rows.



                                    I suggest using the relatively new w column specifier instead of >{raggedleft}p{0.1textwidth}, for a column where line breaks are not needed.
                                    It requires usepackage{array}, which is automatically called by tabularx. In the code below I load it explicitly. It's needed anyway for newcolumntype.



                                    documentclass[a4paper,10pt]{article}

                                    usepackage{longtable}
                                    usepackage{array}

                                    newcolumntype{L}{w{r}{0.1textwidth}}
                                    newcolumntype{R}{p{0.80textwidth}}

                                    begin{document}

                                    begin{longtable}{L!{---}R}
                                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                                    asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                                    asdf asdf asdf asdf asdf asdf asdf.\
                                    noalign{vspace{10pt}}
                                    12 & asdf asdf asdf asdf asdf.\
                                    noalign{vspace{10pt}}
                                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                                    end{longtable}

                                    end{document}


                                    enter image description here






                                    share|improve this answer













                                    The \[<dimen> command in a table tells LaTeX that the current row extends at least <dimen> below the baseline, in addition to the depth of a strut. Since your row extends much deeper than 10pt, the [10pt] argument adds nothing.



                                    The addlinespace command provided by booktabs, which could simply called



                                    addlinespace[10pt]


                                    instead of globally changing defaultaddspace is good. Without packages, you can do



                                    noalign{vspace{10pt}}


                                    between rows.



                                    I suggest using the relatively new w column specifier instead of >{raggedleft}p{0.1textwidth}, for a column where line breaks are not needed.
                                    It requires usepackage{array}, which is automatically called by tabularx. In the code below I load it explicitly. It's needed anyway for newcolumntype.



                                    documentclass[a4paper,10pt]{article}

                                    usepackage{longtable}
                                    usepackage{array}

                                    newcolumntype{L}{w{r}{0.1textwidth}}
                                    newcolumntype{R}{p{0.80textwidth}}

                                    begin{document}

                                    begin{longtable}{L!{---}R}
                                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                                    asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf
                                    asdf asdf asdf asdf asdf asdf asdf.\
                                    noalign{vspace{10pt}}
                                    12 & asdf asdf asdf asdf asdf.\
                                    noalign{vspace{10pt}}
                                    12 & asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf.\
                                    end{longtable}

                                    end{document}


                                    enter image description here







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered 6 hours ago









                                    egregegreg

                                    717k8719023197




                                    717k8719023197






















                                        Saul is a new contributor. Be nice, and check out our Code of Conduct.










                                        draft saved

                                        draft discarded


















                                        Saul is a new contributor. Be nice, and check out our Code of Conduct.













                                        Saul is a new contributor. Be nice, and check out our Code of Conduct.












                                        Saul is a new contributor. Be nice, and check out our Code of Conduct.
















                                        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%2f473538%2fproblem-with-longtable-and%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 label and detect the document text images

                                        Vallis Paradisi

                                        Tabula Rosettana