Adding column to table in Latex and optimizing columns width
Clash Royale CLAN TAG#URR8PPP
Here is my table:
This is my code for it:
documentclass[smallextended]svjour3
usepackagetabularx, booktabs, makecell %
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
renewcommandthetablearabictable
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3, table-number-alignment=center, tight-spacing,% table-column-width =2.5cm
setlengthtabcolsep3pt
small
centering
sisetupdetect-weight,mode=text
renewrobustcmdbfseriesfontseriesbselectfont
renewrobustcmdboldmath
% abbreviation
newrobustcmdBbfseries
% shorten the intercolumn spaces
setlengthtabcolsep4pt
begintabularxlinewidthl>centeringXSSS
toprule
thead DDDDDD \ NNNNN & theadNo. of PPPPPP \ rrrrr & theadDelta CCCCC\ AAAA & theadEEEEEEEEEE\ ccc
& theadPPPPPP Alg\ccc \ [0.5ex]
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 \
POOO HHHH& AAAA to BBBB & 0.988 & B0.831 & B 0.831 \
POOO HHHH& CCCC to DDDD & 0.780 & B0.784 & B 0.754 \
CCCCCCC & AAAA to BBBB & 0.622 & 0.723 & B 0.735
\
CCCCCCC & CCCC to DDDD & 0.563 & B0.674 & 0.665
\
AAAAAA & AAAA to BBBB & 0.956 & B 0.957 & 0.956 \
AAAAAA & CCCC to DDDD & 0.949 & B0.955 & B 0.955 \
JJJJJ & RRRRR & 0.999 & B 1.000 & 0.999 \
JJJJJ & KKKKKK & 0.998 & B 0.999 & 0.998\
JJJJJ & HSDFFDSSDF & 0.627 & 0.638 & B 0.646 \
JJJJJ & HSDFFDSSDF & 0.647 & 0.653 & B 0.654 \ [1ex]
bottomrule
endtabularx
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
I would like to add at the end of the table
another column, with numbers. In addition, I would like to optimize the columns width so that the second column won't be so wide. How can I do it?
tables
add a comment |
Here is my table:
This is my code for it:
documentclass[smallextended]svjour3
usepackagetabularx, booktabs, makecell %
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
renewcommandthetablearabictable
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3, table-number-alignment=center, tight-spacing,% table-column-width =2.5cm
setlengthtabcolsep3pt
small
centering
sisetupdetect-weight,mode=text
renewrobustcmdbfseriesfontseriesbselectfont
renewrobustcmdboldmath
% abbreviation
newrobustcmdBbfseries
% shorten the intercolumn spaces
setlengthtabcolsep4pt
begintabularxlinewidthl>centeringXSSS
toprule
thead DDDDDD \ NNNNN & theadNo. of PPPPPP \ rrrrr & theadDelta CCCCC\ AAAA & theadEEEEEEEEEE\ ccc
& theadPPPPPP Alg\ccc \ [0.5ex]
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 \
POOO HHHH& AAAA to BBBB & 0.988 & B0.831 & B 0.831 \
POOO HHHH& CCCC to DDDD & 0.780 & B0.784 & B 0.754 \
CCCCCCC & AAAA to BBBB & 0.622 & 0.723 & B 0.735
\
CCCCCCC & CCCC to DDDD & 0.563 & B0.674 & 0.665
\
AAAAAA & AAAA to BBBB & 0.956 & B 0.957 & 0.956 \
AAAAAA & CCCC to DDDD & 0.949 & B0.955 & B 0.955 \
JJJJJ & RRRRR & 0.999 & B 1.000 & 0.999 \
JJJJJ & KKKKKK & 0.998 & B 0.999 & 0.998\
JJJJJ & HSDFFDSSDF & 0.627 & 0.638 & B 0.646 \
JJJJJ & HSDFFDSSDF & 0.647 & 0.653 & B 0.654 \ [1ex]
bottomrule
endtabularx
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
I would like to add at the end of the table
another column, with numbers. In addition, I would like to optimize the columns width so that the second column won't be so wide. How can I do it?
tables
1
please, extend your code snippet to complete small document with your table. information contained in your document preamble are important for helping you. added one more column: just write it where you like to ad (& ...
)
– Zarko
Feb 18 at 14:52
in your mwe are still missing some packages ... where you like to ad new column? after last in temporary table?
– Zarko
Feb 18 at 15:01
add a comment |
Here is my table:
This is my code for it:
documentclass[smallextended]svjour3
usepackagetabularx, booktabs, makecell %
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
renewcommandthetablearabictable
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3, table-number-alignment=center, tight-spacing,% table-column-width =2.5cm
setlengthtabcolsep3pt
small
centering
sisetupdetect-weight,mode=text
renewrobustcmdbfseriesfontseriesbselectfont
renewrobustcmdboldmath
% abbreviation
newrobustcmdBbfseries
% shorten the intercolumn spaces
setlengthtabcolsep4pt
begintabularxlinewidthl>centeringXSSS
toprule
thead DDDDDD \ NNNNN & theadNo. of PPPPPP \ rrrrr & theadDelta CCCCC\ AAAA & theadEEEEEEEEEE\ ccc
& theadPPPPPP Alg\ccc \ [0.5ex]
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 \
POOO HHHH& AAAA to BBBB & 0.988 & B0.831 & B 0.831 \
POOO HHHH& CCCC to DDDD & 0.780 & B0.784 & B 0.754 \
CCCCCCC & AAAA to BBBB & 0.622 & 0.723 & B 0.735
\
CCCCCCC & CCCC to DDDD & 0.563 & B0.674 & 0.665
\
AAAAAA & AAAA to BBBB & 0.956 & B 0.957 & 0.956 \
AAAAAA & CCCC to DDDD & 0.949 & B0.955 & B 0.955 \
JJJJJ & RRRRR & 0.999 & B 1.000 & 0.999 \
JJJJJ & KKKKKK & 0.998 & B 0.999 & 0.998\
JJJJJ & HSDFFDSSDF & 0.627 & 0.638 & B 0.646 \
JJJJJ & HSDFFDSSDF & 0.647 & 0.653 & B 0.654 \ [1ex]
bottomrule
endtabularx
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
I would like to add at the end of the table
another column, with numbers. In addition, I would like to optimize the columns width so that the second column won't be so wide. How can I do it?
tables
Here is my table:
This is my code for it:
documentclass[smallextended]svjour3
usepackagetabularx, booktabs, makecell %
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
renewcommandthetablearabictable
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3, table-number-alignment=center, tight-spacing,% table-column-width =2.5cm
setlengthtabcolsep3pt
small
centering
sisetupdetect-weight,mode=text
renewrobustcmdbfseriesfontseriesbselectfont
renewrobustcmdboldmath
% abbreviation
newrobustcmdBbfseries
% shorten the intercolumn spaces
setlengthtabcolsep4pt
begintabularxlinewidthl>centeringXSSS
toprule
thead DDDDDD \ NNNNN & theadNo. of PPPPPP \ rrrrr & theadDelta CCCCC\ AAAA & theadEEEEEEEEEE\ ccc
& theadPPPPPP Alg\ccc \ [0.5ex]
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 \
POOO HHHH& AAAA to BBBB & 0.988 & B0.831 & B 0.831 \
POOO HHHH& CCCC to DDDD & 0.780 & B0.784 & B 0.754 \
CCCCCCC & AAAA to BBBB & 0.622 & 0.723 & B 0.735
\
CCCCCCC & CCCC to DDDD & 0.563 & B0.674 & 0.665
\
AAAAAA & AAAA to BBBB & 0.956 & B 0.957 & 0.956 \
AAAAAA & CCCC to DDDD & 0.949 & B0.955 & B 0.955 \
JJJJJ & RRRRR & 0.999 & B 1.000 & 0.999 \
JJJJJ & KKKKKK & 0.998 & B 0.999 & 0.998\
JJJJJ & HSDFFDSSDF & 0.627 & 0.638 & B 0.646 \
JJJJJ & HSDFFDSSDF & 0.647 & 0.653 & B 0.654 \ [1ex]
bottomrule
endtabularx
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
I would like to add at the end of the table
another column, with numbers. In addition, I would like to optimize the columns width so that the second column won't be so wide. How can I do it?
tables
tables
edited Feb 18 at 14:57
Avi
asked Feb 18 at 14:49
AviAvi
357514
357514
1
please, extend your code snippet to complete small document with your table. information contained in your document preamble are important for helping you. added one more column: just write it where you like to ad (& ...
)
– Zarko
Feb 18 at 14:52
in your mwe are still missing some packages ... where you like to ad new column? after last in temporary table?
– Zarko
Feb 18 at 15:01
add a comment |
1
please, extend your code snippet to complete small document with your table. information contained in your document preamble are important for helping you. added one more column: just write it where you like to ad (& ...
)
– Zarko
Feb 18 at 14:52
in your mwe are still missing some packages ... where you like to ad new column? after last in temporary table?
– Zarko
Feb 18 at 15:01
1
1
please, extend your code snippet to complete small document with your table. information contained in your document preamble are important for helping you. added one more column: just write it where you like to ad (
& ...
)– Zarko
Feb 18 at 14:52
please, extend your code snippet to complete small document with your table. information contained in your document preamble are important for helping you. added one more column: just write it where you like to ad (
& ...
)– Zarko
Feb 18 at 14:52
in your mwe are still missing some packages ... where you like to ad new column? after last in temporary table?
– Zarko
Feb 18 at 15:01
in your mwe are still missing some packages ... where you like to ad new column? after last in temporary table?
– Zarko
Feb 18 at 15:01
add a comment |
2 Answers
2
active
oldest
votes
By using a tabularx
and only having one X
column, which is allowed to stretch, this column is forced to be very wide. If it should have its natural width, use a normal tabular
instead.
For adding an additional column with numbers, add one S
column and add them at the end of each line with & <number>
documentclass[smallextended]svjour3
usepackagetabularx, booktabs, makecell %
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackageetoolbox
renewcommandthetablearabictable
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3, table-number-alignment=center, tight-spacing,% table-column-width =2.5cm
setlengthtabcolsep3pt
small
centering
sisetupdetect-weight,mode=text
renewrobustcmdbfseriesfontseriesbselectfont
renewrobustcmdboldmath
% abbreviation
newrobustcmdBbfseries
% shorten the intercolumn spaces
setlengthtabcolsep4pt
begintabularl>centeringlSSSS
toprule
thead DDDDDD \ NNNNN & theadNo. of PPPPPP \ rrrrr & theadDelta CCCCC\ AAAA & theadEEEEEEEEEE\ ccc
& theadPPPPPP Alg\ccc & theadfoo \ [0.5ex]
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 0.780 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 0.780\
POOO HHHH& AAAA to BBBB & 0.988 & B0.831 & B 0.831 & 0.780 \
POOO HHHH& CCCC to DDDD & 0.780 & B0.784 & B 0.754& 0.780 \
CCCCCCC & AAAA to BBBB & 0.622 & 0.723 & B 0.735
& 0.780 \
CCCCCCC & CCCC to DDDD & 0.563 & B0.674 & 0.665
& 0.780 \
AAAAAA & AAAA to BBBB & 0.956 & B 0.957 & 0.956 & 0.780\
AAAAAA & CCCC to DDDD & 0.949 & B0.955 & B 0.955 & 0.780\
JJJJJ & RRRRR & 0.999 & B 1.000 & 0.999 & 0.780\
JJJJJ & KKKKKK & 0.998 & B 0.999 & 0.998& 0.780\
JJJJJ & HSDFFDSSDF & 0.627 & 0.638 & B 0.646 & 0.780\
JJJJJ & HSDFFDSSDF & 0.647 & 0.653 & B 0.654& 0.780 \ [1ex]
bottomrule
endtabular
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
add a comment |
documentclass[smallextended]svjour3
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackagebooktabs, makecell, tabularx
newcommandmcx[1]multicolumn1>centeringarraybackslashX#1
usepackageetoolbox
renewrobustcmdbfseriesfontseriesbselectfont
newrobustcmdBbfseries
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3,
detect-weight,
mode=text
centering
begintabularxlinewidthll SS SS
toprule
mcxDDDDDDnewline NNNNN
& mcxNo. of PPPPPP newline rrrrr
& mcxDelta CCCCCnewline AAAA
& mcxEEEEEEEEEEnewline ccc
& mcxPPPPPP Algnewline ccc
& mcxhere isnewline new column
\
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 1.234 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 5.678 \
bottomrule
endtabularx
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
(red lines indicate page layout)
above mwe provide equal widths of columns. since real content c cells and cells heads are unknown, this might not be the best choice. let me know. beside this, i move newcommand
s to document preamble and remove superfluous sisetup
and preserve tabularx
table environment.
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%2f475506%2fadding-column-to-table-in-latex-and-optimizing-columns-width%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
By using a tabularx
and only having one X
column, which is allowed to stretch, this column is forced to be very wide. If it should have its natural width, use a normal tabular
instead.
For adding an additional column with numbers, add one S
column and add them at the end of each line with & <number>
documentclass[smallextended]svjour3
usepackagetabularx, booktabs, makecell %
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackageetoolbox
renewcommandthetablearabictable
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3, table-number-alignment=center, tight-spacing,% table-column-width =2.5cm
setlengthtabcolsep3pt
small
centering
sisetupdetect-weight,mode=text
renewrobustcmdbfseriesfontseriesbselectfont
renewrobustcmdboldmath
% abbreviation
newrobustcmdBbfseries
% shorten the intercolumn spaces
setlengthtabcolsep4pt
begintabularl>centeringlSSSS
toprule
thead DDDDDD \ NNNNN & theadNo. of PPPPPP \ rrrrr & theadDelta CCCCC\ AAAA & theadEEEEEEEEEE\ ccc
& theadPPPPPP Alg\ccc & theadfoo \ [0.5ex]
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 0.780 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 0.780\
POOO HHHH& AAAA to BBBB & 0.988 & B0.831 & B 0.831 & 0.780 \
POOO HHHH& CCCC to DDDD & 0.780 & B0.784 & B 0.754& 0.780 \
CCCCCCC & AAAA to BBBB & 0.622 & 0.723 & B 0.735
& 0.780 \
CCCCCCC & CCCC to DDDD & 0.563 & B0.674 & 0.665
& 0.780 \
AAAAAA & AAAA to BBBB & 0.956 & B 0.957 & 0.956 & 0.780\
AAAAAA & CCCC to DDDD & 0.949 & B0.955 & B 0.955 & 0.780\
JJJJJ & RRRRR & 0.999 & B 1.000 & 0.999 & 0.780\
JJJJJ & KKKKKK & 0.998 & B 0.999 & 0.998& 0.780\
JJJJJ & HSDFFDSSDF & 0.627 & 0.638 & B 0.646 & 0.780\
JJJJJ & HSDFFDSSDF & 0.647 & 0.653 & B 0.654& 0.780 \ [1ex]
bottomrule
endtabular
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
add a comment |
By using a tabularx
and only having one X
column, which is allowed to stretch, this column is forced to be very wide. If it should have its natural width, use a normal tabular
instead.
For adding an additional column with numbers, add one S
column and add them at the end of each line with & <number>
documentclass[smallextended]svjour3
usepackagetabularx, booktabs, makecell %
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackageetoolbox
renewcommandthetablearabictable
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3, table-number-alignment=center, tight-spacing,% table-column-width =2.5cm
setlengthtabcolsep3pt
small
centering
sisetupdetect-weight,mode=text
renewrobustcmdbfseriesfontseriesbselectfont
renewrobustcmdboldmath
% abbreviation
newrobustcmdBbfseries
% shorten the intercolumn spaces
setlengthtabcolsep4pt
begintabularl>centeringlSSSS
toprule
thead DDDDDD \ NNNNN & theadNo. of PPPPPP \ rrrrr & theadDelta CCCCC\ AAAA & theadEEEEEEEEEE\ ccc
& theadPPPPPP Alg\ccc & theadfoo \ [0.5ex]
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 0.780 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 0.780\
POOO HHHH& AAAA to BBBB & 0.988 & B0.831 & B 0.831 & 0.780 \
POOO HHHH& CCCC to DDDD & 0.780 & B0.784 & B 0.754& 0.780 \
CCCCCCC & AAAA to BBBB & 0.622 & 0.723 & B 0.735
& 0.780 \
CCCCCCC & CCCC to DDDD & 0.563 & B0.674 & 0.665
& 0.780 \
AAAAAA & AAAA to BBBB & 0.956 & B 0.957 & 0.956 & 0.780\
AAAAAA & CCCC to DDDD & 0.949 & B0.955 & B 0.955 & 0.780\
JJJJJ & RRRRR & 0.999 & B 1.000 & 0.999 & 0.780\
JJJJJ & KKKKKK & 0.998 & B 0.999 & 0.998& 0.780\
JJJJJ & HSDFFDSSDF & 0.627 & 0.638 & B 0.646 & 0.780\
JJJJJ & HSDFFDSSDF & 0.647 & 0.653 & B 0.654& 0.780 \ [1ex]
bottomrule
endtabular
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
add a comment |
By using a tabularx
and only having one X
column, which is allowed to stretch, this column is forced to be very wide. If it should have its natural width, use a normal tabular
instead.
For adding an additional column with numbers, add one S
column and add them at the end of each line with & <number>
documentclass[smallextended]svjour3
usepackagetabularx, booktabs, makecell %
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackageetoolbox
renewcommandthetablearabictable
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3, table-number-alignment=center, tight-spacing,% table-column-width =2.5cm
setlengthtabcolsep3pt
small
centering
sisetupdetect-weight,mode=text
renewrobustcmdbfseriesfontseriesbselectfont
renewrobustcmdboldmath
% abbreviation
newrobustcmdBbfseries
% shorten the intercolumn spaces
setlengthtabcolsep4pt
begintabularl>centeringlSSSS
toprule
thead DDDDDD \ NNNNN & theadNo. of PPPPPP \ rrrrr & theadDelta CCCCC\ AAAA & theadEEEEEEEEEE\ ccc
& theadPPPPPP Alg\ccc & theadfoo \ [0.5ex]
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 0.780 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 0.780\
POOO HHHH& AAAA to BBBB & 0.988 & B0.831 & B 0.831 & 0.780 \
POOO HHHH& CCCC to DDDD & 0.780 & B0.784 & B 0.754& 0.780 \
CCCCCCC & AAAA to BBBB & 0.622 & 0.723 & B 0.735
& 0.780 \
CCCCCCC & CCCC to DDDD & 0.563 & B0.674 & 0.665
& 0.780 \
AAAAAA & AAAA to BBBB & 0.956 & B 0.957 & 0.956 & 0.780\
AAAAAA & CCCC to DDDD & 0.949 & B0.955 & B 0.955 & 0.780\
JJJJJ & RRRRR & 0.999 & B 1.000 & 0.999 & 0.780\
JJJJJ & KKKKKK & 0.998 & B 0.999 & 0.998& 0.780\
JJJJJ & HSDFFDSSDF & 0.627 & 0.638 & B 0.646 & 0.780\
JJJJJ & HSDFFDSSDF & 0.647 & 0.653 & B 0.654& 0.780 \ [1ex]
bottomrule
endtabular
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
By using a tabularx
and only having one X
column, which is allowed to stretch, this column is forced to be very wide. If it should have its natural width, use a normal tabular
instead.
For adding an additional column with numbers, add one S
column and add them at the end of each line with & <number>
documentclass[smallextended]svjour3
usepackagetabularx, booktabs, makecell %
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackageetoolbox
renewcommandthetablearabictable
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3, table-number-alignment=center, tight-spacing,% table-column-width =2.5cm
setlengthtabcolsep3pt
small
centering
sisetupdetect-weight,mode=text
renewrobustcmdbfseriesfontseriesbselectfont
renewrobustcmdboldmath
% abbreviation
newrobustcmdBbfseries
% shorten the intercolumn spaces
setlengthtabcolsep4pt
begintabularl>centeringlSSSS
toprule
thead DDDDDD \ NNNNN & theadNo. of PPPPPP \ rrrrr & theadDelta CCCCC\ AAAA & theadEEEEEEEEEE\ ccc
& theadPPPPPP Alg\ccc & theadfoo \ [0.5ex]
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 0.780 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 0.780\
POOO HHHH& AAAA to BBBB & 0.988 & B0.831 & B 0.831 & 0.780 \
POOO HHHH& CCCC to DDDD & 0.780 & B0.784 & B 0.754& 0.780 \
CCCCCCC & AAAA to BBBB & 0.622 & 0.723 & B 0.735
& 0.780 \
CCCCCCC & CCCC to DDDD & 0.563 & B0.674 & 0.665
& 0.780 \
AAAAAA & AAAA to BBBB & 0.956 & B 0.957 & 0.956 & 0.780\
AAAAAA & CCCC to DDDD & 0.949 & B0.955 & B 0.955 & 0.780\
JJJJJ & RRRRR & 0.999 & B 1.000 & 0.999 & 0.780\
JJJJJ & KKKKKK & 0.998 & B 0.999 & 0.998& 0.780\
JJJJJ & HSDFFDSSDF & 0.627 & 0.638 & B 0.646 & 0.780\
JJJJJ & HSDFFDSSDF & 0.647 & 0.653 & B 0.654& 0.780 \ [1ex]
bottomrule
endtabular
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
edited Feb 18 at 15:30
answered Feb 18 at 15:24
user181777user181777
1085
1085
add a comment |
add a comment |
documentclass[smallextended]svjour3
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackagebooktabs, makecell, tabularx
newcommandmcx[1]multicolumn1>centeringarraybackslashX#1
usepackageetoolbox
renewrobustcmdbfseriesfontseriesbselectfont
newrobustcmdBbfseries
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3,
detect-weight,
mode=text
centering
begintabularxlinewidthll SS SS
toprule
mcxDDDDDDnewline NNNNN
& mcxNo. of PPPPPP newline rrrrr
& mcxDelta CCCCCnewline AAAA
& mcxEEEEEEEEEEnewline ccc
& mcxPPPPPP Algnewline ccc
& mcxhere isnewline new column
\
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 1.234 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 5.678 \
bottomrule
endtabularx
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
(red lines indicate page layout)
above mwe provide equal widths of columns. since real content c cells and cells heads are unknown, this might not be the best choice. let me know. beside this, i move newcommand
s to document preamble and remove superfluous sisetup
and preserve tabularx
table environment.
add a comment |
documentclass[smallextended]svjour3
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackagebooktabs, makecell, tabularx
newcommandmcx[1]multicolumn1>centeringarraybackslashX#1
usepackageetoolbox
renewrobustcmdbfseriesfontseriesbselectfont
newrobustcmdBbfseries
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3,
detect-weight,
mode=text
centering
begintabularxlinewidthll SS SS
toprule
mcxDDDDDDnewline NNNNN
& mcxNo. of PPPPPP newline rrrrr
& mcxDelta CCCCCnewline AAAA
& mcxEEEEEEEEEEnewline ccc
& mcxPPPPPP Algnewline ccc
& mcxhere isnewline new column
\
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 1.234 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 5.678 \
bottomrule
endtabularx
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
(red lines indicate page layout)
above mwe provide equal widths of columns. since real content c cells and cells heads are unknown, this might not be the best choice. let me know. beside this, i move newcommand
s to document preamble and remove superfluous sisetup
and preserve tabularx
table environment.
add a comment |
documentclass[smallextended]svjour3
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackagebooktabs, makecell, tabularx
newcommandmcx[1]multicolumn1>centeringarraybackslashX#1
usepackageetoolbox
renewrobustcmdbfseriesfontseriesbselectfont
newrobustcmdBbfseries
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3,
detect-weight,
mode=text
centering
begintabularxlinewidthll SS SS
toprule
mcxDDDDDDnewline NNNNN
& mcxNo. of PPPPPP newline rrrrr
& mcxDelta CCCCCnewline AAAA
& mcxEEEEEEEEEEnewline ccc
& mcxPPPPPP Algnewline ccc
& mcxhere isnewline new column
\
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 1.234 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 5.678 \
bottomrule
endtabularx
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
(red lines indicate page layout)
above mwe provide equal widths of columns. since real content c cells and cells heads are unknown, this might not be the best choice. let me know. beside this, i move newcommand
s to document preamble and remove superfluous sisetup
and preserve tabularx
table environment.
documentclass[smallextended]svjour3
usepackage[a4paper,margin=1in,footskip=0.25in]geometry
usepackagesiunitx
usepackagebooktabs, makecell, tabularx
newcommandmcx[1]multicolumn1>centeringarraybackslashX#1
usepackageetoolbox
renewrobustcmdbfseriesfontseriesbselectfont
newrobustcmdBbfseries
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[!htb]
centering
sisetuptable-format=1.3,
detect-weight,
mode=text
centering
begintabularxlinewidthll SS SS
toprule
mcxDDDDDDnewline NNNNN
& mcxNo. of PPPPPP newline rrrrr
& mcxDelta CCCCCnewline AAAA
& mcxEEEEEEEEEEnewline ccc
& mcxPPPPPP Algnewline ccc
& mcxhere isnewline new column
\
midrule
POOO HHHH & AAAA to BBBB & 0.524 & 0.546 & B 0.547 & 1.234 \
POOO HHHH & CCCC to DDDD & 0.554 & B 0.546 & B 0.546 & 5.678 \
bottomrule
endtabularx
% endtabular
captionComparison between aaaaa to bbbbb (In textbfBold the most accurate per line)
labeltable:2
endtable
enddocument
(red lines indicate page layout)
above mwe provide equal widths of columns. since real content c cells and cells heads are unknown, this might not be the best choice. let me know. beside this, i move newcommand
s to document preamble and remove superfluous sisetup
and preserve tabularx
table environment.
edited Feb 18 at 16:15
answered Feb 18 at 15:26
ZarkoZarko
127k868166
127k868166
add a comment |
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%2f475506%2fadding-column-to-table-in-latex-and-optimizing-columns-width%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
1
please, extend your code snippet to complete small document with your table. information contained in your document preamble are important for helping you. added one more column: just write it where you like to ad (
& ...
)– Zarko
Feb 18 at 14:52
in your mwe are still missing some packages ... where you like to ad new column? after last in temporary table?
– Zarko
Feb 18 at 15:01