Make table page size [duplicate]
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}
tables fit
marked as duplicate by Werner
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.
add a comment |
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}
tables fit
marked as duplicate by Werner
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.
Useresizebox{textwidth}{!}
instead ofmakebox[linewidth]
withusepackage{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 recommendbegin{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 changel
top{some length}
in the argument oftabular
so that you can have automated line breaks in longer cells.
– Martin Scharrer♦
6 hours ago
add a comment |
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}
tables fit
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
tables fit
edited 6 hours ago
ferahfeza
5,44911830
5,44911830
asked 6 hours ago
JuliaJulia
685
685
marked as duplicate by Werner
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
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.
Useresizebox{textwidth}{!}
instead ofmakebox[linewidth]
withusepackage{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 recommendbegin{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 changel
top{some length}
in the argument oftabular
so that you can have automated line breaks in longer cells.
– Martin Scharrer♦
6 hours ago
add a comment |
Useresizebox{textwidth}{!}
instead ofmakebox[linewidth]
withusepackage{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 recommendbegin{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 changel
top{some length}
in the argument oftabular
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
add a comment |
2 Answers
2
active
oldest
votes
I suggest you switch from tabular
to tabularx
and allow line breaks in each of the five data column header cells.
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}
1
Alternative would be something likebegin{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 runnewcolumntype{L}{>{RaggedRightarraybackslash}X}
in the preamble and subsequently changebegin{tabularx}{textwidth}{l *{5}{C}}
tobegin{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
add a comment |
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}...
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{table}[ht]
?
– Mico
5 hours ago
@Mico Fixed Thanks.
– JKreft
1 hour ago
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I suggest you switch from tabular
to tabularx
and allow line breaks in each of the five data column header cells.
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}
1
Alternative would be something likebegin{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 runnewcolumntype{L}{>{RaggedRightarraybackslash}X}
in the preamble and subsequently changebegin{tabularx}{textwidth}{l *{5}{C}}
tobegin{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
add a comment |
I suggest you switch from tabular
to tabularx
and allow line breaks in each of the five data column header cells.
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}
1
Alternative would be something likebegin{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 runnewcolumntype{L}{>{RaggedRightarraybackslash}X}
in the preamble and subsequently changebegin{tabularx}{textwidth}{l *{5}{C}}
tobegin{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
add a comment |
I suggest you switch from tabular
to tabularx
and allow line breaks in each of the five data column header cells.
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}
I suggest you switch from tabular
to tabularx
and allow line breaks in each of the five data column header cells.
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}
answered 6 hours ago
MicoMico
275k30373761
275k30373761
1
Alternative would be something likebegin{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 runnewcolumntype{L}{>{RaggedRightarraybackslash}X}
in the preamble and subsequently changebegin{tabularx}{textwidth}{l *{5}{C}}
tobegin{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
add a comment |
1
Alternative would be something likebegin{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 runnewcolumntype{L}{>{RaggedRightarraybackslash}X}
in the preamble and subsequently changebegin{tabularx}{textwidth}{l *{5}{C}}
tobegin{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
add a comment |
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}...
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{table}[ht]
?
– Mico
5 hours ago
@Mico Fixed Thanks.
– JKreft
1 hour ago
add a comment |
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}...
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{table}[ht]
?
– Mico
5 hours ago
@Mico Fixed Thanks.
– JKreft
1 hour ago
add a comment |
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}...
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}...
edited 1 hour ago
answered 6 hours ago
JKreftJKreft
260211
260211
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{table}[ht]
?
– Mico
5 hours ago
@Mico Fixed Thanks.
– JKreft
1 hour ago
add a comment |
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{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
add a comment |
Use
resizebox{textwidth}{!}
instead ofmakebox[linewidth]
withusepackage{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
top{some length}
in the argument oftabular
so that you can have automated line breaks in longer cells.– Martin Scharrer♦
6 hours ago