Make table page size [duplicate]












2
















This question already has an answer here:




  • My table doesn't fit; what are my options?

    1 answer




I am new to latex and cannot solve to fit this table to page size even though I looked up the problem in the forum. Any help would be very much appreciated.



    documentclass[11pt]{article}
usepackage[utf8]{inputenc}
usepackage[scaled]{helvet}
usepackage[table]{xcolor}
renewcommandfamilydefault{sfdefault}
usepackage[T1]{fontenc}
thispagestyle{empty}
usepackage[margin=0.7in]{geometry}
begin{document}
rowcolors{2}{gray!25}{white} % for alt row cols
begin{table}[ht]
centering
makebox[linewidth]{
begin{tabular}{lllllll}
rowcolor{gray!50} %for alt row cols
hline
& Overall & None (N) & Mild (M) & Moderate (M) & Severe (S) \
& Mean% (SE) (95% CI)&Mean% (SE) (95% CI)& Mean% (SE) (95% CI)&Mean% (SE) (95% CI) & Mean% (SE) (95% CI) \
hline
textbf{XXXXXX}& 65 (61 - 69) & 20 (17 - 23)& 8 (6 - 10) & 7 (5 - 9) & \
textbf{XXXXXXX} (XXXX-XXX)& 42 (34 - 51) & 23 (15 - 30) & 17 (10 - 24) & 18 (11 - 25) & \
textbf{XXXXXXX} (XXXX-XXXX)& 62 (53 - 70) & 19 (11 - 26) & 8 (3 - 12) & 12 (6 - 17) & \
textbf{XXXXXX}& 73 (63 - 84) & 18 (8 - 28) & 5 (1 - 9) & 4 (-1 - 9) & \
hline
end{tabular}
}
end{table}

end{document}









share|improve this question















marked as duplicate by Werner tables
Users with the  tables badge can single-handedly close tables questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
46 mins ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















  • Use resizebox{textwidth}{!} instead of makebox[linewidth] with usepackage{graphicx} in preamble.

    – ferahfeza
    6 hours ago








  • 2





    @ferahfeza scaling tables makes horrible, inconsistent output.

    – David Carlisle
    6 hours ago











  • Mine was just a suggestion.

    – ferahfeza
    6 hours ago






  • 1





    @ferahfeza: For that I would recommend begin{adjustbox}{max width=linewidth,center}, but I agree with David.

    – Martin Scharrer
    6 hours ago











  • You mean to fit the table inside the normal text area, right? Not scaling it so that it covers literally the whole page? Maybe change l to p{some length} in the argument of tabular so that you can have automated line breaks in longer cells.

    – Martin Scharrer
    6 hours ago
















2
















This question already has an answer here:




  • My table doesn't fit; what are my options?

    1 answer




I am new to latex and cannot solve to fit this table to page size even though I looked up the problem in the forum. Any help would be very much appreciated.



    documentclass[11pt]{article}
usepackage[utf8]{inputenc}
usepackage[scaled]{helvet}
usepackage[table]{xcolor}
renewcommandfamilydefault{sfdefault}
usepackage[T1]{fontenc}
thispagestyle{empty}
usepackage[margin=0.7in]{geometry}
begin{document}
rowcolors{2}{gray!25}{white} % for alt row cols
begin{table}[ht]
centering
makebox[linewidth]{
begin{tabular}{lllllll}
rowcolor{gray!50} %for alt row cols
hline
& Overall & None (N) & Mild (M) & Moderate (M) & Severe (S) \
& Mean% (SE) (95% CI)&Mean% (SE) (95% CI)& Mean% (SE) (95% CI)&Mean% (SE) (95% CI) & Mean% (SE) (95% CI) \
hline
textbf{XXXXXX}& 65 (61 - 69) & 20 (17 - 23)& 8 (6 - 10) & 7 (5 - 9) & \
textbf{XXXXXXX} (XXXX-XXX)& 42 (34 - 51) & 23 (15 - 30) & 17 (10 - 24) & 18 (11 - 25) & \
textbf{XXXXXXX} (XXXX-XXXX)& 62 (53 - 70) & 19 (11 - 26) & 8 (3 - 12) & 12 (6 - 17) & \
textbf{XXXXXX}& 73 (63 - 84) & 18 (8 - 28) & 5 (1 - 9) & 4 (-1 - 9) & \
hline
end{tabular}
}
end{table}

