Discontinuous line using multirow The Next CEO of Stack OverflowWhy are my Images not...
Is a distribution that is normal, but highly skewed, considered Gaussian?
Salesforce opportunity stages
Cannot restore registry to default in Windows 10?
pgfplots: How to draw a tangent graph below two others?
What are the unusually-enlarged wing sections on this P-38 Lightning?
Read/write a pipe-delimited file line by line with some simple text manipulation
Mathematica command that allows it to read my intentions
Is it OK to decorate a log book cover?
How can the PCs determine if an item is a phylactery?
Does int main() need a declaration on C++?
Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?
Is a linearly independent set whose span is dense a Schauder basis?
Compilation of a 2d array and a 1d array
Car headlights in a world without electricity
Prodigo = pro + ago?
How can I separate the number from the unit in argument?
Can Sri Krishna be called 'a person'?
Is it correct to say moon starry nights?
Noise during hard braking
Creating a script with console commands
It it possible to avoid kiwi.com's automatic online check-in and instead do it manually by yourself?
A hang glider, sudden unexpected lift to 25,000 feet altitude, what could do this?
How to show a landlord what we have in savings?
Find the majority element, which appears more than half the time
Discontinuous line using multirow
The Next CEO of Stack OverflowWhy are my Images not correctly centered?using lists inside multirowMultiple questions regarding formatting tablesUsing `multirow`Border with multirow and multicolumnIs there a simple way to create a latex equivalent of this (ms)word table template?Line on the left hand side of multirow?Discontinuous borders in tablevertical lines using multirowUsing multirow and makecell
I've been struggling with table editing, so I started using a website to generate tables in LaTeX. However, whenever I'm using multirow and borders, things get a little tricky. I get a discontinuous line along my column.
As a test, I'm using this:
begin{table}[]
centering
caption{My caption}
label{my-label}
begin{tabular}{@{}c|cc@{}}
Test & a & b \ midrule
multirow{2}{*}{x} & 1 & 2 \ cmidrule(l){2-3}
& 3 & 4
end{tabular}
end{table}
This is the result:

I'm using TexPortable with MiKTeX 2.9.6210 and Texmaker 4.5.
tables border
add a comment |
I've been struggling with table editing, so I started using a website to generate tables in LaTeX. However, whenever I'm using multirow and borders, things get a little tricky. I get a discontinuous line along my column.
As a test, I'm using this:
begin{table}[]
centering
caption{My caption}
label{my-label}
begin{tabular}{@{}c|cc@{}}
Test & a & b \ midrule
multirow{2}{*}{x} & 1 & 2 \ cmidrule(l){2-3}
& 3 & 4
end{tabular}
end{table}
This is the result:

I'm using TexPortable with MiKTeX 2.9.6210 and Texmaker 4.5.
tables border
add a comment |
I've been struggling with table editing, so I started using a website to generate tables in LaTeX. However, whenever I'm using multirow and borders, things get a little tricky. I get a discontinuous line along my column.
As a test, I'm using this:
begin{table}[]
centering
caption{My caption}
label{my-label}
begin{tabular}{@{}c|cc@{}}
Test & a & b \ midrule
multirow{2}{*}{x} & 1 & 2 \ cmidrule(l){2-3}
& 3 & 4
end{tabular}
end{table}
This is the result:

I'm using TexPortable with MiKTeX 2.9.6210 and Texmaker 4.5.
tables border
I've been struggling with table editing, so I started using a website to generate tables in LaTeX. However, whenever I'm using multirow and borders, things get a little tricky. I get a discontinuous line along my column.
As a test, I'm using this:
begin{table}[]
centering
caption{My caption}
label{my-label}
begin{tabular}{@{}c|cc@{}}
Test & a & b \ midrule
multirow{2}{*}{x} & 1 & 2 \ cmidrule(l){2-3}
& 3 & 4
end{tabular}
end{table}
This is the result:

I'm using TexPortable with MiKTeX 2.9.6210 and Texmaker 4.5.
tables border
tables border
edited Apr 26 '17 at 8:56
Moriambar
7,94531846
7,94531846
asked Apr 26 '17 at 8:28
Tiago CorreiaTiago Correia
1019
1019
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This is related to the padding around horizontal lines in booktabs (the lengths aboverulesep and belowrulesep). Vertical rules should not be used with booktabs in general (this principle suffers exceptions). A workaround consists in setting them to 0 and replacing them with more or less equivalent lengths added at the top and bottom of cells with the tools from makecell.
documentclass{article}
usepackage{booktabs, multirow, array, makecell, caption}
begin{document}
begin{table}[!htb]
centering
setlengthaboverulesep{0pt}setlengthbelowrulesep{0pt}
setcellgapes{3pt}makegapedcells
caption{My caption}
label{my-label}
begin{tabular}{@{}c|cc@{}}
Test & a & b \ midrule
multirow{2}{*}{x} & 1 & 2 \ addlinespace[-0.03em]cmidrule(l){2-3}
& 3 & 4
end{tabular}
end{table}
end{document}

