LaTeX the table out of pageCutting a table to fit the available space on a pageLatex: rowcolor in tabular not respecting table widthHow do I prevent cellcolor from over effect of hlineUsing BibTex as a general database for generating a tabletabular can't caption is separatedfitting text into the tabular and tabular into the pageSplit up Table Header and Table in LaTeXAlign figure next to tableTable editors and page adjustmentsI cannot add caption and resize the values in the table
Interplanetary conflict, some disease destroys the ability to understand or appreciate music
Awsome yet unlucky path traversal
Is it true that good novels will automatically sell themselves on Amazon (and so on) and there is no need for one to waste time promoting?
Life insurance that covers only simultaneous/dual deaths
Could the Saturn V actually have launched astronauts around Venus?
Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?
What do Xenomorphs eat in the Alien series?
Error in Twin Prime Conjecture
compactness of a set where am I going wrong
A sequence that has integer values for prime indexes only:
Does someone need to be connected to my network to sniff HTTP requests?
Do I need to be arrogant to get ahead?
Official degrees of earth’s rotation per day
Time travel from stationary position?
Do I need life insurance if I can cover my own funeral costs?
The difference between「N分で」and「後N分で」
Do the common programs (for example: "ls", "cat") in Linux and BSD come from the same source code?
Most cost effective thermostat setting: consistent temperature vs. lowest temperature possible
How to create the Curved texte?
What has been your most complicated TikZ drawing?
How to explain that I do not want to visit a country due to personal safety concern?
How Could an Airship Be Repaired Mid-Flight
How can I track script which gives me "command not found" right after the login?
How do I hide Chekhov's Gun?
LaTeX the table out of page
Cutting a table to fit the available space on a pageLatex: rowcolor in tabular not respecting table widthHow do I prevent cellcolor from over effect of hlineUsing BibTex as a general database for generating a tabletabular can't caption is separatedfitting text into the tabular and tabular into the pageSplit up Table Header and Table in LaTeXAlign figure next to tableTable editors and page adjustmentsI cannot add caption and resize the values in the table
I want to create table like this .
I don't know how to create header of table like that.
This is Latex script.
begintable*
centering
captionSome Typical Commands
begintabularc hline
Product ID&A&Specify Size&Error(%)&A&Specify Size&Error(%)&A&Specify Size&Error(%)\ hline
1&Method new&6&11.70&Method+Data&No&3.24&Method+Data&6&10.55\ hline
2&A& 1\ hline
3&B& 1\ hline
4&A& 1\ hline
5&B& 1\ hline
6&A& 1\ hline
7&B& 1\ hline
8&A& 1\ hline
9&B& 1\ hline
10&A& 1\ hlineendtabular
endtable*
When I run script the table width out of page like this. How to set long word to next line and merge some column.
tables
add a comment |
I want to create table like this .
I don't know how to create header of table like that.
This is Latex script.
begintable*
centering
captionSome Typical Commands
begintabularc hline
Product ID&A&Specify Size&Error(%)&A&Specify Size&Error(%)&A&Specify Size&Error(%)\ hline
1&Method new&6&11.70&Method+Data&No&3.24&Method+Data&6&10.55\ hline
2&A& 1\ hline
3&B& 1\ hline
4&A& 1\ hline
5&B& 1\ hline
6&A& 1\ hline
7&B& 1\ hline
8&A& 1\ hline
9&B& 1\ hline
10&A& 1\ hlineendtabular
endtable*
When I run script the table width out of page like this. How to set long word to next line and merge some column.
tables
Could you please turn your code fragment inot a compilable minimal working example (MWE) by adding the relevant packages and the documentclass you use? Regarding linebreaks in table cells, you might be interested in themakecell
package.
– leandriis
9 hours ago
add a comment |
I want to create table like this .
I don't know how to create header of table like that.
This is Latex script.
begintable*
centering
captionSome Typical Commands
begintabularc hline
Product ID&A&Specify Size&Error(%)&A&Specify Size&Error(%)&A&Specify Size&Error(%)\ hline
1&Method new&6&11.70&Method+Data&No&3.24&Method+Data&6&10.55\ hline
2&A& 1\ hline
3&B& 1\ hline
4&A& 1\ hline
5&B& 1\ hline
6&A& 1\ hline
7&B& 1\ hline
8&A& 1\ hline
9&B& 1\ hline
10&A& 1\ hlineendtabular
endtable*
When I run script the table width out of page like this. How to set long word to next line and merge some column.
tables
I want to create table like this .
I don't know how to create header of table like that.
This is Latex script.
begintable*
centering
captionSome Typical Commands
begintabularc hline
Product ID&A&Specify Size&Error(%)&A&Specify Size&Error(%)&A&Specify Size&Error(%)\ hline
1&Method new&6&11.70&Method+Data&No&3.24&Method+Data&6&10.55\ hline
2&A& 1\ hline
3&B& 1\ hline
4&A& 1\ hline
5&B& 1\ hline
6&A& 1\ hline
7&B& 1\ hline
8&A& 1\ hline
9&B& 1\ hline
10&A& 1\ hlineendtabular
endtable*
When I run script the table width out of page like this. How to set long word to next line and merge some column.
tables
tables
asked 9 hours ago
user58519user58519
332
332
Could you please turn your code fragment inot a compilable minimal working example (MWE) by adding the relevant packages and the documentclass you use? Regarding linebreaks in table cells, you might be interested in themakecell
package.
– leandriis
9 hours ago
add a comment |
Could you please turn your code fragment inot a compilable minimal working example (MWE) by adding the relevant packages and the documentclass you use? Regarding linebreaks in table cells, you might be interested in themakecell
package.
– leandriis
9 hours ago
Could you please turn your code fragment inot a compilable minimal working example (MWE) by adding the relevant packages and the documentclass you use? Regarding linebreaks in table cells, you might be interested in the
makecell
package.– leandriis
9 hours ago
Could you please turn your code fragment inot a compilable minimal working example (MWE) by adding the relevant packages and the documentclass you use? Regarding linebreaks in table cells, you might be interested in the
makecell
package.– leandriis
9 hours ago
add a comment |
2 Answers
2
active
oldest
votes
Here is a slightly different suggestion using makecell
in combination with a smaller fontsize. I have also added the first row of the table using multicolumn
and vertically centered the first cell using multirow
. The following example contains a second table without vertical lines. There I have used the horizontal rules from the booktabs
package and slightly decreased the tabcolsep
.
documentclassarticle
usepackagegeometry
usepackagemakecell
usepackagemultirow
usepackagebooktabs
begindocument
begintable*
small
centering
captionSome Typical Commands
begintabularc hline
multirow3*makecell[cc]Product \ ID & multicolumn31 & multicolumn32 & multicolumn33\ cline2-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ hline
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\ hline
2&A& 1 & & & & & & & \ hline
3&B& 1 & & & & & & & \ hline
4&A& 1 & & & & & & & \ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & & \ hline
7&B& 1 & & & & & & & \ hline
8&A& 1 & & & & & & & \ hline
9&B& 1 & & & & & & & \ hline
10&A& 1 & & & & & & & \ hlineendtabular
endtable*
begintable*
setlengthtabcolsep5pt
centering
captionSome Typical Commands
begintabularcccccccccl toprule
multirow3.25*makecell[cc]Product \ ID & multicolumn3c1 & multicolumn3c2 & multicolumn3c3\
cmidrule(lr)2-4 cmidrule(lr)5-7 cmidrule(lr)8-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ midrule
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\
2&A& 1\
3&B& 1\
4&A& 1\
5&B& 1\
6&A& 1\
7&B& 1\
8&A& 1\
9&B& 1\
10&A& 1\ bottomrule
endtabular
endtable*
enddocument
add a comment |
We can make such a table fit the page, not only using linebreaks with makecell
, buut also reducing the value of tabcolsep
(6pt by default) and loading geometry
to have more decent margins (if you don't use marginal notes). I added a demonstration of the use of multicolumn
:
documentclass[12pt,a4paper]article
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[showframe]geometry
usepackagecaption, makecell
begindocument
begintable*
centering
setlengthtabcolsep3pt
setlengthextrarowheight2pt
renewcommandtheadfontfootnotesizebfseries
captionSome Typical Commands
begintabular hline
theadProduct\ ID & theadA & theadSpecify\ Size & theadError \ (%) & theadA & theadSpecify \ Size & theadError\(%)& theadA & theadSpecify\ Size & theadError\ (%) \ hline
1 & makecellMethod\ new & 6 &11.70 & makecellMethod\+Data & No & 3.24 & makecellMethod\ +Data& 6 & 10.55 \ hline
2&A& 1 & & multicolumn3 &multicolumn3 \ hline
3&B& 1 & & & & & & &\ hline
4&A& 1 & & & & & & &\ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & &\ hline
7&B& 1 & & & & & & &\ hline
8&A& 1 & & & & & & &\ hline
9&B& 1 & & & & & & &\ hline
10&A& 1 & & & & & & &\ hline
endtabular
endtable*
enddocument
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2f479690%2flatex-the-table-out-of-page%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
Here is a slightly different suggestion using makecell
in combination with a smaller fontsize. I have also added the first row of the table using multicolumn
and vertically centered the first cell using multirow
. The following example contains a second table without vertical lines. There I have used the horizontal rules from the booktabs
package and slightly decreased the tabcolsep
.
documentclassarticle
usepackagegeometry
usepackagemakecell
usepackagemultirow
usepackagebooktabs
begindocument
begintable*
small
centering
captionSome Typical Commands
begintabularc hline
multirow3*makecell[cc]Product \ ID & multicolumn31 & multicolumn32 & multicolumn33\ cline2-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ hline
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\ hline
2&A& 1 & & & & & & & \ hline
3&B& 1 & & & & & & & \ hline
4&A& 1 & & & & & & & \ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & & \ hline
7&B& 1 & & & & & & & \ hline
8&A& 1 & & & & & & & \ hline
9&B& 1 & & & & & & & \ hline
10&A& 1 & & & & & & & \ hlineendtabular
endtable*
begintable*
setlengthtabcolsep5pt
centering
captionSome Typical Commands
begintabularcccccccccl toprule
multirow3.25*makecell[cc]Product \ ID & multicolumn3c1 & multicolumn3c2 & multicolumn3c3\
cmidrule(lr)2-4 cmidrule(lr)5-7 cmidrule(lr)8-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ midrule
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\
2&A& 1\
3&B& 1\
4&A& 1\
5&B& 1\
6&A& 1\
7&B& 1\
8&A& 1\
9&B& 1\
10&A& 1\ bottomrule
endtabular
endtable*
enddocument
add a comment |
Here is a slightly different suggestion using makecell
in combination with a smaller fontsize. I have also added the first row of the table using multicolumn
and vertically centered the first cell using multirow
. The following example contains a second table without vertical lines. There I have used the horizontal rules from the booktabs
package and slightly decreased the tabcolsep
.
documentclassarticle
usepackagegeometry
usepackagemakecell
usepackagemultirow
usepackagebooktabs
begindocument
begintable*
small
centering
captionSome Typical Commands
begintabularc hline
multirow3*makecell[cc]Product \ ID & multicolumn31 & multicolumn32 & multicolumn33\ cline2-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ hline
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\ hline
2&A& 1 & & & & & & & \ hline
3&B& 1 & & & & & & & \ hline
4&A& 1 & & & & & & & \ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & & \ hline
7&B& 1 & & & & & & & \ hline
8&A& 1 & & & & & & & \ hline
9&B& 1 & & & & & & & \ hline
10&A& 1 & & & & & & & \ hlineendtabular
endtable*
begintable*
setlengthtabcolsep5pt
centering
captionSome Typical Commands
begintabularcccccccccl toprule
multirow3.25*makecell[cc]Product \ ID & multicolumn3c1 & multicolumn3c2 & multicolumn3c3\
cmidrule(lr)2-4 cmidrule(lr)5-7 cmidrule(lr)8-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ midrule
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\
2&A& 1\
3&B& 1\
4&A& 1\
5&B& 1\
6&A& 1\
7&B& 1\
8&A& 1\
9&B& 1\
10&A& 1\ bottomrule
endtabular
endtable*
enddocument
add a comment |
Here is a slightly different suggestion using makecell
in combination with a smaller fontsize. I have also added the first row of the table using multicolumn
and vertically centered the first cell using multirow
. The following example contains a second table without vertical lines. There I have used the horizontal rules from the booktabs
package and slightly decreased the tabcolsep
.
documentclassarticle
usepackagegeometry
usepackagemakecell
usepackagemultirow
usepackagebooktabs
begindocument
begintable*
small
centering
captionSome Typical Commands
begintabularc hline
multirow3*makecell[cc]Product \ ID & multicolumn31 & multicolumn32 & multicolumn33\ cline2-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ hline
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\ hline
2&A& 1 & & & & & & & \ hline
3&B& 1 & & & & & & & \ hline
4&A& 1 & & & & & & & \ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & & \ hline
7&B& 1 & & & & & & & \ hline
8&A& 1 & & & & & & & \ hline
9&B& 1 & & & & & & & \ hline
10&A& 1 & & & & & & & \ hlineendtabular
endtable*
begintable*
setlengthtabcolsep5pt
centering
captionSome Typical Commands
begintabularcccccccccl toprule
multirow3.25*makecell[cc]Product \ ID & multicolumn3c1 & multicolumn3c2 & multicolumn3c3\
cmidrule(lr)2-4 cmidrule(lr)5-7 cmidrule(lr)8-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ midrule
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\
2&A& 1\
3&B& 1\
4&A& 1\
5&B& 1\
6&A& 1\
7&B& 1\
8&A& 1\
9&B& 1\
10&A& 1\ bottomrule
endtabular
endtable*
enddocument
Here is a slightly different suggestion using makecell
in combination with a smaller fontsize. I have also added the first row of the table using multicolumn
and vertically centered the first cell using multirow
. The following example contains a second table without vertical lines. There I have used the horizontal rules from the booktabs
package and slightly decreased the tabcolsep
.
documentclassarticle
usepackagegeometry
usepackagemakecell
usepackagemultirow
usepackagebooktabs
begindocument
begintable*
small
centering
captionSome Typical Commands
begintabularc hline
multirow3*makecell[cc]Product \ ID & multicolumn31 & multicolumn32 & multicolumn33\ cline2-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ hline
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\ hline
2&A& 1 & & & & & & & \ hline
3&B& 1 & & & & & & & \ hline
4&A& 1 & & & & & & & \ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & & \ hline
7&B& 1 & & & & & & & \ hline
8&A& 1 & & & & & & & \ hline
9&B& 1 & & & & & & & \ hline
10&A& 1 & & & & & & & \ hlineendtabular
endtable*
begintable*
setlengthtabcolsep5pt
centering
captionSome Typical Commands
begintabularcccccccccl toprule
multirow3.25*makecell[cc]Product \ ID & multicolumn3c1 & multicolumn3c2 & multicolumn3c3\
cmidrule(lr)2-4 cmidrule(lr)5-7 cmidrule(lr)8-10
& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%) & A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)& A & makecell[cc]Specify\ Size & makecell[cc]Error\(%)\ midrule
1 & makecell[cc]Method \new & 6&11.70 & makecellMethod+\Data & No & 3.24 & makecellMethod+\Data & 6 & 10.55\
2&A& 1\
3&B& 1\
4&A& 1\
5&B& 1\
6&A& 1\
7&B& 1\
8&A& 1\
9&B& 1\
10&A& 1\ bottomrule
endtabular
endtable*
enddocument
answered 8 hours ago
leandriisleandriis
10.1k1531
10.1k1531
add a comment |
add a comment |
We can make such a table fit the page, not only using linebreaks with makecell
, buut also reducing the value of tabcolsep
(6pt by default) and loading geometry
to have more decent margins (if you don't use marginal notes). I added a demonstration of the use of multicolumn
:
documentclass[12pt,a4paper]article
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[showframe]geometry
usepackagecaption, makecell
begindocument
begintable*
centering
setlengthtabcolsep3pt
setlengthextrarowheight2pt
renewcommandtheadfontfootnotesizebfseries
captionSome Typical Commands
begintabular hline
theadProduct\ ID & theadA & theadSpecify\ Size & theadError \ (%) & theadA & theadSpecify \ Size & theadError\(%)& theadA & theadSpecify\ Size & theadError\ (%) \ hline
1 & makecellMethod\ new & 6 &11.70 & makecellMethod\+Data & No & 3.24 & makecellMethod\ +Data& 6 & 10.55 \ hline
2&A& 1 & & multicolumn3 &multicolumn3 \ hline
3&B& 1 & & & & & & &\ hline
4&A& 1 & & & & & & &\ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & &\ hline
7&B& 1 & & & & & & &\ hline
8&A& 1 & & & & & & &\ hline
9&B& 1 & & & & & & &\ hline
10&A& 1 & & & & & & &\ hline
endtabular
endtable*
enddocument
add a comment |
We can make such a table fit the page, not only using linebreaks with makecell
, buut also reducing the value of tabcolsep
(6pt by default) and loading geometry
to have more decent margins (if you don't use marginal notes). I added a demonstration of the use of multicolumn
:
documentclass[12pt,a4paper]article
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[showframe]geometry
usepackagecaption, makecell
begindocument
begintable*
centering
setlengthtabcolsep3pt
setlengthextrarowheight2pt
renewcommandtheadfontfootnotesizebfseries
captionSome Typical Commands
begintabular hline
theadProduct\ ID & theadA & theadSpecify\ Size & theadError \ (%) & theadA & theadSpecify \ Size & theadError\(%)& theadA & theadSpecify\ Size & theadError\ (%) \ hline
1 & makecellMethod\ new & 6 &11.70 & makecellMethod\+Data & No & 3.24 & makecellMethod\ +Data& 6 & 10.55 \ hline
2&A& 1 & & multicolumn3 &multicolumn3 \ hline
3&B& 1 & & & & & & &\ hline
4&A& 1 & & & & & & &\ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & &\ hline
7&B& 1 & & & & & & &\ hline
8&A& 1 & & & & & & &\ hline
9&B& 1 & & & & & & &\ hline
10&A& 1 & & & & & & &\ hline
endtabular
endtable*
enddocument
add a comment |
We can make such a table fit the page, not only using linebreaks with makecell
, buut also reducing the value of tabcolsep
(6pt by default) and loading geometry
to have more decent margins (if you don't use marginal notes). I added a demonstration of the use of multicolumn
:
documentclass[12pt,a4paper]article
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[showframe]geometry
usepackagecaption, makecell
begindocument
begintable*
centering
setlengthtabcolsep3pt
setlengthextrarowheight2pt
renewcommandtheadfontfootnotesizebfseries
captionSome Typical Commands
begintabular hline
theadProduct\ ID & theadA & theadSpecify\ Size & theadError \ (%) & theadA & theadSpecify \ Size & theadError\(%)& theadA & theadSpecify\ Size & theadError\ (%) \ hline
1 & makecellMethod\ new & 6 &11.70 & makecellMethod\+Data & No & 3.24 & makecellMethod\ +Data& 6 & 10.55 \ hline
2&A& 1 & & multicolumn3 &multicolumn3 \ hline
3&B& 1 & & & & & & &\ hline
4&A& 1 & & & & & & &\ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & &\ hline
7&B& 1 & & & & & & &\ hline
8&A& 1 & & & & & & &\ hline
9&B& 1 & & & & & & &\ hline
10&A& 1 & & & & & & &\ hline
endtabular
endtable*
enddocument
We can make such a table fit the page, not only using linebreaks with makecell
, buut also reducing the value of tabcolsep
(6pt by default) and loading geometry
to have more decent margins (if you don't use marginal notes). I added a demonstration of the use of multicolumn
:
documentclass[12pt,a4paper]article
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[showframe]geometry
usepackagecaption, makecell
begindocument
begintable*
centering
setlengthtabcolsep3pt
setlengthextrarowheight2pt
renewcommandtheadfontfootnotesizebfseries
captionSome Typical Commands
begintabular hline
theadProduct\ ID & theadA & theadSpecify\ Size & theadError \ (%) & theadA & theadSpecify \ Size & theadError\(%)& theadA & theadSpecify\ Size & theadError\ (%) \ hline
1 & makecellMethod\ new & 6 &11.70 & makecellMethod\+Data & No & 3.24 & makecellMethod\ +Data& 6 & 10.55 \ hline
2&A& 1 & & multicolumn3 &multicolumn3 \ hline
3&B& 1 & & & & & & &\ hline
4&A& 1 & & & & & & &\ hline
5&B& 1 & & & & & & & \ hline
6&A& 1 & & & & & & &\ hline
7&B& 1 & & & & & & &\ hline
8&A& 1 & & & & & & &\ hline
9&B& 1 & & & & & & &\ hline
10&A& 1 & & & & & & &\ hline
endtabular
endtable*
enddocument
answered 8 hours ago
BernardBernard
173k776204
173k776204
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2f479690%2flatex-the-table-out-of-page%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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
Could you please turn your code fragment inot a compilable minimal working example (MWE) by adding the relevant packages and the documentclass you use? Regarding linebreaks in table cells, you might be interested in the
makecell
package.– leandriis
9 hours ago