end{document}









share|improve this question















marked as duplicate by Werner tables
Users with the  tables badge can single-handedly close tables questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
46 mins ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















  • Use resizebox{textwidth}{!} instead of makebox[linewidth] with usepackage{graphicx} in preamble.

    – ferahfeza
    6 hours ago








  • 2





    @ferahfeza scaling tables makes horrible, inconsistent output.

    – David Carlisle
    6 hours ago











  • Mine was just a suggestion.

    – ferahfeza
    6 hours ago






  • 1





    @ferahfeza: For that I would recommend begin{adjustbox}{max width=linewidth,center}, but I agree with David.

    – Martin Scharrer
    6 hours ago











  • You mean to fit the table inside the normal text area, right? Not scaling it so that it covers literally the whole page? Maybe change l to p{some length} in the argument of tabular so that you can have automated line breaks in longer cells.

    – Martin Scharrer
    6 hours ago














2












2








2









This question already has an answer here:




  • My table doesn't fit; what are my options?

    1 answer




I am new to latex and cannot solve to fit this table to page size even though I looked up the problem in the forum. Any help would be very much appreciated.



    documentclass[11pt]{article}
usepackage[utf8]{inputenc}
usepackage[scaled]{helvet}
usepackage[table]{xcolor}
renewcommandfamilydefault{sfdefault}
usepackage[T1]{fontenc}
thispagestyle{empty}
usepackage[margin=0.7in]{geometry}
begin{document}
rowcolors{2}{gray!25}{white} % for alt row cols
begin{table}[ht]
centering
makebox[linewidth]{
begin{tabular}{lllllll}
rowcolor{gray!50} %for alt row cols
hline
& Overall & None (N) & Mild (M) & Moderate (M) & Severe (S) \
& Mean% (SE) (95% CI)&Mean% (SE) (95% CI)& Mean% (SE) (95% CI)&Mean% (SE) (95% CI) & Mean% (SE) (95% CI) \
hline
textbf{XXXXXX}& 65 (61 - 69) & 20 (17 - 23)& 8 (6 - 10) & 7 (5 - 9) & \
textbf{XXXXXXX} (XXXX-XXX)& 42 (34 - 51) & 23 (15 - 30) & 17 (10 - 24) & 18 (11 - 25) & \
textbf{XXXXXXX} (XXXX-XXXX)& 62 (53 - 70) & 19 (11 - 26) & 8 (3 - 12) & 12 (6 - 17) & \
textbf{XXXXXX}& 73 (63 - 84) & 18 (8 - 28) & 5 (1 - 9) & 4 (-1 - 9) & \
hline
end{tabular}
}
end{table}

end{document}









share|improve this question

















This question already has an answer here:




  • My table doesn't fit; what are my options?

    1 answer




I am new to latex and cannot solve to fit this table to page size even though I looked up the problem in the forum. Any help would be very much appreciated.



    documentclass[11pt]{article}
usepackage[utf8]{inputenc}
usepackage[scaled]{helvet}
usepackage[table]{xcolor}
renewcommandfamilydefault{sfdefault}
usepackage[T1]{fontenc}
thispagestyle{empty}
usepackage[margin=0.7in]{geometry}
begin{document}
rowcolors{2}{gray!25}{white} % for alt row cols
begin{table}[ht]
centering
makebox[linewidth]{
begin{tabular}{lllllll}
rowcolor{gray!50} %for alt row cols
hline
& Overall & None (N) & Mild (M) & Moderate (M) & Severe (S) \
& Mean% (SE) (95% CI)&Mean% (SE) (95% CI)& Mean% (SE) (95% CI)&Mean% (SE) (95% CI) & Mean% (SE) (95% CI) \
hline
textbf{XXXXXX}& 65 (61 - 69) & 20 (17 - 23)& 8 (6 - 10) & 7 (5 - 9) & \
textbf{XXXXXXX} (XXXX-XXX)& 42 (34 - 51) & 23 (15 - 30) & 17 (10 - 24) & 18 (11 - 25) & \
textbf{XXXXXXX} (XXXX-XXXX)& 62 (53 - 70) & 19 (11 - 26) & 8 (3 - 12) & 12 (6 - 17) & \
textbf{XXXXXX}& 73 (63 - 84) & 18 (8 - 28) & 5 (1 - 9) & 4 (-1 - 9) & \
hline
end{tabular}
}
end{table}

