Reduce column width of table while also aligning values at decimal pointAligning numbers by decimal points in table columnsAligning Decimal Points in TableAlign position of decimal point within table of numbers, text and percentage valuesAligning the decimal point using siunitx and longtable?Set column width to pointlatex table align decimal, stars, column widthAligning column around decimal with footnotes presentProblem with table spacing when aligning by decimal point?Table column text exceeds column widthAlign values in a table to decimal point when using “p” columns
How to write a sincerely religious protagonist without preaching or affirming or judging their worldview?
What does "see" in "the Holy See" mean?
Does academia have a lazy work culture?
401(k) investment after being fired. Do I own it?
Explanation for a joke about a three-legged dog that walks into a bar
kids pooling money for Lego League and taxes
Using "Kollege" as "university friend"?
Why no ";" after "do" in sh loops?
What should I say when a company asks you why someone (a friend) who was fired left?
How can I tell if there was a power cut while I was out?
How can I receive packages while in France?
"I you already know": is this proper English?
Airplanes in static display at Whiteman AFB
How were the LM astronauts supported during the moon landing and ascent? What were the max G's on them during these phases?
Character is called by their first initial. How do I write it?
How can I prevent corporations from growing their own workforce?
Are the Cavalier's uses of Unwavering Mark or uses of the bonus attack granted limited per long rest?
The seven story archetypes. Are they truly all of them?
USA: Can a witness take the 5th to avoid perjury?
What is the lowest-speed bogey a jet fighter can intercept/escort?
Can the Artificer's infusions stack? Returning weapon + radiant weapon?
Iterate over non-const variables in C++
What is the meaning of "you has the wind of me"?
This message is flooding my syslog, how to find where it comes from?
Reduce column width of table while also aligning values at decimal point
Aligning numbers by decimal points in table columnsAligning Decimal Points in TableAlign position of decimal point within table of numbers, text and percentage valuesAligning the decimal point using siunitx and longtable?Set column width to pointlatex table align decimal, stars, column widthAligning column around decimal with footnotes presentProblem with table spacing when aligning by decimal point?Table column text exceeds column widthAlign values in a table to decimal point when using “p” columns
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a table that is currently too large for my page which is why I want to reduce the column width. At the same time I also want to align the values at the decimal point. I have been trying with the siunitx
package but somehow I can't get it right. I don't necessarily have to use this package but I want the table to stay the way it is (except for the column widths). I would like to adjust each column width individually to overall make the table the same width as the text I have in my document.
This is my table:
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
begindocument
begintable[!htb]
captionSample caption labeltab:example
begintabularrlSllSl
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& X TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& Y TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabular
raggedright footnotesizeOne-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01 par
endtable
enddocument
Appreciate any help with this!
tables tabularx siunitx dcolumn
New contributor
|
show 2 more comments
I have a table that is currently too large for my page which is why I want to reduce the column width. At the same time I also want to align the values at the decimal point. I have been trying with the siunitx
package but somehow I can't get it right. I don't necessarily have to use this package but I want the table to stay the way it is (except for the column widths). I would like to adjust each column width individually to overall make the table the same width as the text I have in my document.
This is my table:
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
begindocument
begintable[!htb]
captionSample caption labeltab:example
begintabularrlSllSl
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& X TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& Y TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabular
raggedright footnotesizeOne-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01 par
endtable
enddocument
Appreciate any help with this!
tables tabularx siunitx dcolumn
New contributor
1
Welcome to TeX.SX! Could you please turn your code fragment into a compilable minimal working example (MWE) by adding the documentclass as well as the relevant packages? Currently, your table is not compilable as its column specifiers are completely missing.
– leandriis
8 hours ago
@leandriis Of course, sorry about that! I edited the example accordingly.
– User2010S
8 hours ago
Thanks for the update. However, in your previous code, the second and fifth column was a bit shorter than it is now. What is closer to the table in your real document?
– leandriis
8 hours ago
@leandriis you can disregard the first example, this is closer to the real document as the columns make the table wider than the text.
– User2010S
8 hours ago
Some more suggestions/questions: a) Would it be okay to introduce linebreaks in the second and fifth column? b) Are you willing to change the document's margins (for example with thegeometry
package? c) Could you rotate the table to a landscape page?
– leandriis
8 hours ago
|
show 2 more comments
I have a table that is currently too large for my page which is why I want to reduce the column width. At the same time I also want to align the values at the decimal point. I have been trying with the siunitx
package but somehow I can't get it right. I don't necessarily have to use this package but I want the table to stay the way it is (except for the column widths). I would like to adjust each column width individually to overall make the table the same width as the text I have in my document.
This is my table:
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
begindocument
begintable[!htb]
captionSample caption labeltab:example
begintabularrlSllSl
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& X TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& Y TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabular
raggedright footnotesizeOne-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01 par
endtable
enddocument
Appreciate any help with this!
tables tabularx siunitx dcolumn
New contributor
I have a table that is currently too large for my page which is why I want to reduce the column width. At the same time I also want to align the values at the decimal point. I have been trying with the siunitx
package but somehow I can't get it right. I don't necessarily have to use this package but I want the table to stay the way it is (except for the column widths). I would like to adjust each column width individually to overall make the table the same width as the text I have in my document.
This is my table:
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
begindocument
begintable[!htb]
captionSample caption labeltab:example
begintabularrlSllSl
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& X TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& Y TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabular
raggedright footnotesizeOne-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01 par
endtable
enddocument
Appreciate any help with this!
tables tabularx siunitx dcolumn
tables tabularx siunitx dcolumn
New contributor
New contributor
edited 8 hours ago
User2010S
New contributor
asked 8 hours ago
User2010SUser2010S
254 bronze badges
254 bronze badges
New contributor
New contributor
1
Welcome to TeX.SX! Could you please turn your code fragment into a compilable minimal working example (MWE) by adding the documentclass as well as the relevant packages? Currently, your table is not compilable as its column specifiers are completely missing.
– leandriis
8 hours ago
@leandriis Of course, sorry about that! I edited the example accordingly.
– User2010S
8 hours ago
Thanks for the update. However, in your previous code, the second and fifth column was a bit shorter than it is now. What is closer to the table in your real document?
– leandriis
8 hours ago
@leandriis you can disregard the first example, this is closer to the real document as the columns make the table wider than the text.
– User2010S
8 hours ago
Some more suggestions/questions: a) Would it be okay to introduce linebreaks in the second and fifth column? b) Are you willing to change the document's margins (for example with thegeometry
package? c) Could you rotate the table to a landscape page?
– leandriis
8 hours ago
|
show 2 more comments
1
Welcome to TeX.SX! Could you please turn your code fragment into a compilable minimal working example (MWE) by adding the documentclass as well as the relevant packages? Currently, your table is not compilable as its column specifiers are completely missing.
– leandriis
8 hours ago
@leandriis Of course, sorry about that! I edited the example accordingly.
– User2010S
8 hours ago
Thanks for the update. However, in your previous code, the second and fifth column was a bit shorter than it is now. What is closer to the table in your real document?
– leandriis
8 hours ago
@leandriis you can disregard the first example, this is closer to the real document as the columns make the table wider than the text.
– User2010S
8 hours ago
Some more suggestions/questions: a) Would it be okay to introduce linebreaks in the second and fifth column? b) Are you willing to change the document's margins (for example with thegeometry
package? c) Could you rotate the table to a landscape page?
– leandriis
8 hours ago
1
1
Welcome to TeX.SX! Could you please turn your code fragment into a compilable minimal working example (MWE) by adding the documentclass as well as the relevant packages? Currently, your table is not compilable as its column specifiers are completely missing.
– leandriis
8 hours ago
Welcome to TeX.SX! Could you please turn your code fragment into a compilable minimal working example (MWE) by adding the documentclass as well as the relevant packages? Currently, your table is not compilable as its column specifiers are completely missing.
– leandriis
8 hours ago
@leandriis Of course, sorry about that! I edited the example accordingly.
– User2010S
8 hours ago
@leandriis Of course, sorry about that! I edited the example accordingly.
– User2010S
8 hours ago
Thanks for the update. However, in your previous code, the second and fifth column was a bit shorter than it is now. What is closer to the table in your real document?
– leandriis
8 hours ago
Thanks for the update. However, in your previous code, the second and fifth column was a bit shorter than it is now. What is closer to the table in your real document?
– leandriis
8 hours ago
@leandriis you can disregard the first example, this is closer to the real document as the columns make the table wider than the text.
– User2010S
8 hours ago
@leandriis you can disregard the first example, this is closer to the real document as the columns make the table wider than the text.
– User2010S
8 hours ago
Some more suggestions/questions: a) Would it be okay to introduce linebreaks in the second and fifth column? b) Are you willing to change the document's margins (for example with the
geometry
package? c) Could you rotate the table to a landscape page?– leandriis
8 hours ago
Some more suggestions/questions: a) Would it be okay to introduce linebreaks in the second and fifth column? b) Are you willing to change the document's margins (for example with the
geometry
package? c) Could you rotate the table to a landscape page?– leandriis
8 hours ago
|
show 2 more comments
3 Answers
3
active
oldest
votes
To have something fill to one page using the MWE, perhaps using the usepackagefullpage
would be helpful in achieving that goal.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
usepackagedcolumn
newcolumntypeLD..2,5
usepackagefullpage
begindocument
begintable[!htb]
captionSample caption labeltab:example
begintabularrlSllSl
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& X TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& Y TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabular
raggedright footnotesizeOne-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01 par
endtable
enddocument
Unfortunately, I would like to stick withbooktabs
if possible. I updated the code with the packages currently used.
– User2010S
8 hours ago
Now that I saw your updated example, if you insertusepackagefullpage
, it might work with fitting everything on one page.
– Jennifer
8 hours ago
I edited my answer with an MWE using thebooktabs
.
– Jennifer
8 hours ago
Awesome, thank you very much for you help!
– User2010S
8 hours ago
Doesn't the use of thefullpage
package contradict the OP's statement "I also need the margins to stay the same"?
– leandriis
7 hours ago
add a comment |
Here are three more possibilities:
Since your table is too tall to fit into the textblock and you specified that you didn't want to chang the margins, I'd suggest the use of longtable
. This might especially come in handy if your caption gets longer than a single line or if you decide to add more rows to your table.
In the second example, I have allowed linebreaks in column 2 and 5 and used a larger font size for the table.
In the third example, I have reduced the font size to footnotesize
. With this, the table can fit into a single page even with a caption that has more than one or two lines.
All tables use the siunitx
package in order to align the nubers with respect to the decimal marker.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
sisetuptable-align-text-pre = false,
table-align-text-post = false,
input-open-uncertainty = ,
input-close-uncertainty = ,
usepackagelongtable % Used for table 1
usepackagexltabular % Used for table 2
begindocument
setlengthtabcolsep3.25pt small
beginlongtable@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
captionSample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line labeltab:example\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endlongtable
newpage
small
beginxltabulartextwidth@r
>raggedrightarraybackslashX
S[table-format=-1.4]
S
>raggedrightarraybackslashXS[table-format=-1.4]
S@
captionSample caption labeltab:example2\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn3lX TEXTEXTEXT \
midrule
1 & TEXTEX TEXT & 0.0056 & (0.46) & TEXTEX TEXT & 0.0046 & (0.37) \
2 & TEXTEX TEXT & -0.0067 & (-0.45) & TEXTEX TEXT & 0.0062 & (0.63) \
3 & TEXTEX TEXT & 0.0006 & (0.07) & TEXTEX TEXT & -0.0036 & (-0.31) \
4 & TEXTEX TEXT & -0.0005 & (-0.05) & TEXTEX TEXT & 0.0054 & (0.35) \
5 & TEXTEX TEXT & 0.0029 & (0.34) & TEXTEX TEXT & 0.0046 & (0.39) \
6 & TEXTEX TEXT & 0.0034 & (0.30) & TEXTEX TEXT & 0.0103 & (1.12) \
7 & TEXTEX TEXT & 0.0063 & (0.38) & & & \
8 & TEXTEX TEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEX TEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEX TEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEX TEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEX TEXT & 0.0048 & (0.57) & & & \
13 & TEXTEX TEXT & 0.0054 & (0.52) & & & \
14 & TEXTEX TEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn3lY TEXTEXTEXT \*
midrule
1 & TEXTEX TEXT & 0.0001 & (0.01) & ATEXTEX TEXT & 0.0137 & (1.59)* \
2 & TEXTEX TEXT & -0.0014 & (-0.12) & TEXTEX TEXT & 0.0105 & (1.15) \
3 & TEXTEX TEXT & 0.0107 & (1.48)* & TEXTEX TEXT & 0.0061 & (0.55) \
4 & TEXTEX TEXT & 0.0040 & (0.32) & TEXTEX TEXT & 0.0109 & (0.88) \
5 & TEXTEX TEXT & 0.0091 & (1.16) & TEXTEX TEXT & 0.0044 & (0.47) \
6 & TEXTEX TEXT & 0.0034 & (0.41) & TEXTEX TEXT & -0.0021 & (-0.13) \
7 & TEXTEX TEXT & -0.0014 & (-0.13) & TEXTEX TEXT & -0.0045 & (-0.35) \
8 & TEXTEX TEXT & 0.0019 & (0.13) & TEXTEX TEXT & 0.0143 & (1.18) \
9 & TEXTEX TEXT & 0.0001 & (0.01) & TEXTEX TEXT & -0.0160 & (-1.53)* \
10 & TEXTEX TEXT & 0.0086 & (1.15) & TEXTEX TEXT & -0.0046 & (-0.15) \
11 & TEXTEX TEXT & -0.0103 & (-0.98) & TEXTEX TEXT & 0.0004 & (0.04) \
12 & TEXTEX TEXT & -0.0008 & (-0.08) & TEXTEX TEXT & -0.0015 & (-0.10) \
13 & TEXTEX TEXT & -0.0078 & (-0.68) & TEXTEX TEXT & -0.0100 & (-0.44) \
14 & TEXTEX TEXT & -0.0023 & (-0.14) & TEXTEX TEXT & 0.0054 & (0.65) \
15 & TEXTEX TEXT & -0.0065 & (-0.51) & TEXTEX TEXT & 0.0018 & (0.14) \
16 & TEXTEX TEXT & 0.0020 & (0.29) & TEXTEX TEXT & -0.0195 & (-0.91) \
17 & TEXTEX TEXT & 0.0083 & (0.82) & & \
18 & TEXTEX TEXT & 0.0009 & (0.11) & & & \
19 & TEXTEX TEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEX TEXT & 0.0043 & (0.51) & & & \
21 & TEXTEX TEXT & 0.0072 & (0.75) & & & \
22 & TEXTEX TEXT & -0.0211 & (-0.94) & & & \
bottomrule
endxltabular
newpage
begintable[ht]
captionSample caption labeltab:example3
centering
footnotesize
begintabular@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtabular
endtable
enddocument
+1 forsisetup
. It works quite unexpected well. I need to make some more tests how to use it.
– Zarko
5 hours ago
add a comment |
with siunitx
and tabularx
(that table is fit into text area):
documentclass[12pt, a4paper]article
usepackage[format=hang,
font=small,it,
labelfont=bf,it,
labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs, tabularx
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[ht]
small
captionSample caption
labeltab:example
%
sisetupparse-numbers=false,
table-format=-2.4 % integer part had to have
% one digit more than normally needed
% otherwise decimal point is overwritten
begintabularxlinewidth@ rXSSXSS @
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn6lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn6lY TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabularx
raggedrightfootnotesize
One-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtable
enddocument
(red lines indicate page layout)
Note: your table is to tall that can be fit in text area. This you can solve but defined bigger textheight
(by help of the package geometry
} or using smaller font (for example footnotesize
}
Addendum:
Inspired by sisetup
used in @leandris answer:
begintable[ht]
footnotesize
captionSample caption
labeltab:example
%
sisetuptable-space-text-pre=(,
table-align-text-pre=false,
table-space-text-post=)*,
table-align-text-post=false,
input-open-uncertainty = ,
input-close-uncertainty = ,
begintabularxlinewidth@ r*2XS[table-format=-1.4]
S[table-format=-1.2]
@
% table body
endtable
gives better control over S
columns formatting. Using footnotesize
font size gives:
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
);
);
User2010S is a new contributor. Be nice, and check out our Code of Conduct.
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%2f501578%2freduce-column-width-of-table-while-also-aligning-values-at-decimal-point%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
To have something fill to one page using the MWE, perhaps using the usepackagefullpage
would be helpful in achieving that goal.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
usepackagedcolumn
newcolumntypeLD..2,5
usepackagefullpage
begindocument
begintable[!htb]
captionSample caption labeltab:example
begintabularrlSllSl
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& X TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& Y TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabular
raggedright footnotesizeOne-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01 par
endtable
enddocument
Unfortunately, I would like to stick withbooktabs
if possible. I updated the code with the packages currently used.
– User2010S
8 hours ago
Now that I saw your updated example, if you insertusepackagefullpage
, it might work with fitting everything on one page.
– Jennifer
8 hours ago
I edited my answer with an MWE using thebooktabs
.
– Jennifer
8 hours ago
Awesome, thank you very much for you help!
– User2010S
8 hours ago
Doesn't the use of thefullpage
package contradict the OP's statement "I also need the margins to stay the same"?
– leandriis
7 hours ago
add a comment |
To have something fill to one page using the MWE, perhaps using the usepackagefullpage
would be helpful in achieving that goal.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
usepackagedcolumn
newcolumntypeLD..2,5
usepackagefullpage
begindocument
begintable[!htb]
captionSample caption labeltab:example
begintabularrlSllSl
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& X TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& Y TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabular
raggedright footnotesizeOne-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01 par
endtable
enddocument
Unfortunately, I would like to stick withbooktabs
if possible. I updated the code with the packages currently used.
– User2010S
8 hours ago
Now that I saw your updated example, if you insertusepackagefullpage
, it might work with fitting everything on one page.
– Jennifer
8 hours ago
I edited my answer with an MWE using thebooktabs
.
– Jennifer
8 hours ago
Awesome, thank you very much for you help!
– User2010S
8 hours ago
Doesn't the use of thefullpage
package contradict the OP's statement "I also need the margins to stay the same"?
– leandriis
7 hours ago
add a comment |
To have something fill to one page using the MWE, perhaps using the usepackagefullpage
would be helpful in achieving that goal.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
usepackagedcolumn
newcolumntypeLD..2,5
usepackagefullpage
begindocument
begintable[!htb]
captionSample caption labeltab:example
begintabularrlSllSl
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& X TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& Y TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabular
raggedright footnotesizeOne-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01 par
endtable
enddocument
To have something fill to one page using the MWE, perhaps using the usepackagefullpage
would be helpful in achieving that goal.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
usepackagedcolumn
newcolumntypeLD..2,5
usepackagefullpage
begindocument
begintable[!htb]
captionSample caption labeltab:example
begintabularrlSllSl
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& X TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& Y TEXTEXTEXT & & & & \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabular
raggedright footnotesizeOne-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01 par
endtable
enddocument
edited 8 hours ago
answered 8 hours ago
JenniferJennifer
1078 bronze badges
1078 bronze badges
Unfortunately, I would like to stick withbooktabs
if possible. I updated the code with the packages currently used.
– User2010S
8 hours ago
Now that I saw your updated example, if you insertusepackagefullpage
, it might work with fitting everything on one page.
– Jennifer
8 hours ago
I edited my answer with an MWE using thebooktabs
.
– Jennifer
8 hours ago
Awesome, thank you very much for you help!
– User2010S
8 hours ago
Doesn't the use of thefullpage
package contradict the OP's statement "I also need the margins to stay the same"?
– leandriis
7 hours ago
add a comment |
Unfortunately, I would like to stick withbooktabs
if possible. I updated the code with the packages currently used.
– User2010S
8 hours ago
Now that I saw your updated example, if you insertusepackagefullpage
, it might work with fitting everything on one page.
– Jennifer
8 hours ago
I edited my answer with an MWE using thebooktabs
.
– Jennifer
8 hours ago
Awesome, thank you very much for you help!
– User2010S
8 hours ago
Doesn't the use of thefullpage
package contradict the OP's statement "I also need the margins to stay the same"?
– leandriis
7 hours ago
Unfortunately, I would like to stick with
booktabs
if possible. I updated the code with the packages currently used.– User2010S
8 hours ago
Unfortunately, I would like to stick with
booktabs
if possible. I updated the code with the packages currently used.– User2010S
8 hours ago
Now that I saw your updated example, if you insert
usepackagefullpage
, it might work with fitting everything on one page.– Jennifer
8 hours ago
Now that I saw your updated example, if you insert
usepackagefullpage
, it might work with fitting everything on one page.– Jennifer
8 hours ago
I edited my answer with an MWE using the
booktabs
.– Jennifer
8 hours ago
I edited my answer with an MWE using the
booktabs
.– Jennifer
8 hours ago
Awesome, thank you very much for you help!
– User2010S
8 hours ago
Awesome, thank you very much for you help!
– User2010S
8 hours ago
Doesn't the use of the
fullpage
package contradict the OP's statement "I also need the margins to stay the same"?– leandriis
7 hours ago
Doesn't the use of the
fullpage
package contradict the OP's statement "I also need the margins to stay the same"?– leandriis
7 hours ago
add a comment |
Here are three more possibilities:
Since your table is too tall to fit into the textblock and you specified that you didn't want to chang the margins, I'd suggest the use of longtable
. This might especially come in handy if your caption gets longer than a single line or if you decide to add more rows to your table.
In the second example, I have allowed linebreaks in column 2 and 5 and used a larger font size for the table.
In the third example, I have reduced the font size to footnotesize
. With this, the table can fit into a single page even with a caption that has more than one or two lines.
All tables use the siunitx
package in order to align the nubers with respect to the decimal marker.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
sisetuptable-align-text-pre = false,
table-align-text-post = false,
input-open-uncertainty = ,
input-close-uncertainty = ,
usepackagelongtable % Used for table 1
usepackagexltabular % Used for table 2
begindocument
setlengthtabcolsep3.25pt small
beginlongtable@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
captionSample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line labeltab:example\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endlongtable
newpage
small
beginxltabulartextwidth@r
>raggedrightarraybackslashX
S[table-format=-1.4]
S
>raggedrightarraybackslashXS[table-format=-1.4]
S@
captionSample caption labeltab:example2\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn3lX TEXTEXTEXT \
midrule
1 & TEXTEX TEXT & 0.0056 & (0.46) & TEXTEX TEXT & 0.0046 & (0.37) \
2 & TEXTEX TEXT & -0.0067 & (-0.45) & TEXTEX TEXT & 0.0062 & (0.63) \
3 & TEXTEX TEXT & 0.0006 & (0.07) & TEXTEX TEXT & -0.0036 & (-0.31) \
4 & TEXTEX TEXT & -0.0005 & (-0.05) & TEXTEX TEXT & 0.0054 & (0.35) \
5 & TEXTEX TEXT & 0.0029 & (0.34) & TEXTEX TEXT & 0.0046 & (0.39) \
6 & TEXTEX TEXT & 0.0034 & (0.30) & TEXTEX TEXT & 0.0103 & (1.12) \
7 & TEXTEX TEXT & 0.0063 & (0.38) & & & \
8 & TEXTEX TEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEX TEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEX TEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEX TEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEX TEXT & 0.0048 & (0.57) & & & \
13 & TEXTEX TEXT & 0.0054 & (0.52) & & & \
14 & TEXTEX TEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn3lY TEXTEXTEXT \*
midrule
1 & TEXTEX TEXT & 0.0001 & (0.01) & ATEXTEX TEXT & 0.0137 & (1.59)* \
2 & TEXTEX TEXT & -0.0014 & (-0.12) & TEXTEX TEXT & 0.0105 & (1.15) \
3 & TEXTEX TEXT & 0.0107 & (1.48)* & TEXTEX TEXT & 0.0061 & (0.55) \
4 & TEXTEX TEXT & 0.0040 & (0.32) & TEXTEX TEXT & 0.0109 & (0.88) \
5 & TEXTEX TEXT & 0.0091 & (1.16) & TEXTEX TEXT & 0.0044 & (0.47) \
6 & TEXTEX TEXT & 0.0034 & (0.41) & TEXTEX TEXT & -0.0021 & (-0.13) \
7 & TEXTEX TEXT & -0.0014 & (-0.13) & TEXTEX TEXT & -0.0045 & (-0.35) \
8 & TEXTEX TEXT & 0.0019 & (0.13) & TEXTEX TEXT & 0.0143 & (1.18) \
9 & TEXTEX TEXT & 0.0001 & (0.01) & TEXTEX TEXT & -0.0160 & (-1.53)* \
10 & TEXTEX TEXT & 0.0086 & (1.15) & TEXTEX TEXT & -0.0046 & (-0.15) \
11 & TEXTEX TEXT & -0.0103 & (-0.98) & TEXTEX TEXT & 0.0004 & (0.04) \
12 & TEXTEX TEXT & -0.0008 & (-0.08) & TEXTEX TEXT & -0.0015 & (-0.10) \
13 & TEXTEX TEXT & -0.0078 & (-0.68) & TEXTEX TEXT & -0.0100 & (-0.44) \
14 & TEXTEX TEXT & -0.0023 & (-0.14) & TEXTEX TEXT & 0.0054 & (0.65) \
15 & TEXTEX TEXT & -0.0065 & (-0.51) & TEXTEX TEXT & 0.0018 & (0.14) \
16 & TEXTEX TEXT & 0.0020 & (0.29) & TEXTEX TEXT & -0.0195 & (-0.91) \
17 & TEXTEX TEXT & 0.0083 & (0.82) & & \
18 & TEXTEX TEXT & 0.0009 & (0.11) & & & \
19 & TEXTEX TEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEX TEXT & 0.0043 & (0.51) & & & \
21 & TEXTEX TEXT & 0.0072 & (0.75) & & & \
22 & TEXTEX TEXT & -0.0211 & (-0.94) & & & \
bottomrule
endxltabular
newpage
begintable[ht]
captionSample caption labeltab:example3
centering
footnotesize
begintabular@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtabular
endtable
enddocument
+1 forsisetup
. It works quite unexpected well. I need to make some more tests how to use it.
– Zarko
5 hours ago
add a comment |
Here are three more possibilities:
Since your table is too tall to fit into the textblock and you specified that you didn't want to chang the margins, I'd suggest the use of longtable
. This might especially come in handy if your caption gets longer than a single line or if you decide to add more rows to your table.
In the second example, I have allowed linebreaks in column 2 and 5 and used a larger font size for the table.
In the third example, I have reduced the font size to footnotesize
. With this, the table can fit into a single page even with a caption that has more than one or two lines.
All tables use the siunitx
package in order to align the nubers with respect to the decimal marker.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
sisetuptable-align-text-pre = false,
table-align-text-post = false,
input-open-uncertainty = ,
input-close-uncertainty = ,
usepackagelongtable % Used for table 1
usepackagexltabular % Used for table 2
begindocument
setlengthtabcolsep3.25pt small
beginlongtable@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
captionSample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line labeltab:example\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endlongtable
newpage
small
beginxltabulartextwidth@r
>raggedrightarraybackslashX
S[table-format=-1.4]
S
>raggedrightarraybackslashXS[table-format=-1.4]
S@
captionSample caption labeltab:example2\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn3lX TEXTEXTEXT \
midrule
1 & TEXTEX TEXT & 0.0056 & (0.46) & TEXTEX TEXT & 0.0046 & (0.37) \
2 & TEXTEX TEXT & -0.0067 & (-0.45) & TEXTEX TEXT & 0.0062 & (0.63) \
3 & TEXTEX TEXT & 0.0006 & (0.07) & TEXTEX TEXT & -0.0036 & (-0.31) \
4 & TEXTEX TEXT & -0.0005 & (-0.05) & TEXTEX TEXT & 0.0054 & (0.35) \
5 & TEXTEX TEXT & 0.0029 & (0.34) & TEXTEX TEXT & 0.0046 & (0.39) \
6 & TEXTEX TEXT & 0.0034 & (0.30) & TEXTEX TEXT & 0.0103 & (1.12) \
7 & TEXTEX TEXT & 0.0063 & (0.38) & & & \
8 & TEXTEX TEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEX TEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEX TEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEX TEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEX TEXT & 0.0048 & (0.57) & & & \
13 & TEXTEX TEXT & 0.0054 & (0.52) & & & \
14 & TEXTEX TEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn3lY TEXTEXTEXT \*
midrule
1 & TEXTEX TEXT & 0.0001 & (0.01) & ATEXTEX TEXT & 0.0137 & (1.59)* \
2 & TEXTEX TEXT & -0.0014 & (-0.12) & TEXTEX TEXT & 0.0105 & (1.15) \
3 & TEXTEX TEXT & 0.0107 & (1.48)* & TEXTEX TEXT & 0.0061 & (0.55) \
4 & TEXTEX TEXT & 0.0040 & (0.32) & TEXTEX TEXT & 0.0109 & (0.88) \
5 & TEXTEX TEXT & 0.0091 & (1.16) & TEXTEX TEXT & 0.0044 & (0.47) \
6 & TEXTEX TEXT & 0.0034 & (0.41) & TEXTEX TEXT & -0.0021 & (-0.13) \
7 & TEXTEX TEXT & -0.0014 & (-0.13) & TEXTEX TEXT & -0.0045 & (-0.35) \
8 & TEXTEX TEXT & 0.0019 & (0.13) & TEXTEX TEXT & 0.0143 & (1.18) \
9 & TEXTEX TEXT & 0.0001 & (0.01) & TEXTEX TEXT & -0.0160 & (-1.53)* \
10 & TEXTEX TEXT & 0.0086 & (1.15) & TEXTEX TEXT & -0.0046 & (-0.15) \
11 & TEXTEX TEXT & -0.0103 & (-0.98) & TEXTEX TEXT & 0.0004 & (0.04) \
12 & TEXTEX TEXT & -0.0008 & (-0.08) & TEXTEX TEXT & -0.0015 & (-0.10) \
13 & TEXTEX TEXT & -0.0078 & (-0.68) & TEXTEX TEXT & -0.0100 & (-0.44) \
14 & TEXTEX TEXT & -0.0023 & (-0.14) & TEXTEX TEXT & 0.0054 & (0.65) \
15 & TEXTEX TEXT & -0.0065 & (-0.51) & TEXTEX TEXT & 0.0018 & (0.14) \
16 & TEXTEX TEXT & 0.0020 & (0.29) & TEXTEX TEXT & -0.0195 & (-0.91) \
17 & TEXTEX TEXT & 0.0083 & (0.82) & & \
18 & TEXTEX TEXT & 0.0009 & (0.11) & & & \
19 & TEXTEX TEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEX TEXT & 0.0043 & (0.51) & & & \
21 & TEXTEX TEXT & 0.0072 & (0.75) & & & \
22 & TEXTEX TEXT & -0.0211 & (-0.94) & & & \
bottomrule
endxltabular
newpage
begintable[ht]
captionSample caption labeltab:example3
centering
footnotesize
begintabular@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtabular
endtable
enddocument
+1 forsisetup
. It works quite unexpected well. I need to make some more tests how to use it.
– Zarko
5 hours ago
add a comment |
Here are three more possibilities:
Since your table is too tall to fit into the textblock and you specified that you didn't want to chang the margins, I'd suggest the use of longtable
. This might especially come in handy if your caption gets longer than a single line or if you decide to add more rows to your table.
In the second example, I have allowed linebreaks in column 2 and 5 and used a larger font size for the table.
In the third example, I have reduced the font size to footnotesize
. With this, the table can fit into a single page even with a caption that has more than one or two lines.
All tables use the siunitx
package in order to align the nubers with respect to the decimal marker.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
sisetuptable-align-text-pre = false,
table-align-text-post = false,
input-open-uncertainty = ,
input-close-uncertainty = ,
usepackagelongtable % Used for table 1
usepackagexltabular % Used for table 2
begindocument
setlengthtabcolsep3.25pt small
beginlongtable@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
captionSample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line labeltab:example\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endlongtable
newpage
small
beginxltabulartextwidth@r
>raggedrightarraybackslashX
S[table-format=-1.4]
S
>raggedrightarraybackslashXS[table-format=-1.4]
S@
captionSample caption labeltab:example2\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn3lX TEXTEXTEXT \
midrule
1 & TEXTEX TEXT & 0.0056 & (0.46) & TEXTEX TEXT & 0.0046 & (0.37) \
2 & TEXTEX TEXT & -0.0067 & (-0.45) & TEXTEX TEXT & 0.0062 & (0.63) \
3 & TEXTEX TEXT & 0.0006 & (0.07) & TEXTEX TEXT & -0.0036 & (-0.31) \
4 & TEXTEX TEXT & -0.0005 & (-0.05) & TEXTEX TEXT & 0.0054 & (0.35) \
5 & TEXTEX TEXT & 0.0029 & (0.34) & TEXTEX TEXT & 0.0046 & (0.39) \
6 & TEXTEX TEXT & 0.0034 & (0.30) & TEXTEX TEXT & 0.0103 & (1.12) \
7 & TEXTEX TEXT & 0.0063 & (0.38) & & & \
8 & TEXTEX TEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEX TEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEX TEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEX TEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEX TEXT & 0.0048 & (0.57) & & & \
13 & TEXTEX TEXT & 0.0054 & (0.52) & & & \
14 & TEXTEX TEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn3lY TEXTEXTEXT \*
midrule
1 & TEXTEX TEXT & 0.0001 & (0.01) & ATEXTEX TEXT & 0.0137 & (1.59)* \
2 & TEXTEX TEXT & -0.0014 & (-0.12) & TEXTEX TEXT & 0.0105 & (1.15) \
3 & TEXTEX TEXT & 0.0107 & (1.48)* & TEXTEX TEXT & 0.0061 & (0.55) \
4 & TEXTEX TEXT & 0.0040 & (0.32) & TEXTEX TEXT & 0.0109 & (0.88) \
5 & TEXTEX TEXT & 0.0091 & (1.16) & TEXTEX TEXT & 0.0044 & (0.47) \
6 & TEXTEX TEXT & 0.0034 & (0.41) & TEXTEX TEXT & -0.0021 & (-0.13) \
7 & TEXTEX TEXT & -0.0014 & (-0.13) & TEXTEX TEXT & -0.0045 & (-0.35) \
8 & TEXTEX TEXT & 0.0019 & (0.13) & TEXTEX TEXT & 0.0143 & (1.18) \
9 & TEXTEX TEXT & 0.0001 & (0.01) & TEXTEX TEXT & -0.0160 & (-1.53)* \
10 & TEXTEX TEXT & 0.0086 & (1.15) & TEXTEX TEXT & -0.0046 & (-0.15) \
11 & TEXTEX TEXT & -0.0103 & (-0.98) & TEXTEX TEXT & 0.0004 & (0.04) \
12 & TEXTEX TEXT & -0.0008 & (-0.08) & TEXTEX TEXT & -0.0015 & (-0.10) \
13 & TEXTEX TEXT & -0.0078 & (-0.68) & TEXTEX TEXT & -0.0100 & (-0.44) \
14 & TEXTEX TEXT & -0.0023 & (-0.14) & TEXTEX TEXT & 0.0054 & (0.65) \
15 & TEXTEX TEXT & -0.0065 & (-0.51) & TEXTEX TEXT & 0.0018 & (0.14) \
16 & TEXTEX TEXT & 0.0020 & (0.29) & TEXTEX TEXT & -0.0195 & (-0.91) \
17 & TEXTEX TEXT & 0.0083 & (0.82) & & \
18 & TEXTEX TEXT & 0.0009 & (0.11) & & & \
19 & TEXTEX TEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEX TEXT & 0.0043 & (0.51) & & & \
21 & TEXTEX TEXT & 0.0072 & (0.75) & & & \
22 & TEXTEX TEXT & -0.0211 & (-0.94) & & & \
bottomrule
endxltabular
newpage
begintable[ht]
captionSample caption labeltab:example3
centering
footnotesize
begintabular@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtabular
endtable
enddocument
Here are three more possibilities:
Since your table is too tall to fit into the textblock and you specified that you didn't want to chang the margins, I'd suggest the use of longtable
. This might especially come in handy if your caption gets longer than a single line or if you decide to add more rows to your table.
In the second example, I have allowed linebreaks in column 2 and 5 and used a larger font size for the table.
In the third example, I have reduced the font size to footnotesize
. With this, the table can fit into a single page even with a caption that has more than one or two lines.
All tables use the siunitx
package in order to align the nubers with respect to the decimal marker.
documentclass[12pt, a4paper]article
usepackage[format=hang,font=small,it,labelfont=bf,it,labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs
sisetuptable-align-text-pre = false,
table-align-text-post = false,
input-open-uncertainty = ,
input-close-uncertainty = ,
usepackagelongtable % Used for table 1
usepackagexltabular % Used for table 2
begindocument
setlengthtabcolsep3.25pt small
beginlongtable@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
captionSample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line Sample caption that might be longer than a single line labeltab:example\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endlongtable
newpage
small
beginxltabulartextwidth@r
>raggedrightarraybackslashX
S[table-format=-1.4]
S
>raggedrightarraybackslashXS[table-format=-1.4]
S@
captionSample caption labeltab:example2\
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
endhead
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endlastfoot
& multicolumn3lX TEXTEXTEXT \
midrule
1 & TEXTEX TEXT & 0.0056 & (0.46) & TEXTEX TEXT & 0.0046 & (0.37) \
2 & TEXTEX TEXT & -0.0067 & (-0.45) & TEXTEX TEXT & 0.0062 & (0.63) \
3 & TEXTEX TEXT & 0.0006 & (0.07) & TEXTEX TEXT & -0.0036 & (-0.31) \
4 & TEXTEX TEXT & -0.0005 & (-0.05) & TEXTEX TEXT & 0.0054 & (0.35) \
5 & TEXTEX TEXT & 0.0029 & (0.34) & TEXTEX TEXT & 0.0046 & (0.39) \
6 & TEXTEX TEXT & 0.0034 & (0.30) & TEXTEX TEXT & 0.0103 & (1.12) \
7 & TEXTEX TEXT & 0.0063 & (0.38) & & & \
8 & TEXTEX TEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEX TEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEX TEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEX TEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEX TEXT & 0.0048 & (0.57) & & & \
13 & TEXTEX TEXT & 0.0054 & (0.52) & & & \
14 & TEXTEX TEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn3lY TEXTEXTEXT \*
midrule
1 & TEXTEX TEXT & 0.0001 & (0.01) & ATEXTEX TEXT & 0.0137 & (1.59)* \
2 & TEXTEX TEXT & -0.0014 & (-0.12) & TEXTEX TEXT & 0.0105 & (1.15) \
3 & TEXTEX TEXT & 0.0107 & (1.48)* & TEXTEX TEXT & 0.0061 & (0.55) \
4 & TEXTEX TEXT & 0.0040 & (0.32) & TEXTEX TEXT & 0.0109 & (0.88) \
5 & TEXTEX TEXT & 0.0091 & (1.16) & TEXTEX TEXT & 0.0044 & (0.47) \
6 & TEXTEX TEXT & 0.0034 & (0.41) & TEXTEX TEXT & -0.0021 & (-0.13) \
7 & TEXTEX TEXT & -0.0014 & (-0.13) & TEXTEX TEXT & -0.0045 & (-0.35) \
8 & TEXTEX TEXT & 0.0019 & (0.13) & TEXTEX TEXT & 0.0143 & (1.18) \
9 & TEXTEX TEXT & 0.0001 & (0.01) & TEXTEX TEXT & -0.0160 & (-1.53)* \
10 & TEXTEX TEXT & 0.0086 & (1.15) & TEXTEX TEXT & -0.0046 & (-0.15) \
11 & TEXTEX TEXT & -0.0103 & (-0.98) & TEXTEX TEXT & 0.0004 & (0.04) \
12 & TEXTEX TEXT & -0.0008 & (-0.08) & TEXTEX TEXT & -0.0015 & (-0.10) \
13 & TEXTEX TEXT & -0.0078 & (-0.68) & TEXTEX TEXT & -0.0100 & (-0.44) \
14 & TEXTEX TEXT & -0.0023 & (-0.14) & TEXTEX TEXT & 0.0054 & (0.65) \
15 & TEXTEX TEXT & -0.0065 & (-0.51) & TEXTEX TEXT & 0.0018 & (0.14) \
16 & TEXTEX TEXT & 0.0020 & (0.29) & TEXTEX TEXT & -0.0195 & (-0.91) \
17 & TEXTEX TEXT & 0.0083 & (0.82) & & \
18 & TEXTEX TEXT & 0.0009 & (0.11) & & & \
19 & TEXTEX TEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEX TEXT & 0.0043 & (0.51) & & & \
21 & TEXTEX TEXT & 0.0072 & (0.75) & & & \
22 & TEXTEX TEXT & -0.0211 & (-0.94) & & & \
bottomrule
endxltabular
newpage
begintable[ht]
captionSample caption labeltab:example3
centering
footnotesize
begintabular@rlS[table-format=-1.4]SlS[table-format=-1.4]S@
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn2lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn2lY TEXTEXTEXT\
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & ATEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
multicolumn7lfootnotesize One-tailed t-statistics in parantheses\
multicolumn7lfootnotesize Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtabular
endtable
enddocument
answered 7 hours ago
leandriisleandriis
17k1 gold badge11 silver badges36 bronze badges
17k1 gold badge11 silver badges36 bronze badges
+1 forsisetup
. It works quite unexpected well. I need to make some more tests how to use it.
– Zarko
5 hours ago
add a comment |
+1 forsisetup
. It works quite unexpected well. I need to make some more tests how to use it.
– Zarko
5 hours ago
+1 for
sisetup
. It works quite unexpected well. I need to make some more tests how to use it.– Zarko
5 hours ago
+1 for
sisetup
. It works quite unexpected well. I need to make some more tests how to use it.– Zarko
5 hours ago
add a comment |
with siunitx
and tabularx
(that table is fit into text area):
documentclass[12pt, a4paper]article
usepackage[format=hang,
font=small,it,
labelfont=bf,it,
labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs, tabularx
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[ht]
small
captionSample caption
labeltab:example
%
sisetupparse-numbers=false,
table-format=-2.4 % integer part had to have
% one digit more than normally needed
% otherwise decimal point is overwritten
begintabularxlinewidth@ rXSSXSS @
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn6lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn6lY TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabularx
raggedrightfootnotesize
One-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtable
enddocument
(red lines indicate page layout)
Note: your table is to tall that can be fit in text area. This you can solve but defined bigger textheight
(by help of the package geometry
} or using smaller font (for example footnotesize
}
Addendum:
Inspired by sisetup
used in @leandris answer:
begintable[ht]
footnotesize
captionSample caption
labeltab:example
%
sisetuptable-space-text-pre=(,
table-align-text-pre=false,
table-space-text-post=)*,
table-align-text-post=false,
input-open-uncertainty = ,
input-close-uncertainty = ,
begintabularxlinewidth@ r*2XS[table-format=-1.4]
S[table-format=-1.2]
@
% table body
endtable
gives better control over S
columns formatting. Using footnotesize
font size gives:
add a comment |
with siunitx
and tabularx
(that table is fit into text area):
documentclass[12pt, a4paper]article
usepackage[format=hang,
font=small,it,
labelfont=bf,it,
labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs, tabularx
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[ht]
small
captionSample caption
labeltab:example
%
sisetupparse-numbers=false,
table-format=-2.4 % integer part had to have
% one digit more than normally needed
% otherwise decimal point is overwritten
begintabularxlinewidth@ rXSSXSS @
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn6lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn6lY TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabularx
raggedrightfootnotesize
One-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtable
enddocument
(red lines indicate page layout)
Note: your table is to tall that can be fit in text area. This you can solve but defined bigger textheight
(by help of the package geometry
} or using smaller font (for example footnotesize
}
Addendum:
Inspired by sisetup
used in @leandris answer:
begintable[ht]
footnotesize
captionSample caption
labeltab:example
%
sisetuptable-space-text-pre=(,
table-align-text-pre=false,
table-space-text-post=)*,
table-align-text-post=false,
input-open-uncertainty = ,
input-close-uncertainty = ,
begintabularxlinewidth@ r*2XS[table-format=-1.4]
S[table-format=-1.2]
@
% table body
endtable
gives better control over S
columns formatting. Using footnotesize
font size gives:
add a comment |
with siunitx
and tabularx
(that table is fit into text area):
documentclass[12pt, a4paper]article
usepackage[format=hang,
font=small,it,
labelfont=bf,it,
labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs, tabularx
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[ht]
small
captionSample caption
labeltab:example
%
sisetupparse-numbers=false,
table-format=-2.4 % integer part had to have
% one digit more than normally needed
% otherwise decimal point is overwritten
begintabularxlinewidth@ rXSSXSS @
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn6lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn6lY TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabularx
raggedrightfootnotesize
One-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtable
enddocument
(red lines indicate page layout)
Note: your table is to tall that can be fit in text area. This you can solve but defined bigger textheight
(by help of the package geometry
} or using smaller font (for example footnotesize
}
Addendum:
Inspired by sisetup
used in @leandris answer:
begintable[ht]
footnotesize
captionSample caption
labeltab:example
%
sisetuptable-space-text-pre=(,
table-align-text-pre=false,
table-space-text-post=)*,
table-align-text-post=false,
input-open-uncertainty = ,
input-close-uncertainty = ,
begintabularxlinewidth@ r*2XS[table-format=-1.4]
S[table-format=-1.2]
@
% table body
endtable
gives better control over S
columns formatting. Using footnotesize
font size gives:
with siunitx
and tabularx
(that table is fit into text area):
documentclass[12pt, a4paper]article
usepackage[format=hang,
font=small,it,
labelfont=bf,it,
labelsep=space]caption
captionsetup[table]labelsep=space,justification=raggedright,singlelinecheck=off
usepackagesiunitx
usepackagebooktabs, tabularx
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
begintable[ht]
small
captionSample caption
labeltab:example
%
sisetupparse-numbers=false,
table-format=-2.4 % integer part had to have
% one digit more than normally needed
% otherwise decimal point is overwritten
begintabularxlinewidth@ rXSSXSS @
toprule
& TEXTEXTEXT & AR & t-stat & Firms & AR & t-stat \
midrule
& multicolumn6lX TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0056 & (0.46) & TEXTEXTEXT & 0.0046 & (0.37) \
2 & TEXTEXTEXT & -0.0067 & (-0.45) & TEXTEXTEXT & 0.0062 & (0.63) \
3 & TEXTEXTEXT & 0.0006 & (0.07) & TEXTEXTEXT & -0.0036 & (-0.31) \
4 & TEXTEXTEXT & -0.0005 & (-0.05) & TEXTEXTEXT & 0.0054 & (0.35) \
5 & TEXTEXTEXT & 0.0029 & (0.34) & TEXTEXTEXT & 0.0046 & (0.39) \
6 & TEXTEXTEXT & 0.0034 & (0.30) & TEXTEXTEXT & 0.0103 & (1.12) \
7 & TEXTEXTEXT & 0.0063 & (0.38) & & & \
8 & TEXTEXTEXT & -0.0006 & (-0.07) & & & \
9 & TEXTEXTEXT & -0.0037 & (-0.29) & & & \
10 & TEXTEXTEXT & -0.0017 & (-0.19) & & & \
11 & TEXTEXTEXT & -0.0005 & (-0.06) & & & \
12 & TEXTEXTEXT & 0.0048 & (0.57) & & & \
13 & TEXTEXTEXT & 0.0054 & (0.52) & & & \
14 & TEXTEXTEXT & 0.0026 & (0.25) & & & \
midrule
& multicolumn6lY TEXTEXTEXT \
midrule
1 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & 0.0137 & (1.59)* \
2 & TEXTEXTEXT & -0.0014 & (-0.12) & TEXTEXTEXT & 0.0105 & (1.15) \
3 & TEXTEXTEXT & 0.0107 & (1.48)* & TEXTEXTEXT & 0.0061 & (0.55) \
4 & TEXTEXTEXT & 0.0040 & (0.32) & TEXTEXTEXT & 0.0109 & (0.88) \
5 & TEXTEXTEXT & 0.0091 & (1.16) & TEXTEXTEXT & 0.0044 & (0.47) \
6 & TEXTEXTEXT & 0.0034 & (0.41) & TEXTEXTEXT & -0.0021 & (-0.13) \
7 & TEXTEXTEXT & -0.0014 & (-0.13) & TEXTEXTEXT & -0.0045 & (-0.35) \
8 & TEXTEXTEXT & 0.0019 & (0.13) & TEXTEXTEXT & 0.0143 & (1.18) \
9 & TEXTEXTEXT & 0.0001 & (0.01) & TEXTEXTEXT & -0.0160 & (-1.53)* \
10 & TEXTEXTEXT & 0.0086 & (1.15) & TEXTEXTEXT & -0.0046 & (-0.15) \
11 & TEXTEXTEXT & -0.0103 & (-0.98) & TEXTEXTEXT & 0.0004 & (0.04) \
12 & TEXTEXTEXT & -0.0008 & (-0.08) & TEXTEXTEXT & -0.0015 & (-0.10) \
13 & TEXTEXTEXT & -0.0078 & (-0.68) & TEXTEXTEXT & -0.0100 & (-0.44) \
14 & TEXTEXTEXT & -0.0023 & (-0.14) & TEXTEXTEXT & 0.0054 & (0.65) \
15 & TEXTEXTEXT & -0.0065 & (-0.51) & TEXTEXTEXT & 0.0018 & (0.14) \
16 & TEXTEXTEXT & 0.0020 & (0.29) & TEXTEXTEXT & -0.0195 & (-0.91) \
17 & TEXTEXTEXT & 0.0083 & (0.82) & & & \
18 & TEXTEXTEXT & 0.0009 & (0.11) & & & \
19 & TEXTEXTEXT & -0.0101 & (-0.90) & & & \
20 & TEXTEXTEXT & 0.0043 & (0.51) & & & \
21 & TEXTEXTEXT & 0.0072 & (0.75) & & & \
22 & TEXTEXTEXT & -0.0211 & (-0.94) & & & \
bottomrule
endtabularx
raggedrightfootnotesize
One-tailed t-statistics in parantheses
Signs indicate * p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01
endtable
enddocument
(red lines indicate page layout)
Note: your table is to tall that can be fit in text area. This you can solve but defined bigger textheight
(by help of the package geometry
} or using smaller font (for example footnotesize
}
Addendum:
Inspired by sisetup
used in @leandris answer:
begintable[ht]
footnotesize
captionSample caption
labeltab:example
%
sisetuptable-space-text-pre=(,
table-align-text-pre=false,
table-space-text-post=)*,
table-align-text-post=false,
input-open-uncertainty = ,
input-close-uncertainty = ,
begintabularxlinewidth@ r*2XS[table-format=-1.4]
S[table-format=-1.2]
@
% table body
endtable
gives better control over S
columns formatting. Using footnotesize
font size gives:
edited 4 hours ago
answered 7 hours ago
ZarkoZarko
141k8 gold badges78 silver badges189 bronze badges
141k8 gold badges78 silver badges189 bronze badges
add a comment |
add a comment |
User2010S is a new contributor. Be nice, and check out our Code of Conduct.
User2010S is a new contributor. Be nice, and check out our Code of Conduct.
User2010S is a new contributor. Be nice, and check out our Code of Conduct.
User2010S is a new contributor. Be nice, and check out our Code of Conduct.
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%2f501578%2freduce-column-width-of-table-while-also-aligning-values-at-decimal-point%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Welcome to TeX.SX! Could you please turn your code fragment into a compilable minimal working example (MWE) by adding the documentclass as well as the relevant packages? Currently, your table is not compilable as its column specifiers are completely missing.
– leandriis
8 hours ago
@leandriis Of course, sorry about that! I edited the example accordingly.
– User2010S
8 hours ago
Thanks for the update. However, in your previous code, the second and fifth column was a bit shorter than it is now. What is closer to the table in your real document?
– leandriis
8 hours ago
@leandriis you can disregard the first example, this is closer to the real document as the columns make the table wider than the text.
– User2010S
8 hours ago
Some more suggestions/questions: a) Would it be okay to introduce linebreaks in the second and fifth column? b) Are you willing to change the document's margins (for example with the
geometry
package? c) Could you rotate the table to a landscape page?– leandriis
8 hours ago