Make table page size
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
add a comment |
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
Useresizebox{textwidth}{!}
instead ofmakebox[linewidth]
withusepackage{graphicx}
in preamble.
– ferahfeza
4 hours ago
2
@ferahfeza scaling tables makes horrible, inconsistent output.
– David Carlisle
4 hours ago
Mine was just a suggestion.
– ferahfeza
4 hours ago
1
@ferahfeza: For that I would recommendbegin{adjustbox}{max width=linewidth,center}
, but I agree with David.
– Martin Scharrer♦
4 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♦
4 hours ago
add a comment |
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
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
tables fit
edited 4 hours ago
ferahfeza
5,44911830
5,44911830
asked 4 hours ago
JuliaJulia
685
685
Useresizebox{textwidth}{!}
instead ofmakebox[linewidth]
withusepackage{graphicx}
in preamble.
– ferahfeza
4 hours ago
2
@ferahfeza scaling tables makes horrible, inconsistent output.
– David Carlisle
4 hours ago
Mine was just a suggestion.
– ferahfeza
4 hours ago
1
@ferahfeza: For that I would recommendbegin{adjustbox}{max width=linewidth,center}
, but I agree with David.
– Martin Scharrer♦
4 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♦
4 hours ago
add a comment |
Useresizebox{textwidth}{!}
instead ofmakebox[linewidth]
withusepackage{graphicx}
in preamble.
– ferahfeza
4 hours ago
2
@ferahfeza scaling tables makes horrible, inconsistent output.
– David Carlisle
4 hours ago
Mine was just a suggestion.
– ferahfeza
4 hours ago
1
@ferahfeza: For that I would recommendbegin{adjustbox}{max width=linewidth,center}
, but I agree with David.
– Martin Scharrer♦
4 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♦
4 hours ago
Use
resizebox{textwidth}{!}
instead of makebox[linewidth]
with usepackage{graphicx}
in preamble.– ferahfeza
4 hours ago
Use
resizebox{textwidth}{!}
instead of makebox[linewidth]
with usepackage{graphicx}
in preamble.– ferahfeza
4 hours ago
2
2
@ferahfeza scaling tables makes horrible, inconsistent output.
– David Carlisle
4 hours ago
@ferahfeza scaling tables makes horrible, inconsistent output.
– David Carlisle
4 hours ago
Mine was just a suggestion.
– ferahfeza
4 hours ago
Mine was just a suggestion.
– ferahfeza
4 hours ago
1
1
@ferahfeza: For that I would recommend
begin{adjustbox}{max width=linewidth,center}
, but I agree with David.– Martin Scharrer♦
4 hours ago
@ferahfeza: For that I would recommend
begin{adjustbox}{max width=linewidth,center}
, but I agree with David.– Martin Scharrer♦
4 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♦
4 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♦
4 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♦
4 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
3 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
23 mins 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{tabular}[ht]
begin{minipage}{textwidth}
begin{tabular}...
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{table}[ht]
?
– Mico
3 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f470855%2fmake-table-page-size%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
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♦
4 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
3 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
23 mins 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♦
4 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
3 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
23 mins 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 4 hours ago
MicoMico
275k30373761
275k30373761
1
Alternative would be something likebegin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}
– Martin Scharrer♦
4 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
3 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
23 mins ago
add a comment |
1
Alternative would be something likebegin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}
– Martin Scharrer♦
4 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
3 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
23 mins ago
1
1
Alternative would be something like
begin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}
– Martin Scharrer♦
4 hours ago
Alternative would be something like
begin{tabular}{lp{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}p{.125linewidth}}
– Martin Scharrer♦
4 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
3 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
3 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
23 mins 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
23 mins 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{tabular}[ht]
begin{minipage}{textwidth}
begin{tabular}...
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{table}[ht]
?
– Mico
3 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{tabular}[ht]
begin{minipage}{textwidth}
begin{tabular}...
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{table}[ht]
?
– Mico
3 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{tabular}[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{tabular}[ht]
begin{minipage}{textwidth}
begin{tabular}...
answered 4 hours ago
JKreftJKreft
260211
260211
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{table}[ht]
?
– Mico
3 hours ago
add a comment |
The directivebegin{tabular}[ht]
can't be correct. Did you mean to writebegin{table}[ht]
?
– Mico
3 hours ago
The directive
begin{tabular}[ht]
can't be correct. Did you mean to write begin{table}[ht]
?– Mico
3 hours ago
The directive
begin{tabular}[ht]
can't be correct. Did you mean to write begin{table}[ht]
?– Mico
3 hours ago
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%2f470855%2fmake-table-page-size%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
Use
resizebox{textwidth}{!}
instead ofmakebox[linewidth]
withusepackage{graphicx}
in preamble.– ferahfeza
4 hours ago
2
@ferahfeza scaling tables makes horrible, inconsistent output.
– David Carlisle
4 hours ago
Mine was just a suggestion.
– ferahfeza
4 hours ago
1
@ferahfeza: For that I would recommend
begin{adjustbox}{max width=linewidth,center}
, but I agree with David.– Martin Scharrer♦
4 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♦
4 hours ago