end{document}




This question already has an answer here:




  • My table doesn't fit; what are my options?

    1 answer








tables fit






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 6 hours ago









ferahfeza

5,44911830




5,44911830










asked 6 hours ago









JuliaJulia

685




685




marked as duplicate by Werner tables
Users with the  tables badge can single-handedly close tables questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
46 mins ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Werner tables
Users with the  tables badge can single-handedly close tables questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
46 mins ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Use resizebox{textwidth}{!} instead of makebox[linewidth] with usepackage{graphicx} in preamble.

    – ferahfeza
    6 hours ago








  • 2





    @ferahfeza scaling tables makes horrible, inconsistent output.

    – David Carlisle
    6 hours ago











  • Mine was just a suggestion.

    – ferahfeza
    6 hours ago






  • 1





    @ferahfeza: For that I would recommend begin{adjustbox}{max width=linewidth,center}, but I agree with David.

    – Martin Scharrer
    6 hours ago











  • You mean to fit the table inside the normal text area, right? Not scaling it so that it covers literally the whole page? Maybe change l to p{some length} in the argument of tabular so that you can have automated line breaks in longer cells.

    – Martin Scharrer
    6 hours ago



















  • Use resizebox{textwidth}{!} instead of makebox[linewidth] with usepackage{graphicx} in preamble.

    – ferahfeza
    6 hours ago








  • 2





    @ferahfeza scaling tables makes horrible, inconsistent output.

    – David Carlisle
    6 hours ago











  • Mine was just a suggestion.

    – ferahfeza
    6 hours ago






  • 1





    @ferahfeza: For that I would recommend begin{adjustbox}{max width=linewidth,center}, but I agree with David.

    – Martin Scharrer
    6 hours ago











  • You mean to fit the table inside the normal text area, right? Not scaling it so that it covers literally the whole page? Maybe change l to p{some length} in the argument of tabular so that you can have automated line breaks in longer cells.

    – Martin Scharrer
    6 hours ago

















Use resizebox{textwidth}{!} instead of makebox[linewidth] with usepackage{graphicx} in preamble.

– ferahfeza
6 hours ago







Use resizebox{textwidth}{!} instead of makebox[linewidth] with usepackage{graphicx} in preamble.

– ferahfeza
6 hours ago






2




2





@ferahfeza scaling tables makes horrible, inconsistent output.

– David Carlisle
6 hours ago





@ferahfeza scaling tables makes horrible, inconsistent output.

– David Carlisle
6 hours ago













Mine was just a suggestion.

– ferahfeza
6 hours ago





Mine was just a suggestion.

– ferahfeza
6 hours ago




1




1





@ferahfeza: For that I would recommend begin{adjustbox}{max width=linewidth,center}, but I agree with David.

– Martin Scharrer
6 hours ago





@ferahfeza: For that I would recommend begin{adjustbox}{max width=linewidth,center}, but I agree with David.

– Martin Scharrer
6 hours ago













You mean to fit the table inside the normal text area, right? Not scaling it so that it covers literally the whole page? Maybe change l to p{some length} in the argument of tabular so that you can have automated line breaks in longer cells.

– Martin Scharrer
6 hours ago





You mean to fit the table inside the normal text area, right? Not scaling it so that it covers literally the whole page? Maybe change l to p{some length} in the argument of tabular so that you can have automated line breaks in longer cells.

– Martin Scharrer
6 hours ago










2 Answers
2






active

oldest

votes


















3














I suggest you switch from tabular to tabularx and allow line breaks in each of the five data column header cells.



enter image description here



documentclass[11pt]{article}
usepackage[margin=1in]{geometry}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}usepackage[scaled]{helvet}
usepackage[table]{xcolor}
renewcommandfamilydefault{sfdefault}
usepackage{tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslash}X}

