Increase the space between text and the horizontal line in a table












4















I have a problem with my table. Here's my code:



documentclass{article}
usepackage{eurosym}
usepackage{enumerate}
usepackage{fancyhdr}
usepackage[utf8]{inputenc}
usepackage{graphicx}
usepackage[spanish]{babel}
usepackage{subfigure}
usepackage{vmargin}
usepackage{caption}
usepackage{amsmath}


begin{document}
title{empty}
author{empty }
date{empty}


maketitle


begin{table}[h!]
begin{center}
begin{tabular}{l|l}
parbox{0.4textwidth}{sudo ifconfig serviciosB down \
sudo ifconfig serviciosA \ 172.24.1.1/24 \
sudo route add -net 172.24.2.0/24 gw 172.24.1.222 }
& parbox{0.4textwidth}{sudo ifconfig serviciosA down
\
sudo ifconfig serviciosB \ 172.24.2.1/24 \
sudo route add -net 172.24.1.0/24 gw 172.24.2.222} \
hline
parbox{0.4textwidth}{sudo ifconfig serviciosB down \
sudo ifconfig serviciosA \ 172.24.1.2/24 \
sudo route add -net 172.24.2.0/24 gw 172.24.1.222} &
parbox{0.4textwidth}{sudo ifconfig serviciosA down \
sudo ifconfig serviciosB \ 172.24.2.2/24 \
sudo route add -net 172.24.1.0/24 gw 172.24.2.222} \
end{tabular}
end{center}
end{table}

end{document}


The result of that table is this one:



Table



However, I'd like to increase the space between the text and the horizontal line of the middle of the table.



I hope someone can help me. Thank you for your responses.