I've tried that and it worked on the vertical line, but the horizontal line is still discontinuous, here. Thank you!
– Tiago Correia
Apr 26 '17 at 9:18
1
Do you mean the short line between 2nd and 3rd row? I thought it was there purposely. The responsible is the(l)optional argument ofcmidrule. Just remove it.
– Bernard
Apr 26 '17 at 9:25
add a comment |
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%2f366744%2fdiscontinuous-line-using-multirow%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is related to the padding around horizontal lines in booktabs (the lengths aboverulesep and belowrulesep). Vertical rules should not be used with booktabs in general (this principle suffers exceptions). A workaround consists in setting them to 0 and replacing them with more or less equivalent lengths added at the top and bottom of cells with the tools from makecell.
documentclass{article}
usepackage{booktabs, multirow, array, makecell, caption}
begin{document}
begin{table}[!htb]
centering
setlengthaboverulesep{0pt}setlengthbelowrulesep{0pt}
setcellgapes{3pt}makegapedcells
caption{My caption}
label{my-label}
begin{tabular}{@{}c|cc@{}}
Test & a & b \ midrule
multirow{2}{*}{x} & 1 & 2 \ addlinespace[-0.03em]cmidrule(l){2-3}
& 3 & 4
end{tabular}
end{table}
end{document}

I've tried that and it worked on the vertical line, but the horizontal line is still discontinuous, here. Thank you!
– Tiago Correia
Apr 26 '17 at 9:18
1
Do you mean the short line between 2nd and 3rd row? I thought it was there purposely. The responsible is the(l)optional argument ofcmidrule. Just remove it.
– Bernard
Apr 26 '17 at 9:25
add a comment |
This is related to the padding around horizontal lines in booktabs (the lengths aboverulesep and belowrulesep). Vertical rules should not be used with booktabs in general (this principle suffers exceptions). A workaround consists in setting them to 0 and replacing them with more or less equivalent lengths added at the top and bottom of cells with the tools from makecell.
documentclass{article}
usepackage{booktabs, multirow, array, makecell, caption}
begin{document}
begin{table}[!htb]
centering
setlengthaboverulesep{0pt}setlengthbelowrulesep{0pt}
setcellgapes{3pt}makegapedcells
caption{My caption}
label{my-label}
begin{tabular}{@{}c|cc@{}}
Test & a & b \ midrule
multirow{2}{*}{x} & 1 & 2 \ addlinespace[-0.03em]cmidrule(l){2-3}
& 3 & 4
end{tabular}
end{table}
end{document}

I've tried that and it worked on the vertical line, but the horizontal line is still discontinuous, here. Thank you!
– Tiago Correia
Apr 26 '17 at 9:18
1
Do you mean the short line between 2nd and 3rd row? I thought it was there purposely. The responsible is the(l)optional argument ofcmidrule. Just remove it.
– Bernard
Apr 26 '17 at 9:25
add a comment |
This is related to the padding around horizontal lines in booktabs (the lengths aboverulesep and belowrulesep). Vertical rules should not be used with booktabs in general (this principle suffers exceptions). A workaround consists in setting them to 0 and replacing them with more or less equivalent lengths added at the top and bottom of cells with the tools from makecell.
documentclass{article}
usepackage{booktabs, multirow, array, makecell, caption}
begin{document}
begin{table}[!htb]
centering
setlengthaboverulesep{0pt}setlengthbelowrulesep{0pt}
setcellgapes{3pt}makegapedcells
caption{My caption}
label{my-label}
begin{tabular}{@{}c|cc@{}}
Test & a & b \ midrule
multirow{2}{*}{x} & 1 & 2 \ addlinespace[-0.03em]cmidrule(l){2-3}
& 3 & 4
end{tabular}
end{table}
end{document}

This is related to the padding around horizontal lines in booktabs (the lengths aboverulesep and belowrulesep). Vertical rules should not be used with booktabs in general (this principle suffers exceptions). A workaround consists in setting them to 0 and replacing them with more or less equivalent lengths added at the top and bottom of cells with the tools from makecell.
documentclass{article}
usepackage{booktabs, multirow, array, makecell, caption}
begin{document}
begin{table}[!htb]
centering
setlengthaboverulesep{0pt}setlengthbelowrulesep{0pt}
setcellgapes{3pt}makegapedcells
caption{My caption}
label{my-label}
begin{tabular}{@{}c|cc@{}}
Test & a & b \ midrule
multirow{2}{*}{x} & 1 & 2 \ addlinespace[-0.03em]cmidrule(l){2-3}
& 3 & 4
end{tabular}
end{table}
end{document}

edited 23 mins ago
answered Apr 26 '17 at 8:56
BernardBernard
175k776207
175k776207
I've tried that and it worked on the vertical line, but the horizontal line is still discontinuous, here. Thank you!
– Tiago Correia
Apr 26 '17 at 9:18
1
Do you mean the short line between 2nd and 3rd row? I thought it was there purposely. The responsible is the(l)optional argument ofcmidrule. Just remove it.
– Bernard
Apr 26 '17 at 9:25
add a comment |
I've tried that and it worked on the vertical line, but the horizontal line is still discontinuous, here. Thank you!
– Tiago Correia
Apr 26 '17 at 9:18
1
Do you mean the short line between 2nd and 3rd row? I thought it was there purposely. The responsible is the(l)optional argument ofcmidrule. Just remove it.
– Bernard
Apr 26 '17 at 9:25
I've tried that and it worked on the vertical line, but the horizontal line is still discontinuous, here. Thank you!
– Tiago Correia
Apr 26 '17 at 9:18
I've tried that and it worked on the vertical line, but the horizontal line is still discontinuous, here. Thank you!
– Tiago Correia
Apr 26 '17 at 9:18
1
1
Do you mean the short line between 2nd and 3rd row? I thought it was there purposely. The responsible is the
(l) optional argument of cmidrule. Just remove it.– Bernard
Apr 26 '17 at 9:25
Do you mean the short line between 2nd and 3rd row? I thought it was there purposely. The responsible is the
(l) optional argument of cmidrule. Just remove it.– Bernard
Apr 26 '17 at 9:25
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.
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%2f366744%2fdiscontinuous-line-using-multirow%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