begin{document}
begin{table}[ht]
rowcolors{2}{gray!25}{white} % for alt row cols
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default 6pt
begin{tabularx}{textwidth}{l *{5}{C}}
hline
rowcolor{gray!50} % for this row only
& Overall & None (N) & Mild (M) & Moderate (M) & Severe (S) \
& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI)& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI) & Mean% (SE) (95%~CI) \
%hline
textbf{XXXXXX}& 65 (61--69) & 20 (17--23)& 8 (6--10) & 7 (5--9) & \
textbf{XXXXXXX} (XXXX-XXX)& 42 (34--51) & 23 (15--30) & 17 (10--24) & 18 (11--25) & \
textbf{XXXXXXX} (XXXX-XXXX)& 62 (53--70) & 19 (11--26) & 8 (3--12) & 12 (6--17) & \
textbf{XXXXXX}& 73 (63--84) & 18 (8--28) & 5 (1--9) & 4 ($-$1--9) & \
hline
end{tabularx}
end{table}
end{document}





share|improve this answer



















  • 1





    Alternative would be something like begin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}

    – Martin Scharrer
    6 hours ago











  • @MartinScharrer - I suppose that if the OP wants the contents of the five data columns to be typeset ragged-right rather than centered, one could run newcolumntype{L}{>{RaggedRightarraybackslash}X} in the preamble and subsequently change begin{tabularx}{textwidth}{l *{5}{C}} to begin{tabularx}{textwidth}{l *{5}{L}}.

    – Mico
    5 hours ago













  • begin{table}[p] will put the table on its own page, or at least on a page with no text. See also sidewaystable from rotating.

    – John Kormylo
    2 hours ago



















0














There are two parts to this:



1) How do I force LaTeX to put my table on its own page?



2) How do I make the table fill the page?



For the first, drop the {table} environment. For years, I struggled with my tables and figures going where I wanted them to until I realized that those environments were just about float placement and indexing, and weren't necessary for either a {tabular} or an includegraphics. If you put down a {tabular} environment with all of your desired data and clearpage before and after it, you'll get the table on its own page right in the spot in the text that you want it.



For the second question, you can set your column widths to be whatever you want, and experiment with what looks right for your columns.



For making a page-sized table that will float, I recommend creating a minibox with the same size as your page size (or the size of your page minus margins).



begin{table}[ht]
begin{minipage}{textwidth}
begin{tabular}...





share|improve this answer


























  • The directive begin{tabular}[ht] can't be correct. Did you mean to write begin{table}[ht]?

    – Mico
    5 hours ago











  • @Mico Fixed Thanks.

    – JKreft
    1 hour ago


















2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














I suggest you switch from tabular to tabularx and allow line breaks in each of the five data column header cells.



enter image description here



documentclass[11pt]{article}
usepackage[margin=1in]{geometry}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}usepackage[scaled]{helvet}
usepackage[table]{xcolor}
renewcommandfamilydefault{sfdefault}
usepackage{tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslash}X}

begin{document}
begin{table}[ht]
rowcolors{2}{gray!25}{white} % for alt row cols
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default 6pt
begin{tabularx}{textwidth}{l *{5}{C}}
hline
rowcolor{gray!50} % for this row only
& Overall & None (N) & Mild (M) & Moderate (M) & Severe (S) \
& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI)& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI) & Mean% (SE) (95%~CI) \
%hline
textbf{XXXXXX}& 65 (61--69) & 20 (17--23)& 8 (6--10) & 7 (5--9) & \
textbf{XXXXXXX} (XXXX-XXX)& 42 (34--51) & 23 (15--30) & 17 (10--24) & 18 (11--25) & \
textbf{XXXXXXX} (XXXX-XXXX)& 62 (53--70) & 19 (11--26) & 8 (3--12) & 12 (6--17) & \
textbf{XXXXXX}& 73 (63--84) & 18 (8--28) & 5 (1--9) & 4 ($-$1--9) & \
hline
end{tabularx}
end{table}
end{document}





