Hline length not filling width of the table
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I used siunitx
package to align numbers as suggested here.
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=8.2]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & text87/100 \
hline
endtabular
enddocument
However, the hline
s do not go well with this I guess:
How do I fix this? Also, how do center align 87/100
or anything that's not a number?
Update : After @egreg 's comment, I noticed that changing table-format=8.2
to table-format=8.6
or table-format=x.6
(telling it to expect 6 digits after the decimal and x before it), hline alignment is gone :) Thanks.
I still have centering the text issue :/
tables hhline
add a comment |Â
up vote
4
down vote
favorite
I used siunitx
package to align numbers as suggested here.
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=8.2]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & text87/100 \
hline
endtabular
enddocument
However, the hline
s do not go well with this I guess:
How do I fix this? Also, how do center align 87/100
or anything that's not a number?
Update : After @egreg 's comment, I noticed that changing table-format=8.2
to table-format=8.6
or table-format=x.6
(telling it to expect 6 digits after the decimal and x before it), hline alignment is gone :) Thanks.
I still have centering the text issue :/
tables hhline
Could you please add a compilable MWE?
â sporc
Aug 15 at 9:37
4
Well, you're asking to reserve space for three digits in the integral part and two for the fractional part, but then use six for the latter.
â egreg
Aug 15 at 9:41
@sporc updated the code
â Saravanabalagi Ramachandran
Aug 15 at 9:43
@egreg gotcha, thanks :)
â Saravanabalagi Ramachandran
Aug 15 at 9:51
If you want the text to be centered just changer
toc
:begintabularcS[table-format=8.2]
â sporc
Aug 15 at 10:13
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I used siunitx
package to align numbers as suggested here.
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=8.2]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & text87/100 \
hline
endtabular
enddocument
However, the hline
s do not go well with this I guess:
How do I fix this? Also, how do center align 87/100
or anything that's not a number?
Update : After @egreg 's comment, I noticed that changing table-format=8.2
to table-format=8.6
or table-format=x.6
(telling it to expect 6 digits after the decimal and x before it), hline alignment is gone :) Thanks.
I still have centering the text issue :/
tables hhline
I used siunitx
package to align numbers as suggested here.
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=8.2]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & text87/100 \
hline
endtabular
enddocument
However, the hline
s do not go well with this I guess:
How do I fix this? Also, how do center align 87/100
or anything that's not a number?
Update : After @egreg 's comment, I noticed that changing table-format=8.2
to table-format=8.6
or table-format=x.6
(telling it to expect 6 digits after the decimal and x before it), hline alignment is gone :) Thanks.
I still have centering the text issue :/
tables hhline
tables hhline
edited Aug 15 at 9:54
asked Aug 15 at 9:35
Saravanabalagi Ramachandran
1235
1235
Could you please add a compilable MWE?
â sporc
Aug 15 at 9:37
4
Well, you're asking to reserve space for three digits in the integral part and two for the fractional part, but then use six for the latter.
â egreg
Aug 15 at 9:41
@sporc updated the code
â Saravanabalagi Ramachandran
Aug 15 at 9:43
@egreg gotcha, thanks :)
â Saravanabalagi Ramachandran
Aug 15 at 9:51
If you want the text to be centered just changer
toc
:begintabularcS[table-format=8.2]
â sporc
Aug 15 at 10:13
add a comment |Â
Could you please add a compilable MWE?
â sporc
Aug 15 at 9:37
4
Well, you're asking to reserve space for three digits in the integral part and two for the fractional part, but then use six for the latter.
â egreg
Aug 15 at 9:41
@sporc updated the code
â Saravanabalagi Ramachandran
Aug 15 at 9:43
@egreg gotcha, thanks :)
â Saravanabalagi Ramachandran
Aug 15 at 9:51
If you want the text to be centered just changer
toc
:begintabularcS[table-format=8.2]
â sporc
Aug 15 at 10:13
Could you please add a compilable MWE?
â sporc
Aug 15 at 9:37
Could you please add a compilable MWE?
â sporc
Aug 15 at 9:37
4
4
Well, you're asking to reserve space for three digits in the integral part and two for the fractional part, but then use six for the latter.
â egreg
Aug 15 at 9:41
Well, you're asking to reserve space for three digits in the integral part and two for the fractional part, but then use six for the latter.
â egreg
Aug 15 at 9:41
@sporc updated the code
â Saravanabalagi Ramachandran
Aug 15 at 9:43
@sporc updated the code
â Saravanabalagi Ramachandran
Aug 15 at 9:43
@egreg gotcha, thanks :)
â Saravanabalagi Ramachandran
Aug 15 at 9:51
@egreg gotcha, thanks :)
â Saravanabalagi Ramachandran
Aug 15 at 9:51
If you want the text to be centered just change
r
to c
: begintabularcS[table-format=8.2]
â sporc
Aug 15 at 10:13
If you want the text to be centered just change
r
to c
: begintabularcS[table-format=8.2]
â sporc
Aug 15 at 10:13
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
You can center align the column by inserting a multicolumn
command.
Changing the format specifier to table-format=8.6
resolves the problem with the hline
lenght:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=8.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
Better spacing
Changing the format specifier to table-format=2.6
removes unnecessary white space. Adding renewcommandarraystretch1.3
adds some more spacing between the row of the table:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
begindocument
% for spacing in the table
renewcommandarraystretch1.3
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
Why using8.6
?2.6
should be enough. You get a lot of unnecessary white space
â sporc
Aug 15 at 9:58
@sporc In a heat wave, Tom likes white space resembling an area covered with snow. ;-)
â Przemysà Âaw Scherwentke
Aug 15 at 10:04
I did not want to change more than neccessary. Sure, it may not look very nice. But then, I also think that the line spacing is not 'nice' and I didn't change it either. But I can change it.
â Tom
Aug 15 at 10:09
add a comment |Â
up vote
3
down vote
With table-format=8.2
you reserve space for 8 digits before the dot and 2 after the dot, you need to change it to table-format=2.8
, but for your given numbers 2.6
is enough
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & text87/100 \
hline
endtabular
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
You can center align the column by inserting a multicolumn
command.
Changing the format specifier to table-format=8.6
resolves the problem with the hline
lenght:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=8.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
Better spacing
Changing the format specifier to table-format=2.6
removes unnecessary white space. Adding renewcommandarraystretch1.3
adds some more spacing between the row of the table:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
begindocument
% for spacing in the table
renewcommandarraystretch1.3
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
Why using8.6
?2.6
should be enough. You get a lot of unnecessary white space
â sporc
Aug 15 at 9:58
@sporc In a heat wave, Tom likes white space resembling an area covered with snow. ;-)
â Przemysà Âaw Scherwentke
Aug 15 at 10:04
I did not want to change more than neccessary. Sure, it may not look very nice. But then, I also think that the line spacing is not 'nice' and I didn't change it either. But I can change it.
â Tom
Aug 15 at 10:09
add a comment |Â
up vote
4
down vote
accepted
You can center align the column by inserting a multicolumn
command.
Changing the format specifier to table-format=8.6
resolves the problem with the hline
lenght:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=8.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
Better spacing
Changing the format specifier to table-format=2.6
removes unnecessary white space. Adding renewcommandarraystretch1.3
adds some more spacing between the row of the table:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
begindocument
% for spacing in the table
renewcommandarraystretch1.3
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
Why using8.6
?2.6
should be enough. You get a lot of unnecessary white space
â sporc
Aug 15 at 9:58
@sporc In a heat wave, Tom likes white space resembling an area covered with snow. ;-)
â Przemysà Âaw Scherwentke
Aug 15 at 10:04
I did not want to change more than neccessary. Sure, it may not look very nice. But then, I also think that the line spacing is not 'nice' and I didn't change it either. But I can change it.
â Tom
Aug 15 at 10:09
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
You can center align the column by inserting a multicolumn
command.
Changing the format specifier to table-format=8.6
resolves the problem with the hline
lenght:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=8.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
Better spacing
Changing the format specifier to table-format=2.6
removes unnecessary white space. Adding renewcommandarraystretch1.3
adds some more spacing between the row of the table:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
begindocument
% for spacing in the table
renewcommandarraystretch1.3
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
You can center align the column by inserting a multicolumn
command.
Changing the format specifier to table-format=8.6
resolves the problem with the hline
lenght:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=8.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
Better spacing
Changing the format specifier to table-format=2.6
removes unnecessary white space. Adding renewcommandarraystretch1.3
adds some more spacing between the row of the table:
MWE:
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
begindocument
% for spacing in the table
renewcommandarraystretch1.3
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & 87/100 \
hline
endtabular
enddocument
edited Aug 15 at 11:26
answered Aug 15 at 9:52
Tom
906115
906115
Why using8.6
?2.6
should be enough. You get a lot of unnecessary white space
â sporc
Aug 15 at 9:58
@sporc In a heat wave, Tom likes white space resembling an area covered with snow. ;-)
â Przemysà Âaw Scherwentke
Aug 15 at 10:04
I did not want to change more than neccessary. Sure, it may not look very nice. But then, I also think that the line spacing is not 'nice' and I didn't change it either. But I can change it.
â Tom
Aug 15 at 10:09
add a comment |Â
Why using8.6
?2.6
should be enough. You get a lot of unnecessary white space
â sporc
Aug 15 at 9:58
@sporc In a heat wave, Tom likes white space resembling an area covered with snow. ;-)
â Przemysà Âaw Scherwentke
Aug 15 at 10:04
I did not want to change more than neccessary. Sure, it may not look very nice. But then, I also think that the line spacing is not 'nice' and I didn't change it either. But I can change it.
â Tom
Aug 15 at 10:09
Why using
8.6
? 2.6
should be enough. You get a lot of unnecessary white spaceâ sporc
Aug 15 at 9:58
Why using
8.6
? 2.6
should be enough. You get a lot of unnecessary white spaceâ sporc
Aug 15 at 9:58
@sporc In a heat wave, Tom likes white space resembling an area covered with snow. ;-)
â Przemysà Âaw Scherwentke
Aug 15 at 10:04
@sporc In a heat wave, Tom likes white space resembling an area covered with snow. ;-)
â Przemysà Âaw Scherwentke
Aug 15 at 10:04
I did not want to change more than neccessary. Sure, it may not look very nice. But then, I also think that the line spacing is not 'nice' and I didn't change it either. But I can change it.
â Tom
Aug 15 at 10:09
I did not want to change more than neccessary. Sure, it may not look very nice. But then, I also think that the line spacing is not 'nice' and I didn't change it either. But I can change it.
â Tom
Aug 15 at 10:09
add a comment |Â
up vote
3
down vote
With table-format=8.2
you reserve space for 8 digits before the dot and 2 after the dot, you need to change it to table-format=2.8
, but for your given numbers 2.6
is enough
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & text87/100 \
hline
endtabular
enddocument
add a comment |Â
up vote
3
down vote
With table-format=8.2
you reserve space for 8 digits before the dot and 2 after the dot, you need to change it to table-format=2.8
, but for your given numbers 2.6
is enough
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & text87/100 \
hline
endtabular
enddocument
add a comment |Â
up vote
3
down vote
up vote
3
down vote
With table-format=8.2
you reserve space for 8 digits before the dot and 2 after the dot, you need to change it to table-format=2.8
, but for your given numbers 2.6
is enough
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & text87/100 \
hline
endtabular
enddocument
With table-format=8.2
you reserve space for 8 digits before the dot and 2 after the dot, you need to change it to table-format=2.8
, but for your given numbers 2.6
is enough
documentclassarticle
usepackage[utf8]inputenc
usepackagesiunitx
titleTest
dateAugust 2018
begindocument
maketitle
sectionIntroduction
begintabularrS[table-format=2.6]
hline
True sigma used & 9.117647 \
True pixel value & 67.000000 \
hline
Pixel Value & 67.025372 \
Error & 0.025372 \
Squared Error & 0.000643 \
Predicted Sigma & 8.787887 \
Iteration Number & text87/100 \
hline
endtabular
enddocument
answered Aug 15 at 9:53
sporc
473214
473214
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f446105%2fhline-length-not-filling-width-of-the-table%23new-answer', 'question_page');
);
Post as a guest
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
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
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
Could you please add a compilable MWE?
â sporc
Aug 15 at 9:37
4
Well, you're asking to reserve space for three digits in the integral part and two for the fractional part, but then use six for the latter.
â egreg
Aug 15 at 9:41
@sporc updated the code
â Saravanabalagi Ramachandran
Aug 15 at 9:43
@egreg gotcha, thanks :)
â Saravanabalagi Ramachandran
Aug 15 at 9:51
If you want the text to be centered just change
r
toc
:begintabularcS[table-format=8.2]
â sporc
Aug 15 at 10:13