share|improve this question



























    4















    I have a problem with my table. Here's my code:



    documentclass{article}
    usepackage{eurosym}
    usepackage{enumerate}
    usepackage{fancyhdr}
    usepackage[utf8]{inputenc}
    usepackage{graphicx}
    usepackage[spanish]{babel}
    usepackage{subfigure}
    usepackage{vmargin}
    usepackage{caption}
    usepackage{amsmath}


    begin{document}
    title{empty}
    author{empty }
    date{empty}


    maketitle


    begin{table}[h!]
    begin{center}
    begin{tabular}{l|l}
    parbox{0.4textwidth}{sudo ifconfig serviciosB down \
    sudo ifconfig serviciosA \ 172.24.1.1/24 \
    sudo route add -net 172.24.2.0/24 gw 172.24.1.222 }
    & parbox{0.4textwidth}{sudo ifconfig serviciosA down
    \
    sudo ifconfig serviciosB \ 172.24.2.1/24 \
    sudo route add -net 172.24.1.0/24 gw 172.24.2.222} \
    hline
    parbox{0.4textwidth}{sudo ifconfig serviciosB down \
    sudo ifconfig serviciosA \ 172.24.1.2/24 \
    sudo route add -net 172.24.2.0/24 gw 172.24.1.222} &
    parbox{0.4textwidth}{sudo ifconfig serviciosA down \
    sudo ifconfig serviciosB \ 172.24.2.2/24 \
    sudo route add -net 172.24.1.0/24 gw 172.24.2.222} \
    end{tabular}
    end{center}
    end{table}

    end{document}


    The result of that table is this one:



    Table



    However, I'd like to increase the space between the text and the horizontal line of the middle of the table.



    I hope someone can help me. Thank you for your responses.










    share|improve this question

























      4












      4








      4








      I have a problem with my table. Here's my code:



      documentclass{article}
      usepackage{eurosym}
      usepackage{enumerate}
      usepackage{fancyhdr}
      usepackage[utf8]{inputenc}
      usepackage{graphicx}
      usepackage[spanish]{babel}
      usepackage{subfigure}
      usepackage{vmargin}
      usepackage{caption}
      usepackage{amsmath}


      begin{document}
      title{empty}
      author{empty }
      date{empty}


      maketitle


      begin{table}[h!]
      begin{center}
      begin{tabular}{l|l}
      parbox{0.4textwidth}{sudo ifconfig serviciosB down \
      sudo ifconfig serviciosA \ 172.24.1.1/24 \
      sudo route add -net 172.24.2.0/24 gw 172.24.1.222 }
      & parbox{0.4textwidth}{sudo ifconfig serviciosA down
      \
      sudo ifconfig serviciosB \ 172.24.2.1/24 \
      sudo route add -net 172.24.1.0/24 gw 172.24.2.222} \
      hline
      parbox{0.4textwidth}{sudo ifconfig serviciosB down \
      sudo ifconfig serviciosA \ 172.24.1.2/24 \
      sudo route add -net 172.24.2.0/24 gw 172.24.1.222} &
      parbox{0.4textwidth}{sudo ifconfig serviciosA down \
      sudo ifconfig serviciosB \ 172.24.2.2/24 \
      sudo route add -net 172.24.1.0/24 gw 172.24.2.222} \
      end{tabular}
      end{center}
      end{table}

      end{document}


      The result of that table is this one:



      Table



      However, I'd like to increase the space between the text and the horizontal line of the middle of the table.



      I hope someone can help me. Thank you for your responses.










      share|improve this question














      I have a problem with my table. Here's my code:



      documentclass{article}
      usepackage{eurosym}
      usepackage{enumerate}
      usepackage{fancyhdr}
      usepackage[utf8]{inputenc}
      usepackage{graphicx}
      usepackage[spanish]{babel}
      usepackage{subfigure}
      usepackage{vmargin}
      usepackage{caption}
      usepackage{amsmath}


      begin{document}
      title{empty}
      author{empty }
      date{empty}


      maketitle


      begin{table}[h!]
      begin{center}
      begin{tabular}{l|l}
      parbox{0.4textwidth}{sudo ifconfig serviciosB down \
      sudo ifconfig serviciosA \ 172.24.1.1/24 \
      sudo route add -net 172.24.2.0/24 gw 172.24.1.222 }
      & parbox{0.4textwidth}{sudo ifconfig serviciosA down
      \
      sudo ifconfig serviciosB \ 172.24.2.1/24 \
      sudo route add -net 172.24.1.0/24 gw 172.24.2.222} \
      hline
      parbox{0.4textwidth}{sudo ifconfig serviciosB down \
      sudo ifconfig serviciosA \ 172.24.1.2/24 \
      sudo route add -net 172.24.2.0/24 gw 172.24.1.222} &
      parbox{0.4textwidth}{sudo ifconfig serviciosA down \
      sudo ifconfig serviciosB \ 172.24.2.2/24 \
      sudo route add -net 172.24.1.0/24 gw 172.24.2.222} \
      end{tabular}
      end{center}
      end{table}

      end{document}


      The result of that table is this one:



      Table



      However, I'd like to increase the space between the text and the horizontal line of the middle of the table.



      I hope someone can help me. Thank you for your responses.







      tables spacing






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 22 '18 at 9:55









      Josemi Josemi

      814




      814






















          1 Answer
          1






          active

          oldest

          votes


















          7














          You could use the appropriate p{...} column type, instead of putting parboxes in cells.



          I created a new column type L which is ragged right but, of course, you can use p{...} directly, if you don't want the ragging.



          I also redefined arraystretch to have a bit more space.



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage[spanish]{babel}
          usepackage{array}
          newcolumntype{L}{>{raggedrightarraybackslash}p{.4linewidth}}
          renewcommand{arraystretch}{1.2}
          begin{document}
          begin{table}[h!]
          begin{center}
          begin{tabular}{L|L}
          sudo ifconfig serviciosB downnewline
          sudo ifconfig serviciosA newline 172.24.1.1/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222
          & sudo ifconfig serviciosA down
          newline
          sudo ifconfig serviciosB newline 172.24.2.1/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222\
          hline
          sudo ifconfig serviciosB down newline
          sudo ifconfig serviciosA newline 172.24.1.2/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222 &
          sudo ifconfig serviciosA down newline
          sudo ifconfig serviciosB newline 172.24.2.2/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222 \
          end{tabular}
          end{center}
          end{table}

          end{document}


          enter image description here






          share|improve this answer


























          • Thank you so much, but I'd apreciate if you could give me a link or a page where I can learn to redefine types of columns to be able to do that in another occasion.

            – Josemi
            Dec 22 '18 at 10:35











          • @Josemi You're welcome and thank you for accepting my answer! You could look at array package documentation ctan.org/pkg/array and see also here: tex.stackexchange.com/questions/11/…. And feel free tp ask a question whenever you got a problem you can't solve by yourself!

            – CarLaTeX
            Dec 22 '18 at 10:50













          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%2f466954%2fincrease-the-space-between-text-and-the-horizontal-line-in-a-table%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









          7














          You could use the appropriate p{...} column type, instead of putting parboxes in cells.



          I created a new column type L which is ragged right but, of course, you can use p{...} directly, if you don't want the ragging.



          I also redefined arraystretch to have a bit more space.



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage[spanish]{babel}
          usepackage{array}
          newcolumntype{L}{>{raggedrightarraybackslash}p{.4linewidth}}
          renewcommand{arraystretch}{1.2}
          begin{document}
          begin{table}[h!]
          begin{center}
          begin{tabular}{L|L}
          sudo ifconfig serviciosB downnewline
          sudo ifconfig serviciosA newline 172.24.1.1/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222
          & sudo ifconfig serviciosA down
          newline
          sudo ifconfig serviciosB newline 172.24.2.1/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222\
          hline
          sudo ifconfig serviciosB down newline
          sudo ifconfig serviciosA newline 172.24.1.2/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222 &
          sudo ifconfig serviciosA down newline
          sudo ifconfig serviciosB newline 172.24.2.2/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222 \
          end{tabular}
          end{center}
          end{table}

          end{document}


          enter image description here






          share|improve this answer


























          • Thank you so much, but I'd apreciate if you could give me a link or a page where I can learn to redefine types of columns to be able to do that in another occasion.

            – Josemi
            Dec 22 '18 at 10:35











          • @Josemi You're welcome and thank you for accepting my answer! You could look at array package documentation ctan.org/pkg/array and see also here: tex.stackexchange.com/questions/11/…. And feel free tp ask a question whenever you got a problem you can't solve by yourself!

            – CarLaTeX
            Dec 22 '18 at 10:50


















          7














          You could use the appropriate p{...} column type, instead of putting parboxes in cells.



          I created a new column type L which is ragged right but, of course, you can use p{...} directly, if you don't want the ragging.



          I also redefined arraystretch to have a bit more space.



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage[spanish]{babel}
          usepackage{array}
          newcolumntype{L}{>{raggedrightarraybackslash}p{.4linewidth}}
          renewcommand{arraystretch}{1.2}
          begin{document}
          begin{table}[h!]
          begin{center}
          begin{tabular}{L|L}
          sudo ifconfig serviciosB downnewline
          sudo ifconfig serviciosA newline 172.24.1.1/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222
          & sudo ifconfig serviciosA down
          newline
          sudo ifconfig serviciosB newline 172.24.2.1/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222\
          hline
          sudo ifconfig serviciosB down newline
          sudo ifconfig serviciosA newline 172.24.1.2/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222 &
          sudo ifconfig serviciosA down newline
          sudo ifconfig serviciosB newline 172.24.2.2/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222 \
          end{tabular}
          end{center}
          end{table}

          end{document}


          enter image description here






          share|improve this answer


























          • Thank you so much, but I'd apreciate if you could give me a link or a page where I can learn to redefine types of columns to be able to do that in another occasion.

            – Josemi
            Dec 22 '18 at 10:35











          • @Josemi You're welcome and thank you for accepting my answer! You could look at array package documentation ctan.org/pkg/array and see also here: tex.stackexchange.com/questions/11/…. And feel free tp ask a question whenever you got a problem you can't solve by yourself!

            – CarLaTeX
            Dec 22 '18 at 10:50
















          7












          7








          7







          You could use the appropriate p{...} column type, instead of putting parboxes in cells.



          I created a new column type L which is ragged right but, of course, you can use p{...} directly, if you don't want the ragging.



          I also redefined arraystretch to have a bit more space.



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage[spanish]{babel}
          usepackage{array}
          newcolumntype{L}{>{raggedrightarraybackslash}p{.4linewidth}}
          renewcommand{arraystretch}{1.2}
          begin{document}
          begin{table}[h!]
          begin{center}
          begin{tabular}{L|L}
          sudo ifconfig serviciosB downnewline
          sudo ifconfig serviciosA newline 172.24.1.1/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222
          & sudo ifconfig serviciosA down
          newline
          sudo ifconfig serviciosB newline 172.24.2.1/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222\
          hline
          sudo ifconfig serviciosB down newline
          sudo ifconfig serviciosA newline 172.24.1.2/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222 &
          sudo ifconfig serviciosA down newline
          sudo ifconfig serviciosB newline 172.24.2.2/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222 \
          end{tabular}
          end{center}
          end{table}

          end{document}


          enter image description here






          share|improve this answer















          You could use the appropriate p{...} column type, instead of putting parboxes in cells.



          I created a new column type L which is ragged right but, of course, you can use p{...} directly, if you don't want the ragging.



          I also redefined arraystretch to have a bit more space.



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage[spanish]{babel}
          usepackage{array}
          newcolumntype{L}{>{raggedrightarraybackslash}p{.4linewidth}}
          renewcommand{arraystretch}{1.2}
          begin{document}
          begin{table}[h!]
          begin{center}
          begin{tabular}{L|L}
          sudo ifconfig serviciosB downnewline
          sudo ifconfig serviciosA newline 172.24.1.1/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222
          & sudo ifconfig serviciosA down
          newline
          sudo ifconfig serviciosB newline 172.24.2.1/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222\
          hline
          sudo ifconfig serviciosB down newline
          sudo ifconfig serviciosA newline 172.24.1.2/24 newline
          sudo route add -net 172.24.2.0/24 gw 172.24.1.222 &
          sudo ifconfig serviciosA down newline
          sudo ifconfig serviciosB newline 172.24.2.2/24 newline
          sudo route add -net 172.24.1.0/24 gw 172.24.2.222 \
          end{tabular}
          end{center}
          end{table}

          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 22 '18 at 10:27

























          answered Dec 22 '18 at 10:12









          CarLaTeXCarLaTeX

          32.4k551134




          32.4k551134













          • Thank you so much, but I'd apreciate if you could give me a link or a page where I can learn to redefine types of columns to be able to do that in another occasion.

            – Josemi
            Dec 22 '18 at 10:35











          • @Josemi You're welcome and thank you for accepting my answer! You could look at array package documentation ctan.org/pkg/array and see also here: tex.stackexchange.com/questions/11/…. And feel free tp ask a question whenever you got a problem you can't solve by yourself!

            – CarLaTeX
            Dec 22 '18 at 10:50





















          • Thank you so much, but I'd apreciate if you could give me a link or a page where I can learn to redefine types of columns to be able to do that in another occasion.

            – Josemi
            Dec 22 '18 at 10:35











          • @Josemi You're welcome and thank you for accepting my answer! You could look at array package documentation ctan.org/pkg/array and see also here: tex.stackexchange.com/questions/11/…. And feel free tp ask a question whenever you got a problem you can't solve by yourself!

            – CarLaTeX
            Dec 22 '18 at 10:50



















          Thank you so much, but I'd apreciate if you could give me a link or a page where I can learn to redefine types of columns to be able to do that in another occasion.

          – Josemi
          Dec 22 '18 at 10:35





          Thank you so much, but I'd apreciate if you could give me a link or a page where I can learn to redefine types of columns to be able to do that in another occasion.

          – Josemi
          Dec 22 '18 at 10:35













          @Josemi You're welcome and thank you for accepting my answer! You could look at array package documentation ctan.org/pkg/array and see also here: tex.stackexchange.com/questions/11/…. And feel free tp ask a question whenever you got a problem you can't solve by yourself!

          – CarLaTeX
          Dec 22 '18 at 10:50







          @Josemi You're welcome and thank you for accepting my answer! You could look at array package documentation ctan.org/pkg/array and see also here: tex.stackexchange.com/questions/11/…. And feel free tp ask a question whenever you got a problem you can't solve by yourself!

          – CarLaTeX
          Dec 22 '18 at 10:50




















          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%2f466954%2fincrease-the-space-between-text-and-the-horizontal-line-in-a-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

          Wiesbaden

          Marschland

          Dieringhausen