share|improve this answer



















  • 1





    Alternative would be something like begin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}

    – Martin Scharrer
    6 hours ago











  • @MartinScharrer - I suppose that if the OP wants the contents of the five data columns to be typeset ragged-right rather than centered, one could run newcolumntype{L}{>{RaggedRightarraybackslash}X} in the preamble and subsequently change begin{tabularx}{textwidth}{l *{5}{C}} to begin{tabularx}{textwidth}{l *{5}{L}}.

    – Mico
    5 hours ago













  • begin{table}[p] will put the table on its own page, or at least on a page with no text. See also sidewaystable from rotating.

    – John Kormylo
    2 hours ago
















3














I suggest you switch from tabular to tabularx and allow line breaks in each of the five data column header cells.



enter image description here



documentclass[11pt]{article}
usepackage[margin=1in]{geometry}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}usepackage[scaled]{helvet}
usepackage[table]{xcolor}
renewcommandfamilydefault{sfdefault}
usepackage{tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslash}X}

begin{document}
begin{table}[ht]
rowcolors{2}{gray!25}{white} % for alt row cols
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default 6pt
begin{tabularx}{textwidth}{l *{5}{C}}
hline
rowcolor{gray!50} % for this row only
& Overall & None (N) & Mild (M) & Moderate (M) & Severe (S) \
& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI)& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI) & Mean% (SE) (95%~CI) \
%hline
textbf{XXXXXX}& 65 (61--69) & 20 (17--23)& 8 (6--10) & 7 (5--9) & \
textbf{XXXXXXX} (XXXX-XXX)& 42 (34--51) & 23 (15--30) & 17 (10--24) & 18 (11--25) & \
textbf{XXXXXXX} (XXXX-XXXX)& 62 (53--70) & 19 (11--26) & 8 (3--12) & 12 (6--17) & \
textbf{XXXXXX}& 73 (63--84) & 18 (8--28) & 5 (1--9) & 4 ($-$1--9) & \
hline
end{tabularx}
end{table}
end{document}





share|improve this answer



















  • 1





    Alternative would be something like begin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}

    – Martin Scharrer
    6 hours ago











  • @MartinScharrer - I suppose that if the OP wants the contents of the five data columns to be typeset ragged-right rather than centered, one could run newcolumntype{L}{>{RaggedRightarraybackslash}X} in the preamble and subsequently change begin{tabularx}{textwidth}{l *{5}{C}} to begin{tabularx}{textwidth}{l *{5}{L}}.

    – Mico
    5 hours ago













  • begin{table}[p] will put the table on its own page, or at least on a page with no text. See also sidewaystable from rotating.

    – John Kormylo
    2 hours ago














3












3








3







I suggest you switch from tabular to tabularx and allow line breaks in each of the five data column header cells.



enter image description here



documentclass[11pt]{article}
usepackage[margin=1in]{geometry}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}usepackage[scaled]{helvet}
usepackage[table]{xcolor}
renewcommandfamilydefault{sfdefault}
usepackage{tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslash}X}

begin{document}
begin{table}[ht]
rowcolors{2}{gray!25}{white} % for alt row cols
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default 6pt
begin{tabularx}{textwidth}{l *{5}{C}}
hline
rowcolor{gray!50} % for this row only
& Overall & None (N) & Mild (M) & Moderate (M) & Severe (S) \
& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI)& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI) & Mean% (SE) (95%~CI) \
%hline
textbf{XXXXXX}& 65 (61--69) & 20 (17--23)& 8 (6--10) & 7 (5--9) & \
textbf{XXXXXXX} (XXXX-XXX)& 42 (34--51) & 23 (15--30) & 17 (10--24) & 18 (11--25) & \
textbf{XXXXXXX} (XXXX-XXXX)& 62 (53--70) & 19 (11--26) & 8 (3--12) & 12 (6--17) & \
textbf{XXXXXX}& 73 (63--84) & 18 (8--28) & 5 (1--9) & 4 ($-$1--9) & \
hline
end{tabularx}
end{table}
end{document}





share|improve this answer













I suggest you switch from tabular to tabularx and allow line breaks in each of the five data column header cells.



enter image description here



documentclass[11pt]{article}
usepackage[margin=1in]{geometry}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}usepackage[scaled]{helvet}
usepackage[table]{xcolor}
renewcommandfamilydefault{sfdefault}
usepackage{tabularx,ragged2e}
newcolumntype{C}{>{Centeringarraybackslash}X}

