Weird corners with clineCan't get table border lines to meet in the cornerstabular* with rubber spacing and...
Thought experiment and possible contradiction between electromagnetism and special relativity
What's special ammo in Destiny 2?
When using a variable to set the path, I get "No such file or directory", but works fine otherwise
What does it take for witness testimony to be believed?
Talk interpreter
Who was the most successful German spy against Great Britain in WWII, from the contemporary German perspective?
Do you pay one or two mana to bounce a transformed Delver of Secrets with Repeal?
Beginner to guitar playing - where should I begin?
Can I get a PhD for developing an educational software?
Why did my folder names end up like this, and how can I fix this using a script?
Expanding powers of expressions of the form ax+b
3D cryptic featuring Mao, Stalin and Simba's uncle
What's the point of fighting monsters in Zelda BoTW?
What is the name of this plot that has rows with two connected dots?
Number of academics in various EU countries
How do you capitalize agile costs with less mature teams?
How much does Commander Data weigh?
Why is getting a PhD considered "financially irresponsible" by some people?
Does a Mace of Disruption's Frightened effect override undead immunity to the Frightened condition?
Why is strlen so complex in C?
Papers on arXiv solving the same problem at the same time
Is this password scheme legit?
Redacting URLs as an email-phishing preventative?
Did Dr. Hannibal Lecter like Clarice or was he attracted to her?
Weird corners with cline
Can't get table border lines to meet in the cornerstabular* with rubber spacing and clineTable with rounded corners?Table with rounded cornerscline Not Working with Customized Column PaddingTable Border Line with cline bleaches outWeird vertical lines with tableCline doesn´t work properlySpace between cline in tableTabular with rounded corners made with tikzpicture with overlay is not properly positioned inside table environment
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
The intersection of horizontal clines and vertical lines in tables look weird. Here is a MWE:
documentclass[11pt,oneside]{article}
%usepackage{array}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\
cline{2-3}
end{tabular}
end{table}
end{document}
Here is the output:
As you can see, there are small gaps at the intersections of the horizontal and the vertical lines at the two corners at the bottom. Interestingly, the two corners at the top are fine.
Now if the array
package is loaded (simply uncomment in the code above), then I get:
The weird gap is gone at the lower right corner but it still persists at the lower left corner.
I did a considerable amount of research into this (see, e.g., this post) but did not find any definitive solution. Any suggestions would be greatly appreciated.
(I am aware of the existence of hhline
but I read in another post that it might be prone to similar intersection issues, so I’d prefer a solution without it.)
tables
New contributor
add a comment |
The intersection of horizontal clines and vertical lines in tables look weird. Here is a MWE:
documentclass[11pt,oneside]{article}
%usepackage{array}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\
cline{2-3}
end{tabular}
end{table}
end{document}
Here is the output:
As you can see, there are small gaps at the intersections of the horizontal and the vertical lines at the two corners at the bottom. Interestingly, the two corners at the top are fine.
Now if the array
package is loaded (simply uncomment in the code above), then I get:
The weird gap is gone at the lower right corner but it still persists at the lower left corner.
I did a considerable amount of research into this (see, e.g., this post) but did not find any definitive solution. Any suggestions would be greatly appreciated.
(I am aware of the existence of hhline
but I read in another post that it might be prone to similar intersection issues, so I’d prefer a solution without it.)
tables
New contributor
If it only partially works loadingarray
, maybe this is due to ttheoneside
option the ‘article’? ;o)
– Bernard
10 hours ago
@Bernard Nice catch! Alas, the output is the same upon taking outoneside
.
– triple_sec
9 hours ago
I just found funny that a one-side defect happened with the oneside option…
– Bernard
9 hours ago
@Bernard It would make sense, but it would also be a surprise if TeX were that predictable... :-)
– triple_sec
7 hours ago
add a comment |
The intersection of horizontal clines and vertical lines in tables look weird. Here is a MWE:
documentclass[11pt,oneside]{article}
%usepackage{array}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\
cline{2-3}
end{tabular}
end{table}
end{document}
Here is the output:
As you can see, there are small gaps at the intersections of the horizontal and the vertical lines at the two corners at the bottom. Interestingly, the two corners at the top are fine.
Now if the array
package is loaded (simply uncomment in the code above), then I get:
The weird gap is gone at the lower right corner but it still persists at the lower left corner.
I did a considerable amount of research into this (see, e.g., this post) but did not find any definitive solution. Any suggestions would be greatly appreciated.
(I am aware of the existence of hhline
but I read in another post that it might be prone to similar intersection issues, so I’d prefer a solution without it.)
tables
New contributor
The intersection of horizontal clines and vertical lines in tables look weird. Here is a MWE:
documentclass[11pt,oneside]{article}
%usepackage{array}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\
cline{2-3}
end{tabular}
end{table}
end{document}
Here is the output:
As you can see, there are small gaps at the intersections of the horizontal and the vertical lines at the two corners at the bottom. Interestingly, the two corners at the top are fine.
Now if the array
package is loaded (simply uncomment in the code above), then I get:
The weird gap is gone at the lower right corner but it still persists at the lower left corner.
I did a considerable amount of research into this (see, e.g., this post) but did not find any definitive solution. Any suggestions would be greatly appreciated.
(I am aware of the existence of hhline
but I read in another post that it might be prone to similar intersection issues, so I’d prefer a solution without it.)
tables
tables
New contributor
New contributor
edited 7 hours ago
triple_sec
New contributor
asked 11 hours ago
triple_sectriple_sec
1263 bronze badges
1263 bronze badges
New contributor
New contributor
If it only partially works loadingarray
, maybe this is due to ttheoneside
option the ‘article’? ;o)
– Bernard
10 hours ago
@Bernard Nice catch! Alas, the output is the same upon taking outoneside
.
– triple_sec
9 hours ago
I just found funny that a one-side defect happened with the oneside option…
– Bernard
9 hours ago
@Bernard It would make sense, but it would also be a surprise if TeX were that predictable... :-)
– triple_sec
7 hours ago
add a comment |
If it only partially works loadingarray
, maybe this is due to ttheoneside
option the ‘article’? ;o)
– Bernard
10 hours ago
@Bernard Nice catch! Alas, the output is the same upon taking outoneside
.
– triple_sec
9 hours ago
I just found funny that a one-side defect happened with the oneside option…
– Bernard
9 hours ago
@Bernard It would make sense, but it would also be a surprise if TeX were that predictable... :-)
– triple_sec
7 hours ago
If it only partially works loading
array
, maybe this is due to tthe oneside
option the ‘article’? ;o)– Bernard
10 hours ago
If it only partially works loading
array
, maybe this is due to tthe oneside
option the ‘article’? ;o)– Bernard
10 hours ago
@Bernard Nice catch! Alas, the output is the same upon taking out
oneside
.– triple_sec
9 hours ago
@Bernard Nice catch! Alas, the output is the same upon taking out
oneside
.– triple_sec
9 hours ago
I just found funny that a one-side defect happened with the oneside option…
– Bernard
9 hours ago
I just found funny that a one-side defect happened with the oneside option…
– Bernard
9 hours ago
@Bernard It would make sense, but it would also be a surprise if TeX were that predictable... :-)
– triple_sec
7 hours ago
@Bernard It would make sense, but it would also be a surprise if TeX were that predictable... :-)
– triple_sec
7 hours ago
add a comment |
2 Answers
2
active
oldest
votes
You get precise control with hhline
:
documentclass{article}
usepackage{hhline}
begin{document}
begin{tabular}{c|c|c|c}
hhline{~|-|-|~}
a&b&c&d\
hhline{~|-|-|~}
end{tabular}
end{document}
~
means no rule for the cell,
|
means an intersection with a vertical rule,
-
means a rule for the cell.
add a comment |
Don't know why it happens, but here's a fix...diminish the \
by arrayrulewidth
(EDITED to reflect arrayrulewidth
rather than fboxrule
, hat tip: David Carlisle).
documentclass[11pt,oneside]{article}
%usepackage{array}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
If one is concerned that this approach shrinks the height of the cell by -arrayrulewidth
, then just compensate by adding an extra arrayrulewidth
to the depth of the line before the shrunken \
. Compare the original box on the left with the revised on the right.
documentclass[11pt,oneside]{article}
%usepackage{array}
newcommandmystrut{rule[dimexpr-dpstrutbox-arrayrulewidth]{0pt}{%
dimexprbaselineskip+arrayrulewidth}}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\
cline{2-3}
end{tabular}%
%
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&dmystrut\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
This is clever, thank you! Doesn’t it shrink the height of cells, though? (I know it’s a PITA and I probably shouldn’t do this, but I like to control cell heights as much as TeX lets me.)
– triple_sec
10 hours ago
@triple_sec Please see my edit.
– Steven B. Segletes
10 hours ago
2
Fboxrule Is used for fbox not tables atrayrulewifth
– David Carlisle
9 hours ago
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
});
}
});
triple_sec is a new contributor. Be nice, and check out our Code of Conduct.
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%2f505789%2fweird-corners-with-cline%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You get precise control with hhline
:
documentclass{article}
usepackage{hhline}
begin{document}
begin{tabular}{c|c|c|c}
hhline{~|-|-|~}
a&b&c&d\
hhline{~|-|-|~}
end{tabular}
end{document}
~
means no rule for the cell,
|
means an intersection with a vertical rule,
-
means a rule for the cell.
add a comment |
You get precise control with hhline
:
documentclass{article}
usepackage{hhline}
begin{document}
begin{tabular}{c|c|c|c}
hhline{~|-|-|~}
a&b&c&d\
hhline{~|-|-|~}
end{tabular}
end{document}
~
means no rule for the cell,
|
means an intersection with a vertical rule,
-
means a rule for the cell.
add a comment |
You get precise control with hhline
:
documentclass{article}
usepackage{hhline}
begin{document}
begin{tabular}{c|c|c|c}
hhline{~|-|-|~}
a&b&c&d\
hhline{~|-|-|~}
end{tabular}
end{document}
~
means no rule for the cell,
|
means an intersection with a vertical rule,
-
means a rule for the cell.
You get precise control with hhline
:
documentclass{article}
usepackage{hhline}
begin{document}
begin{tabular}{c|c|c|c}
hhline{~|-|-|~}
a&b&c&d\
hhline{~|-|-|~}
end{tabular}
end{document}
~
means no rule for the cell,
|
means an intersection with a vertical rule,
-
means a rule for the cell.
answered 10 hours ago
egregegreg
764k90 gold badges1997 silver badges3345 bronze badges
764k90 gold badges1997 silver badges3345 bronze badges
add a comment |
add a comment |
Don't know why it happens, but here's a fix...diminish the \
by arrayrulewidth
(EDITED to reflect arrayrulewidth
rather than fboxrule
, hat tip: David Carlisle).
documentclass[11pt,oneside]{article}
%usepackage{array}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
If one is concerned that this approach shrinks the height of the cell by -arrayrulewidth
, then just compensate by adding an extra arrayrulewidth
to the depth of the line before the shrunken \
. Compare the original box on the left with the revised on the right.
documentclass[11pt,oneside]{article}
%usepackage{array}
newcommandmystrut{rule[dimexpr-dpstrutbox-arrayrulewidth]{0pt}{%
dimexprbaselineskip+arrayrulewidth}}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\
cline{2-3}
end{tabular}%
%
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&dmystrut\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
This is clever, thank you! Doesn’t it shrink the height of cells, though? (I know it’s a PITA and I probably shouldn’t do this, but I like to control cell heights as much as TeX lets me.)
– triple_sec
10 hours ago
@triple_sec Please see my edit.
– Steven B. Segletes
10 hours ago
2
Fboxrule Is used for fbox not tables atrayrulewifth
– David Carlisle
9 hours ago
add a comment |
Don't know why it happens, but here's a fix...diminish the \
by arrayrulewidth
(EDITED to reflect arrayrulewidth
rather than fboxrule
, hat tip: David Carlisle).
documentclass[11pt,oneside]{article}
%usepackage{array}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
If one is concerned that this approach shrinks the height of the cell by -arrayrulewidth
, then just compensate by adding an extra arrayrulewidth
to the depth of the line before the shrunken \
. Compare the original box on the left with the revised on the right.
documentclass[11pt,oneside]{article}
%usepackage{array}
newcommandmystrut{rule[dimexpr-dpstrutbox-arrayrulewidth]{0pt}{%
dimexprbaselineskip+arrayrulewidth}}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\
cline{2-3}
end{tabular}%
%
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&dmystrut\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
This is clever, thank you! Doesn’t it shrink the height of cells, though? (I know it’s a PITA and I probably shouldn’t do this, but I like to control cell heights as much as TeX lets me.)
– triple_sec
10 hours ago
@triple_sec Please see my edit.
– Steven B. Segletes
10 hours ago
2
Fboxrule Is used for fbox not tables atrayrulewifth
– David Carlisle
9 hours ago
add a comment |
Don't know why it happens, but here's a fix...diminish the \
by arrayrulewidth
(EDITED to reflect arrayrulewidth
rather than fboxrule
, hat tip: David Carlisle).
documentclass[11pt,oneside]{article}
%usepackage{array}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
If one is concerned that this approach shrinks the height of the cell by -arrayrulewidth
, then just compensate by adding an extra arrayrulewidth
to the depth of the line before the shrunken \
. Compare the original box on the left with the revised on the right.
documentclass[11pt,oneside]{article}
%usepackage{array}
newcommandmystrut{rule[dimexpr-dpstrutbox-arrayrulewidth]{0pt}{%
dimexprbaselineskip+arrayrulewidth}}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\
cline{2-3}
end{tabular}%
%
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&dmystrut\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
Don't know why it happens, but here's a fix...diminish the \
by arrayrulewidth
(EDITED to reflect arrayrulewidth
rather than fboxrule
, hat tip: David Carlisle).
documentclass[11pt,oneside]{article}
%usepackage{array}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
If one is concerned that this approach shrinks the height of the cell by -arrayrulewidth
, then just compensate by adding an extra arrayrulewidth
to the depth of the line before the shrunken \
. Compare the original box on the left with the revised on the right.
documentclass[11pt,oneside]{article}
%usepackage{array}
newcommandmystrut{rule[dimexpr-dpstrutbox-arrayrulewidth]{0pt}{%
dimexprbaselineskip+arrayrulewidth}}
begin{document}
begin{table}
centering
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&d\
cline{2-3}
end{tabular}%
%
begin{tabular}{c|c|c|c}
cline{2-3}
a&b&c&dmystrut\[-arrayrulewidth]
cline{2-3}
end{tabular}
end{table}
end{document}
edited 9 hours ago
answered 11 hours ago
Steven B. SegletesSteven B. Segletes
169k9 gold badges214 silver badges441 bronze badges
169k9 gold badges214 silver badges441 bronze badges
This is clever, thank you! Doesn’t it shrink the height of cells, though? (I know it’s a PITA and I probably shouldn’t do this, but I like to control cell heights as much as TeX lets me.)
– triple_sec
10 hours ago
@triple_sec Please see my edit.
– Steven B. Segletes
10 hours ago
2
Fboxrule Is used for fbox not tables atrayrulewifth
– David Carlisle
9 hours ago
add a comment |
This is clever, thank you! Doesn’t it shrink the height of cells, though? (I know it’s a PITA and I probably shouldn’t do this, but I like to control cell heights as much as TeX lets me.)
– triple_sec
10 hours ago
@triple_sec Please see my edit.
– Steven B. Segletes
10 hours ago
2
Fboxrule Is used for fbox not tables atrayrulewifth
– David Carlisle
9 hours ago
This is clever, thank you! Doesn’t it shrink the height of cells, though? (I know it’s a PITA and I probably shouldn’t do this, but I like to control cell heights as much as TeX lets me.)
– triple_sec
10 hours ago
This is clever, thank you! Doesn’t it shrink the height of cells, though? (I know it’s a PITA and I probably shouldn’t do this, but I like to control cell heights as much as TeX lets me.)
– triple_sec
10 hours ago
@triple_sec Please see my edit.
– Steven B. Segletes
10 hours ago
@triple_sec Please see my edit.
– Steven B. Segletes
10 hours ago
2
2
Fboxrule Is used for fbox not tables atrayrulewifth
– David Carlisle
9 hours ago
Fboxrule Is used for fbox not tables atrayrulewifth
– David Carlisle
9 hours ago
add a comment |
triple_sec is a new contributor. Be nice, and check out our Code of Conduct.
triple_sec is a new contributor. Be nice, and check out our Code of Conduct.
triple_sec is a new contributor. Be nice, and check out our Code of Conduct.
triple_sec 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.
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%2f505789%2fweird-corners-with-cline%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
If it only partially works loading
array
, maybe this is due to ttheoneside
option the ‘article’? ;o)– Bernard
10 hours ago
@Bernard Nice catch! Alas, the output is the same upon taking out
oneside
.– triple_sec
9 hours ago
I just found funny that a one-side defect happened with the oneside option…
– Bernard
9 hours ago
@Bernard It would make sense, but it would also be a surprise if TeX were that predictable... :-)
– triple_sec
7 hours ago