Increase the space between text and the horizontal line in a table
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:
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
add a comment |
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:
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
add a comment |
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:
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
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:
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
tables spacing
asked Dec 22 at 9:55
Josemi
794
794
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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}
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 at 10:35
@Josemi You're welcome and thank you for accepting my answer! You could look atarray
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 at 10:50
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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}
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 at 10:35
@Josemi You're welcome and thank you for accepting my answer! You could look atarray
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 at 10:50
add a comment |
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}
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 at 10:35
@Josemi You're welcome and thank you for accepting my answer! You could look atarray
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 at 10:50
add a comment |
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}
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}
edited Dec 22 at 10:27
answered Dec 22 at 10:12
CarLaTeX
29.4k447125
29.4k447125
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 at 10:35
@Josemi You're welcome and thank you for accepting my answer! You could look atarray
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 at 10:50
add a comment |
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 at 10:35
@Josemi You're welcome and thank you for accepting my answer! You could look atarray
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 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 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 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 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 at 10:50
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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