begin{document}
begin{table}[ht]
rowcolors{2}{gray!25}{white} % for alt row cols
setlengthextrarowheight{2pt}
setlengthtabcolsep{3pt} % default 6pt
begin{tabularx}{textwidth}{l *{5}{C}}
hline
rowcolor{gray!50} % for this row only
& Overall & None (N) & Mild (M) & Moderate (M) & Severe (S) \
& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI)& Mean% (SE) (95%~CI)&Mean% (SE) (95%~CI) & Mean% (SE) (95%~CI) \
%hline
textbf{XXXXXX}& 65 (61--69) & 20 (17--23)& 8 (6--10) & 7 (5--9) & \
textbf{XXXXXXX} (XXXX-XXX)& 42 (34--51) & 23 (15--30) & 17 (10--24) & 18 (11--25) & \
textbf{XXXXXXX} (XXXX-XXXX)& 62 (53--70) & 19 (11--26) & 8 (3--12) & 12 (6--17) & \
textbf{XXXXXX}& 73 (63--84) & 18 (8--28) & 5 (1--9) & 4 ($-$1--9) & \
hline
end{tabularx}
end{table}
end{document}






share|improve this answer












share|improve this answer



share|improve this answer










answered 6 hours ago









MicoMico

275k30373761




275k30373761








  • 1





    Alternative would be something like begin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}

    – Martin Scharrer
    6 hours ago











  • @MartinScharrer - I suppose that if the OP wants the contents of the five data columns to be typeset ragged-right rather than centered, one could run newcolumntype{L}{>{RaggedRightarraybackslash}X} in the preamble and subsequently change begin{tabularx}{textwidth}{l *{5}{C}} to begin{tabularx}{textwidth}{l *{5}{L}}.

    – Mico
    5 hours ago













  • begin{table}[p] will put the table on its own page, or at least on a page with no text. See also sidewaystable from rotating.

    – John Kormylo
    2 hours ago














  • 1





    Alternative would be something like begin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}

    – Martin Scharrer
    6 hours ago











  • @MartinScharrer - I suppose that if the OP wants the contents of the five data columns to be typeset ragged-right rather than centered, one could run newcolumntype{L}{>{RaggedRightarraybackslash}X} in the preamble and subsequently change begin{tabularx}{textwidth}{l *{5}{C}} to begin{tabularx}{textwidth}{l *{5}{L}}.

    – Mico
    5 hours ago













  • begin{table}[p] will put the table on its own page, or at least on a page with no text. See also sidewaystable from rotating.

    – John Kormylo
    2 hours ago








1




1





Alternative would be something like begin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}

– Martin Scharrer
6 hours ago





Alternative would be something like begin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}

– Martin Scharrer
6 hours ago













@MartinScharrer - I suppose that if the OP wants the contents of the five data columns to be typeset ragged-right rather than centered, one could run newcolumntype{L}{>{RaggedRightarraybackslash}X} in the preamble and subsequently change begin{tabularx}{textwidth}{l *{5}{C}} to begin{tabularx}{textwidth}{l *{5}{L}}.

– Mico
5 hours ago







@MartinScharrer - I suppose that if the OP wants the contents of the five data columns to be typeset ragged-right rather than centered, one could run newcolumntype{L}{>{RaggedRightarraybackslash}X} in the preamble and subsequently change begin{tabularx}{textwidth}{l *{5}{C}} to begin{tabularx}{textwidth}{l *{5}{L}}.

– Mico
5 hours ago















begin{table}[p] will put the table on its own page, or at least on a page with no text. See also sidewaystable from rotating.

– John Kormylo
2 hours ago





begin{table}[p] will put the table on its own page, or at least on a page with no text. See also sidewaystable from rotating.

– John Kormylo
2 hours ago











0














There are two parts to this:



1) How do I force LaTeX to put my table on its own page?



2) How do I make the table fill the page?



For the first, drop the {table} environment. For years, I struggled with my tables and figures going where I wanted them to until I realized that those environments were just about float placement and indexing, and weren't necessary for either a {tabular} or an includegraphics. If you put down a {tabular} environment with all of your desired data and clearpage before and after it, you'll get the table on its own page right in the spot in the text that you want it.



For the second question, you can set your column widths to be whatever you want, and experiment with what looks right for your columns.



For making a page-sized table that will float, I recommend creating a minibox with the same size as your page size (or the size of your page minus margins).



begin{table}[ht]
begin{minipage}{textwidth}
begin{tabular}...





share|improve this answer


























  • The directive begin{tabular}[ht] can't be correct. Did you mean to write begin{table}[ht]?

    – Mico
    5 hours ago











  • @Mico Fixed Thanks.

    – JKreft
    1 hour ago
















0














There are two parts to this:



1) How do I force LaTeX to put my table on its own page?



2) How do I make the table fill the page?



For the first, drop the {table} environment. For years, I struggled with my tables and figures going where I wanted them to until I realized that those environments were just about float placement and indexing, and weren't necessary for either a {tabular} or an includegraphics. If you put down a {tabular} environment with all of your desired data and clearpage before and after it, you'll get the table on its own page right in the spot in the text that you want it.



For the second question, you can set your column widths to be whatever you want, and experiment with what looks right for your columns.



For making a page-sized table that will float, I recommend creating a minibox with the same size as your page size (or the size of your page minus margins).



begin{table}[ht]
begin{minipage}{textwidth}
begin{tabular}...





share|improve this answer


























  • The directive begin{tabular}[ht] can't be correct. Did you mean to write begin{table}[ht]?

    – Mico
    5 hours ago











  • @Mico Fixed Thanks.

    – JKreft
    1 hour ago














0












0








0







There are two parts to this:



1) How do I force LaTeX to put my table on its own page?



2) How do I make the table fill the page?



For the first, drop the {table} environment. For years, I struggled with my tables and figures going where I wanted them to until I realized that those environments were just about float placement and indexing, and weren't necessary for either a {tabular} or an includegraphics. If you put down a {tabular} environment with all of your desired data and clearpage before and after it, you'll get the table on its own page right in the spot in the text that you want it.



For the second question, you can set your column widths to be whatever you want, and experiment with what looks right for your columns.



For making a page-sized table that will float, I recommend creating a minibox with the same size as your page size (or the size of your page minus margins).



begin{table}[ht]
begin{minipage}{textwidth}
begin{tabular}...





share|improve this answer















There are two parts to this:



1) How do I force LaTeX to put my table on its own page?



2) How do I make the table fill the page?



For the first, drop the {table} environment. For years, I struggled with my tables and figures going where I wanted them to until I realized that those environments were just about float placement and indexing, and weren't necessary for either a {tabular} or an includegraphics. If you put down a {tabular} environment with all of your desired data and clearpage before and after it, you'll get the table on its own page right in the spot in the text that you want it.



For the second question, you can set your column widths to be whatever you want, and experiment with what looks right for your columns.



For making a page-sized table that will float, I recommend creating a minibox with the same size as your page size (or the size of your page minus margins).



begin{table}[ht]
begin{minipage}{textwidth}
begin{tabular}...






share|improve this answer














share|improve this answer



share|improve this answer








edited 1 hour ago

























answered 6 hours ago









JKreftJKreft

260211




260211













  • The directive begin{tabular}[ht] can't be correct. Did you mean to write begin{table}[ht]?

    – Mico
    5 hours ago











  • @Mico Fixed Thanks.

    – JKreft
    1 hour ago



















  • The directive begin{tabular}[ht] can't be correct. Did you mean to write begin{table}[ht]?

    – Mico
    5 hours ago











  • @Mico Fixed Thanks.

    – JKreft
    1 hour ago

















The directive begin{tabular}[ht] can't be correct. Did you mean to write begin{table}[ht]?

– Mico
5 hours ago





The directive begin{tabular}[ht] can't be correct. Did you mean to write begin{table}[ht]?

– Mico
5 hours ago













@Mico Fixed Thanks.

– JKreft
1 hour ago





@Mico Fixed Thanks.

– JKreft
1 hour ago



Popular posts from this blog

How to label and detect the document text images

Vallis Paradisi

Tabula Rosettana