How to apply dcolumn in my longtable case? Need helpNeed help with cosmetic changes to longtableHelp...

How can I deal with someone that wants to kill something that isn't supposed to be killed?

My current job follows "worst practices". How can I talk about my experience in an interview without giving off red flags?

How can Kazakhstan perform MITM attacks on all HTTPS traffic?

What kind of anatomy does a centaur have?

Dedicated to our #1 Fan

Why did modems have speakers?

How did pilots avoid thunderstorms and related weather before “reliable” airborne weather radar was introduced on airliners?

Pass USB 3.0 connection through D-SUB connector

How can I calculate the cost of Skyss bus tickets

What is a "staved" town, like in "Staverton"?

Do I care if the housing market has gone up or down, if I'm moving from one house to another?

Book in which the "mountain" in the distance was a hole in the flat world

Where is this photo of a group of hikers taken? Is it really in the Ural?

Is the apartment I want to rent a scam?

How can I indicate that what I'm saying is not sarcastic online?

Are there any documented cases of extinction of a species of fungus?

Are gangsters hired to attack people at a train station classified as a terrorist attack?

Character Arcs - What if the character doesn't overcome the big lie, flaws or wounds?

Can an infinite group have a finite number of elements with order k?

Extrapolation v. Interpolation

Are rockets faster than airplanes?

Has Peter Parker ever eaten bugs?

Are stackless C++20 coroutines a problem?

Impact of throwing away fruit waste on a peak > 3200 m above a glacier



How to apply dcolumn in my longtable case? Need help


Need help with cosmetic changes to longtableHelp longtable ,landscape,footnotesHelp formatting longtable for landscape oriented tableHow to decimal-align a table using dcolumn packageNeed help with longtableTroubles with dcolumn package - how to use underscores?Help on converting tabularx to longtableHow to combine breqn and dcolumn package?Help with longtableNeed help converting table to longtable






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















I have the follwoing table:
enter image description here



In panel 5, I want to decimal match the 0.018 and 0.069.



enter image description here



However, my code consists of begin{longtable}{*{12}{c@{}>{$}c<{$}}}, I wonder how should I putd{-1} in the arguement?
The following is a more complete snapshot of my code



documentclass[10pt,a4paper]{article}
usepackage{booktabs}
usepackage[singlelinecheck=false, font={large, bf}]{caption}
usepackage{array,lscape,longtable}
usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
usepackage{siunitx,amsmath,dcolumn}
newcolumntype{d}[1]{D{.}{.}{#1}}
begin{document}
begin{landscape}
vspace*{-1.5cm}
setlength{tabcolsep}{5pt}
begin{longtable}{*{12}{c@{}>{$}c<{$}}}
caption{large{Summary Statistics}}label{tab:addlabel}\ multicolumn{13}{@{}p{1.05linewidth}@{}}{useless space}\
toprule
multicolumn{1}{c}{Year}& multicolumn{1}{c}{Observations}& multicolumn{1}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{1}{c}{MeanNPV} &multicolumn{1}{c}{MeanNPR}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{1}{c}{MarkNPV}&multicolumn{1}{c}{MarkNPR}\ cmidrule(lr){7-8} cmidrule(lr){9-10}
multicolumn{1}{c}{}& multicolumn{1}{c}{(NoShareholder)
}& multicolumn{1}{c}{(Shareholder)}&multicolumn{1}{c}{(No Shareholder)}&multicolumn{1}{c}{(NoShareholder)} &multicolumn{1}{c}{(Shareholder)}&
multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell(B)} & multicolumn{1}{c}{Buy(000,000)}&multicolumn{1}{c}{Sell(000,000)}\
multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
}& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
endfirsthead
caption{textbf{large{Summary Statistics} - Continued}} \
toprule
multicolumn{1}{c}{Year}& multicolumn{1}{c}{Observations}& multicolumn{1}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{1}{c}{MeanNPV} &multicolumn{1}{c}{MeanNPR}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{1}{c}{MarkNPV}&multicolumn{1}{c}{MarkNPR}\ cmidrule(lr){7-8} cmidrule(lr){9-10}\ multicolumn{1}{c}{}& multicolumn{1}{c}{(NoShareholder)
}& multicolumn{1}{c}{(Shareholder)}&multicolumn{1}{c}{(No Shareholder)}&multicolumn{1}{c}{(NoShareholder)} &multicolumn{1}{c}{(Shareholder)}&
multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell(B)} & multicolumn{1}{c}{Buy(000,000)}&multicolumn{1}{c}{Sell(000,000)}\ multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
}& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\
midrule
endhead
midrule
multicolumn{13}{r}{footnotesizeitshape
Continue on the next page}
endfoot
bottomrule
endlastfoot
1994 & 2,822 & 3,531 & 1,392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
1995 & 3,766 & 4,724 & 1,631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
1996 & 4,993 & 6,114 & 2,118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
1997 & 5,814 & 6,999 & 2,350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
1998 & 7,317 & 8,800 & 2,685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
1999 & 10,716 & 12,459 & 3,056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
2000 & 20,588 & 23,242 & 3,786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
2001 & 17,613 & 19,787 & 3,194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
2002 & 15,837 & 17,773 & 2,976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
2003 & 14,205 & 15,989 & 2,584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
2004 & 18,017 & 20,370 & 3,197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
2005 & 17,743 & 19,976 & 3,145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
2006 & 19,013 & 21,275 & 3,200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
2007 & 23,753 & 25,662 & 3,407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
2008 & 30,537 & 30,565 & 3,292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
2009 & 22,468 & 22,469 & 2,398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
2010 & 27,574 & 27,573 & 2,789 & -0.216 & -0.215 & 2.941 & 39.861 & 1575.958 & 1894.168 & -0.863 & -0.092 \
2011 & 28,544 & 28,544 & 2,953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
2012 & 26,785 & 26,786 & 2,777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
2013 & 28,140 & 28,144 & 2,813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
2014 & 23,603 & 23,612 & 2,916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
2015 & 20,968 & 20,979 & 2,799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
2016 & 17,190 & 17,792 & 2,449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
2017 & 17,559 & 18,540 & 2,410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
2018 & 16,071 & 17,156 & 2,243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
Overall & 441,636 & 468,861 & & -0.187 & -0.187 & & & & & & \ bottomrule
end{longtable}
end{landscape}
end{document}









share|improve this question









New contributor



veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Please make your code snippet be compilabe and use the {} while editing your question to format your tex code as code ...

    – Mensch
    9 hours ago











  • @Menscho Done, thank you for your advice

    – veryBigman
    9 hours ago











  • Will you add more data later (more rows)? If not why did you decide to use the longtable environment? Currently the table seems to fit onto a single page.

    – leandriis
    9 hours ago













  • As the table currently is too wide for the page, would it be acceptable for you to introduce linebreaks in the column headers?

    – leandriis
    9 hours ago











  • @leandriis Hi leandriis, it is already a two-page table, and I did not screen shot the second page. I realise the column headers are too wide, can you teach me how to do linebreaks in the column headers? I am not entirely clear what you mean by that and how will this solve the question.

    – veryBigman
    9 hours ago


















2















I have the follwoing table:
enter image description here



In panel 5, I want to decimal match the 0.018 and 0.069.



enter image description here



However, my code consists of begin{longtable}{*{12}{c@{}>{$}c<{$}}}, I wonder how should I putd{-1} in the arguement?
The following is a more complete snapshot of my code



documentclass[10pt,a4paper]{article}
usepackage{booktabs}
usepackage[singlelinecheck=false, font={large, bf}]{caption}
usepackage{array,lscape,longtable}
usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
usepackage{siunitx,amsmath,dcolumn}
newcolumntype{d}[1]{D{.}{.}{#1}}
begin{document}
begin{landscape}
vspace*{-1.5cm}
setlength{tabcolsep}{5pt}
begin{longtable}{*{12}{c@{}>{$}c<{$}}}
caption{large{Summary Statistics}}label{tab:addlabel}\ multicolumn{13}{@{}p{1.05linewidth}@{}}{useless space}\
toprule
multicolumn{1}{c}{Year}& multicolumn{1}{c}{Observations}& multicolumn{1}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{1}{c}{MeanNPV} &multicolumn{1}{c}{MeanNPR}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{1}{c}{MarkNPV}&multicolumn{1}{c}{MarkNPR}\ cmidrule(lr){7-8} cmidrule(lr){9-10}
multicolumn{1}{c}{}& multicolumn{1}{c}{(NoShareholder)
}& multicolumn{1}{c}{(Shareholder)}&multicolumn{1}{c}{(No Shareholder)}&multicolumn{1}{c}{(NoShareholder)} &multicolumn{1}{c}{(Shareholder)}&
multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell(B)} & multicolumn{1}{c}{Buy(000,000)}&multicolumn{1}{c}{Sell(000,000)}\
multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
}& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
endfirsthead
caption{textbf{large{Summary Statistics} - Continued}} \
toprule
multicolumn{1}{c}{Year}& multicolumn{1}{c}{Observations}& multicolumn{1}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{1}{c}{MeanNPV} &multicolumn{1}{c}{MeanNPR}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{1}{c}{MarkNPV}&multicolumn{1}{c}{MarkNPR}\ cmidrule(lr){7-8} cmidrule(lr){9-10}\ multicolumn{1}{c}{}& multicolumn{1}{c}{(NoShareholder)
}& multicolumn{1}{c}{(Shareholder)}&multicolumn{1}{c}{(No Shareholder)}&multicolumn{1}{c}{(NoShareholder)} &multicolumn{1}{c}{(Shareholder)}&
multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell(B)} & multicolumn{1}{c}{Buy(000,000)}&multicolumn{1}{c}{Sell(000,000)}\ multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
}& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\
midrule
endhead
midrule
multicolumn{13}{r}{footnotesizeitshape
Continue on the next page}
endfoot
bottomrule
endlastfoot
1994 & 2,822 & 3,531 & 1,392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
1995 & 3,766 & 4,724 & 1,631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
1996 & 4,993 & 6,114 & 2,118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
1997 & 5,814 & 6,999 & 2,350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
1998 & 7,317 & 8,800 & 2,685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
1999 & 10,716 & 12,459 & 3,056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
2000 & 20,588 & 23,242 & 3,786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
2001 & 17,613 & 19,787 & 3,194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
2002 & 15,837 & 17,773 & 2,976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
2003 & 14,205 & 15,989 & 2,584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
2004 & 18,017 & 20,370 & 3,197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
2005 & 17,743 & 19,976 & 3,145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
2006 & 19,013 & 21,275 & 3,200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
2007 & 23,753 & 25,662 & 3,407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
2008 & 30,537 & 30,565 & 3,292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
2009 & 22,468 & 22,469 & 2,398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
2010 & 27,574 & 27,573 & 2,789 & -0.216 & -0.215 & 2.941 & 39.861 & 1575.958 & 1894.168 & -0.863 & -0.092 \
2011 & 28,544 & 28,544 & 2,953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
2012 & 26,785 & 26,786 & 2,777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
2013 & 28,140 & 28,144 & 2,813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
2014 & 23,603 & 23,612 & 2,916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
2015 & 20,968 & 20,979 & 2,799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
2016 & 17,190 & 17,792 & 2,449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
2017 & 17,559 & 18,540 & 2,410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
2018 & 16,071 & 17,156 & 2,243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
Overall & 441,636 & 468,861 & & -0.187 & -0.187 & & & & & & \ bottomrule
end{longtable}
end{landscape}
end{document}









share|improve this question









New contributor



veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Please make your code snippet be compilabe and use the {} while editing your question to format your tex code as code ...

    – Mensch
    9 hours ago











  • @Menscho Done, thank you for your advice

    – veryBigman
    9 hours ago











  • Will you add more data later (more rows)? If not why did you decide to use the longtable environment? Currently the table seems to fit onto a single page.

    – leandriis
    9 hours ago













  • As the table currently is too wide for the page, would it be acceptable for you to introduce linebreaks in the column headers?

    – leandriis
    9 hours ago











  • @leandriis Hi leandriis, it is already a two-page table, and I did not screen shot the second page. I realise the column headers are too wide, can you teach me how to do linebreaks in the column headers? I am not entirely clear what you mean by that and how will this solve the question.

    – veryBigman
    9 hours ago














2












2








2








I have the follwoing table:
enter image description here



In panel 5, I want to decimal match the 0.018 and 0.069.



enter image description here



However, my code consists of begin{longtable}{*{12}{c@{}>{$}c<{$}}}, I wonder how should I putd{-1} in the arguement?
The following is a more complete snapshot of my code



documentclass[10pt,a4paper]{article}
usepackage{booktabs}
usepackage[singlelinecheck=false, font={large, bf}]{caption}
usepackage{array,lscape,longtable}
usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
usepackage{siunitx,amsmath,dcolumn}
newcolumntype{d}[1]{D{.}{.}{#1}}
begin{document}
begin{landscape}
vspace*{-1.5cm}
setlength{tabcolsep}{5pt}
begin{longtable}{*{12}{c@{}>{$}c<{$}}}
caption{large{Summary Statistics}}label{tab:addlabel}\ multicolumn{13}{@{}p{1.05linewidth}@{}}{useless space}\
toprule
multicolumn{1}{c}{Year}& multicolumn{1}{c}{Observations}& multicolumn{1}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{1}{c}{MeanNPV} &multicolumn{1}{c}{MeanNPR}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{1}{c}{MarkNPV}&multicolumn{1}{c}{MarkNPR}\ cmidrule(lr){7-8} cmidrule(lr){9-10}
multicolumn{1}{c}{}& multicolumn{1}{c}{(NoShareholder)
}& multicolumn{1}{c}{(Shareholder)}&multicolumn{1}{c}{(No Shareholder)}&multicolumn{1}{c}{(NoShareholder)} &multicolumn{1}{c}{(Shareholder)}&
multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell(B)} & multicolumn{1}{c}{Buy(000,000)}&multicolumn{1}{c}{Sell(000,000)}\
multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
}& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
endfirsthead
caption{textbf{large{Summary Statistics} - Continued}} \
toprule
multicolumn{1}{c}{Year}& multicolumn{1}{c}{Observations}& multicolumn{1}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{1}{c}{MeanNPV} &multicolumn{1}{c}{MeanNPR}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{1}{c}{MarkNPV}&multicolumn{1}{c}{MarkNPR}\ cmidrule(lr){7-8} cmidrule(lr){9-10}\ multicolumn{1}{c}{}& multicolumn{1}{c}{(NoShareholder)
}& multicolumn{1}{c}{(Shareholder)}&multicolumn{1}{c}{(No Shareholder)}&multicolumn{1}{c}{(NoShareholder)} &multicolumn{1}{c}{(Shareholder)}&
multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell(B)} & multicolumn{1}{c}{Buy(000,000)}&multicolumn{1}{c}{Sell(000,000)}\ multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
}& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\
midrule
endhead
midrule
multicolumn{13}{r}{footnotesizeitshape
Continue on the next page}
endfoot
bottomrule
endlastfoot
1994 & 2,822 & 3,531 & 1,392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
1995 & 3,766 & 4,724 & 1,631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
1996 & 4,993 & 6,114 & 2,118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
1997 & 5,814 & 6,999 & 2,350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
1998 & 7,317 & 8,800 & 2,685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
1999 & 10,716 & 12,459 & 3,056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
2000 & 20,588 & 23,242 & 3,786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
2001 & 17,613 & 19,787 & 3,194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
2002 & 15,837 & 17,773 & 2,976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
2003 & 14,205 & 15,989 & 2,584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
2004 & 18,017 & 20,370 & 3,197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
2005 & 17,743 & 19,976 & 3,145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
2006 & 19,013 & 21,275 & 3,200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
2007 & 23,753 & 25,662 & 3,407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
2008 & 30,537 & 30,565 & 3,292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
2009 & 22,468 & 22,469 & 2,398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
2010 & 27,574 & 27,573 & 2,789 & -0.216 & -0.215 & 2.941 & 39.861 & 1575.958 & 1894.168 & -0.863 & -0.092 \
2011 & 28,544 & 28,544 & 2,953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
2012 & 26,785 & 26,786 & 2,777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
2013 & 28,140 & 28,144 & 2,813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
2014 & 23,603 & 23,612 & 2,916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
2015 & 20,968 & 20,979 & 2,799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
2016 & 17,190 & 17,792 & 2,449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
2017 & 17,559 & 18,540 & 2,410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
2018 & 16,071 & 17,156 & 2,243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
Overall & 441,636 & 468,861 & & -0.187 & -0.187 & & & & & & \ bottomrule
end{longtable}
end{landscape}
end{document}









share|improve this question









New contributor



veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have the follwoing table:
enter image description here



In panel 5, I want to decimal match the 0.018 and 0.069.



enter image description here



However, my code consists of begin{longtable}{*{12}{c@{}>{$}c<{$}}}, I wonder how should I putd{-1} in the arguement?
The following is a more complete snapshot of my code



documentclass[10pt,a4paper]{article}
usepackage{booktabs}
usepackage[singlelinecheck=false, font={large, bf}]{caption}
usepackage{array,lscape,longtable}
usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
usepackage{siunitx,amsmath,dcolumn}
newcolumntype{d}[1]{D{.}{.}{#1}}
begin{document}
begin{landscape}
vspace*{-1.5cm}
setlength{tabcolsep}{5pt}
begin{longtable}{*{12}{c@{}>{$}c<{$}}}
caption{large{Summary Statistics}}label{tab:addlabel}\ multicolumn{13}{@{}p{1.05linewidth}@{}}{useless space}\
toprule
multicolumn{1}{c}{Year}& multicolumn{1}{c}{Observations}& multicolumn{1}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{1}{c}{MeanNPV} &multicolumn{1}{c}{MeanNPR}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{1}{c}{MarkNPV}&multicolumn{1}{c}{MarkNPR}\ cmidrule(lr){7-8} cmidrule(lr){9-10}
multicolumn{1}{c}{}& multicolumn{1}{c}{(NoShareholder)
}& multicolumn{1}{c}{(Shareholder)}&multicolumn{1}{c}{(No Shareholder)}&multicolumn{1}{c}{(NoShareholder)} &multicolumn{1}{c}{(Shareholder)}&
multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell(B)} & multicolumn{1}{c}{Buy(000,000)}&multicolumn{1}{c}{Sell(000,000)}\
multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
}& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
endfirsthead
caption{textbf{large{Summary Statistics} - Continued}} \
toprule
multicolumn{1}{c}{Year}& multicolumn{1}{c}{Observations}& multicolumn{1}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{1}{c}{MeanNPV} &multicolumn{1}{c}{MeanNPR}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{1}{c}{MarkNPV}&multicolumn{1}{c}{MarkNPR}\ cmidrule(lr){7-8} cmidrule(lr){9-10}\ multicolumn{1}{c}{}& multicolumn{1}{c}{(NoShareholder)
}& multicolumn{1}{c}{(Shareholder)}&multicolumn{1}{c}{(No Shareholder)}&multicolumn{1}{c}{(NoShareholder)} &multicolumn{1}{c}{(Shareholder)}&
multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell(B)} & multicolumn{1}{c}{Buy(000,000)}&multicolumn{1}{c}{Sell(000,000)}\ multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
}& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\
midrule
endhead
midrule
multicolumn{13}{r}{footnotesizeitshape
Continue on the next page}
endfoot
bottomrule
endlastfoot
1994 & 2,822 & 3,531 & 1,392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
1995 & 3,766 & 4,724 & 1,631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
1996 & 4,993 & 6,114 & 2,118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
1997 & 5,814 & 6,999 & 2,350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
1998 & 7,317 & 8,800 & 2,685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
1999 & 10,716 & 12,459 & 3,056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
2000 & 20,588 & 23,242 & 3,786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
2001 & 17,613 & 19,787 & 3,194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
2002 & 15,837 & 17,773 & 2,976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
2003 & 14,205 & 15,989 & 2,584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
2004 & 18,017 & 20,370 & 3,197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
2005 & 17,743 & 19,976 & 3,145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
2006 & 19,013 & 21,275 & 3,200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
2007 & 23,753 & 25,662 & 3,407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
2008 & 30,537 & 30,565 & 3,292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
2009 & 22,468 & 22,469 & 2,398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
2010 & 27,574 & 27,573 & 2,789 & -0.216 & -0.215 & 2.941 & 39.861 & 1575.958 & 1894.168 & -0.863 & -0.092 \
2011 & 28,544 & 28,544 & 2,953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
2012 & 26,785 & 26,786 & 2,777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
2013 & 28,140 & 28,144 & 2,813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
2014 & 23,603 & 23,612 & 2,916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
2015 & 20,968 & 20,979 & 2,799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
2016 & 17,190 & 17,792 & 2,449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
2017 & 17,559 & 18,540 & 2,410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
2018 & 16,071 & 17,156 & 2,243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
Overall & 441,636 & 468,861 & & -0.187 & -0.187 & & & & & & \ bottomrule
end{longtable}
end{landscape}
end{document}






longtable dcolumn






share|improve this question









New contributor



veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 9 hours ago









leandriis

16.8k1 gold badge11 silver badges36 bronze badges




16.8k1 gold badge11 silver badges36 bronze badges






New contributor



veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 10 hours ago









veryBigmanveryBigman

656 bronze badges




656 bronze badges




New contributor



veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • Please make your code snippet be compilabe and use the {} while editing your question to format your tex code as code ...

    – Mensch
    9 hours ago











  • @Menscho Done, thank you for your advice

    – veryBigman
    9 hours ago











  • Will you add more data later (more rows)? If not why did you decide to use the longtable environment? Currently the table seems to fit onto a single page.

    – leandriis
    9 hours ago













  • As the table currently is too wide for the page, would it be acceptable for you to introduce linebreaks in the column headers?

    – leandriis
    9 hours ago











  • @leandriis Hi leandriis, it is already a two-page table, and I did not screen shot the second page. I realise the column headers are too wide, can you teach me how to do linebreaks in the column headers? I am not entirely clear what you mean by that and how will this solve the question.

    – veryBigman
    9 hours ago



















  • Please make your code snippet be compilabe and use the {} while editing your question to format your tex code as code ...

    – Mensch
    9 hours ago











  • @Menscho Done, thank you for your advice

    – veryBigman
    9 hours ago











  • Will you add more data later (more rows)? If not why did you decide to use the longtable environment? Currently the table seems to fit onto a single page.

    – leandriis
    9 hours ago













  • As the table currently is too wide for the page, would it be acceptable for you to introduce linebreaks in the column headers?

    – leandriis
    9 hours ago











  • @leandriis Hi leandriis, it is already a two-page table, and I did not screen shot the second page. I realise the column headers are too wide, can you teach me how to do linebreaks in the column headers? I am not entirely clear what you mean by that and how will this solve the question.

    – veryBigman
    9 hours ago

















Please make your code snippet be compilabe and use the {} while editing your question to format your tex code as code ...

– Mensch
9 hours ago





Please make your code snippet be compilabe and use the {} while editing your question to format your tex code as code ...

– Mensch
9 hours ago













@Menscho Done, thank you for your advice

– veryBigman
9 hours ago





@Menscho Done, thank you for your advice

– veryBigman
9 hours ago













Will you add more data later (more rows)? If not why did you decide to use the longtable environment? Currently the table seems to fit onto a single page.

– leandriis
9 hours ago







Will you add more data later (more rows)? If not why did you decide to use the longtable environment? Currently the table seems to fit onto a single page.

– leandriis
9 hours ago















As the table currently is too wide for the page, would it be acceptable for you to introduce linebreaks in the column headers?

– leandriis
9 hours ago





As the table currently is too wide for the page, would it be acceptable for you to introduce linebreaks in the column headers?

– leandriis
9 hours ago













@leandriis Hi leandriis, it is already a two-page table, and I did not screen shot the second page. I realise the column headers are too wide, can you teach me how to do linebreaks in the column headers? I am not entirely clear what you mean by that and how will this solve the question.

– veryBigman
9 hours ago





@leandriis Hi leandriis, it is already a two-page table, and I did not screen shot the second page. I realise the column headers are too wide, can you teach me how to do linebreaks in the column headers? I am not entirely clear what you mean by that and how will this solve the question.

– veryBigman
9 hours ago










3 Answers
3






active

oldest

votes


















4














Since the numbers in the 11 numeric columns require both alignment on the respective decimal markers and the typesetting of thousands-separators, I recommend using the S column type of the siunitx package over the D column type of the dcolumn package.



A nice side-effect of using the S column type is that it suffices to enclosed objects that shouldn't be aligned on decimal markers in curly braces; it is not necessary to write multicolumn{1}{c}{...}. Observe that in the code below, I've actually eliminated all hard-coded comma characters; it's the software setting group-minimum-digits=4, group-separator={,} that instructs LaTeX to typeset them.



To make the large table a bit easier to read, I would also add a bit of extra whitespace after every fifth row; this may be accomplished via the addlinespace directive.



enter image description here



documentclass[10pt,a4paper]{article}
usepackage{booktabs}
usepackage[singlelinecheck=false, font={large, bf}]{caption}
usepackage{array,lscape,longtable}
usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
usepackage{siunitx,amsmath}
%% define a variant of the 'S' column type:
newcolumntype{T}[1]{S[table-format=#1,
group-minimum-digits=4, group-separator={,}]}

begin{document}
begin{landscape}
%vspace*{-1.5cm} % not needed
setlength{tabcolsep}{3pt} % default: 6pt
begin{longtable}{@{} l *{2}{T{6.0}} T{4.0} *{2}{T{-1.3}}
T{1.3} T{2.3} *{2}{T{4.3}} *{2}{T{-1.3}} @{}}
caption{Summary Statistics}
label{tab:addlabel}\

toprule
Year& {Observations}& {Observations}&
{No.Firms}&{MeanNPV} &{MeanNPR}&
multicolumn{2}{c}{MarShare$} &
multicolumn{2}{c}{MarShare#} &
{MarkNPV}&{MarkNPR}\
cmidrule(lr){7-8} cmidrule(lr){9-10}
& {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
& {(NoShareholder)} &{(Shareholder)}&{Buy(B)}& {Sell(B)}
& {Buy(000,000)}&{Sell(000,000)}\
& {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
& {(6)}& {(7)}& {(8)}&{(9)}&{(10)}&{(11)}\
midrule
endfirsthead

caption{Summary Statistics -- Continued} \
toprule
Year & {Observations} & {Observations}
&{No.Firms}&{MeanNPV} &{MeanNPR}
& multicolumn{2}{c}{MarShare$}
& multicolumn{2}{c}{MarShare#}
& {MarkNPV}&{MarkNPR}\
cmidrule(lr){7-8} cmidrule(lr){9-10}\
& {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
& {(NoShareholder)} &{(Shareholder)}& {Buy(B)}& {Sell(B)}
& {Buy(000,000)} & {Sell(000,000)}\
& {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
& {(6)}&{(7)} & {(8)}&{(9)} &{(10)}&{(11)}\
midrule
endhead

midrule
multicolumn{12}{r@{}}{footnotesizeitshape Continued on the next page}
endfoot

bottomrule
endlastfoot

1994 & 2822 & 3531 & 1392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
1995 & 3766 & 4724 & 1631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
1996 & 4993 & 6114 & 2118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
1997 & 5814 & 6999 & 2350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
1998 & 7317 & 8800 & 2685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
addlinespace
1999 & 10716 & 12459 & 3056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
2000 & 20588 & 23242 & 3786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
2001 & 17613 & 19787 & 3194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
2002 & 15837 & 17773 & 2976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
2003 & 14205 & 15989 & 2584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
addlinespace
2004 & 18017 & 20370 & 3197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
2005 & 17743 & 19976 & 3145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
2006 & 19013 & 21275 & 3200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
2007 & 23753 & 25662 & 3407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
2008 & 30537 & 30565 & 3292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
addlinespace
2009 & 22468 & 22469 & 2398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
2010 & 27574 & 27573 & 2789 & -0.216 & -0.215 & 2.941 & 39.861 &1575.958 & 1894.168 & -0.863 & -0.092 \
2011 & 28544 & 28544 & 2953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
2012 & 26785 & 26786 & 2777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
2013 & 28140 & 28144 & 2813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
addlinespace
2014 & 23603 & 23612 & 2916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
2015 & 20968 & 20979 & 2799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
2016 & 17190 & 17792 & 2449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
2017 & 17559 & 18540 & 2410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
2018 & 16071 & 17156 & 2243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
addlinespace
Overall &441636 &468861 & & -0.187 & -0.187 \

end{longtable}
end{landscape}
end{document}





share|improve this answer































    2














    Here is my suggestion using dcolumn to align the numbers with respect to . or ,, an abbreviation for "Shareholder" and some linebreaks in the column headers:



    enter image description here



    documentclass[10pt,a4paper]{article}
    usepackage{booktabs}
    usepackage[singlelinecheck=false, font={large, bf}]{caption}
    usepackage{array,lscape,longtable}
    usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
    usepackage{siunitx,amsmath,dcolumn}
    usepackage{makecell}
    newcolumntype{d}[1]{D{,}{,}{#1}}
    newcolumntype{e}[1]{D{.}{.}{#1}}
    begin{document}
    begin{landscape}
    vspace*{-1.5cm}

    begin{longtable}{@{}c
    d{3,3}
    d{3,3}
    d{1,3}
    e{-1,3}
    e{-1,3}
    e{1,3}
    e{2,3}
    e{4,3}
    e{4,3}
    e{-1,3}
    e{-1.3}@{}}
    caption{large{Summary Statistics}}label{tab:addlabel}\
    toprule
    multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
    multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
    multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
    multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
    }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
    multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
    endfirsthead
    caption{large{Summary Statistics - continued}}\
    toprule
    multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
    multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
    multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
    multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
    }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
    multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
    endhead
    midrule
    multicolumn{12}{r}{footnotesizeitshape
    Continue on the next page}
    endfoot
    bottomrule
    multicolumn{12}{l}{SH = Shareholder}
    endlastfoot
    1994 & 2,822 & 3,531 & 1,392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
    1995 & 3,766 & 4,724 & 1,631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
    1996 & 4,993 & 6,114 & 2,118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
    1997 & 5,814 & 6,999 & 2,350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
    1998 & 7,317 & 8,800 & 2,685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
    1999 & 10,716 & 12,459 & 3,056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
    2000 & 20,588 & 23,242 & 3,786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
    2001 & 17,613 & 19,787 & 3,194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
    2002 & 15,837 & 17,773 & 2,976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
    2003 & 14,205 & 15,989 & 2,584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
    2004 & 18,017 & 20,370 & 3,197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
    2005 & 17,743 & 19,976 & 3,145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
    2006 & 19,013 & 21,275 & 3,200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
    2007 & 23,753 & 25,662 & 3,407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
    2008 & 30,537 & 30,565 & 3,292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
    2009 & 22,468 & 22,469 & 2,398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
    2010 & 27,574 & 27,573 & 2,789 & -0.216 & -0.215 & 2.941 & 39.861 & 1575.958 & 1894.168 & -0.863 & -0.092 \
    2011 & 28,544 & 28,544 & 2,953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
    2012 & 26,785 & 26,786 & 2,777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
    2013 & 28,140 & 28,144 & 2,813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
    2014 & 23,603 & 23,612 & 2,916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
    2015 & 20,968 & 20,979 & 2,799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
    2016 & 17,190 & 17,792 & 2,449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
    2017 & 17,559 & 18,540 & 2,410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
    2018 & 16,071 & 17,156 & 2,243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
    Overall & 441,636 & 468,861 & & -0.187 & -0.187 & & & & & & \ bottomrule
    end{longtable}
    end{landscape}


    end{document}





    share|improve this answer



















    • 2





      I suspect the the , (comma) characters are not decimal markers but thousands-separators. Maybe the OP will clarify what the commas denote.

      – Mico
      8 hours ago



















    0














    I am posting the way I solved the problem.



    documentclass[10pt,a4paper]{article}
    usepackage{booktabs}
    usepackage[singlelinecheck=false, font={large, bf}]{caption}
    usepackage{array,lscape,longtable}
    usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
    usepackage{siunitx,amsmath,dcolumn}
    newcolumntype{.}[1]{D{.}{.}{2.4}}
    newcolumntype{,}[1]{D{,}{,}{2.4}}
    begin{document}
    begin{landscape}
    vspace*{-1.5cm}
    setlength{tabcolsep}{5pt}
    begin{longtable}{cc,c,c.c.c.c.c.c.c.c.c.c.c}


    I kept all other codes intact.
    enter image description here






    share|improve this answer








    New contributor



    veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      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
      });


      }
      });






      veryBigman is a new contributor. Be nice, and check out our Code of Conduct.










      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f501149%2fhow-to-apply-dcolumn-in-my-longtable-case-need-help%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









      4














      Since the numbers in the 11 numeric columns require both alignment on the respective decimal markers and the typesetting of thousands-separators, I recommend using the S column type of the siunitx package over the D column type of the dcolumn package.



      A nice side-effect of using the S column type is that it suffices to enclosed objects that shouldn't be aligned on decimal markers in curly braces; it is not necessary to write multicolumn{1}{c}{...}. Observe that in the code below, I've actually eliminated all hard-coded comma characters; it's the software setting group-minimum-digits=4, group-separator={,} that instructs LaTeX to typeset them.



      To make the large table a bit easier to read, I would also add a bit of extra whitespace after every fifth row; this may be accomplished via the addlinespace directive.



      enter image description here



      documentclass[10pt,a4paper]{article}
      usepackage{booktabs}
      usepackage[singlelinecheck=false, font={large, bf}]{caption}
      usepackage{array,lscape,longtable}
      usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
      usepackage{siunitx,amsmath}
      %% define a variant of the 'S' column type:
      newcolumntype{T}[1]{S[table-format=#1,
      group-minimum-digits=4, group-separator={,}]}

      begin{document}
      begin{landscape}
      %vspace*{-1.5cm} % not needed
      setlength{tabcolsep}{3pt} % default: 6pt
      begin{longtable}{@{} l *{2}{T{6.0}} T{4.0} *{2}{T{-1.3}}
      T{1.3} T{2.3} *{2}{T{4.3}} *{2}{T{-1.3}} @{}}
      caption{Summary Statistics}
      label{tab:addlabel}\

      toprule
      Year& {Observations}& {Observations}&
      {No.Firms}&{MeanNPV} &{MeanNPR}&
      multicolumn{2}{c}{MarShare$} &
      multicolumn{2}{c}{MarShare#} &
      {MarkNPV}&{MarkNPR}\
      cmidrule(lr){7-8} cmidrule(lr){9-10}
      & {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
      & {(NoShareholder)} &{(Shareholder)}&{Buy(B)}& {Sell(B)}
      & {Buy(000,000)}&{Sell(000,000)}\
      & {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
      & {(6)}& {(7)}& {(8)}&{(9)}&{(10)}&{(11)}\
      midrule
      endfirsthead

      caption{Summary Statistics -- Continued} \
      toprule
      Year & {Observations} & {Observations}
      &{No.Firms}&{MeanNPV} &{MeanNPR}
      & multicolumn{2}{c}{MarShare$}
      & multicolumn{2}{c}{MarShare#}
      & {MarkNPV}&{MarkNPR}\
      cmidrule(lr){7-8} cmidrule(lr){9-10}\
      & {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
      & {(NoShareholder)} &{(Shareholder)}& {Buy(B)}& {Sell(B)}
      & {Buy(000,000)} & {Sell(000,000)}\
      & {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
      & {(6)}&{(7)} & {(8)}&{(9)} &{(10)}&{(11)}\
      midrule
      endhead

      midrule
      multicolumn{12}{r@{}}{footnotesizeitshape Continued on the next page}
      endfoot

      bottomrule
      endlastfoot

      1994 & 2822 & 3531 & 1392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
      1995 & 3766 & 4724 & 1631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
      1996 & 4993 & 6114 & 2118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
      1997 & 5814 & 6999 & 2350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
      1998 & 7317 & 8800 & 2685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
      addlinespace
      1999 & 10716 & 12459 & 3056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
      2000 & 20588 & 23242 & 3786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
      2001 & 17613 & 19787 & 3194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
      2002 & 15837 & 17773 & 2976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
      2003 & 14205 & 15989 & 2584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
      addlinespace
      2004 & 18017 & 20370 & 3197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
      2005 & 17743 & 19976 & 3145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
      2006 & 19013 & 21275 & 3200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
      2007 & 23753 & 25662 & 3407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
      2008 & 30537 & 30565 & 3292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
      addlinespace
      2009 & 22468 & 22469 & 2398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
      2010 & 27574 & 27573 & 2789 & -0.216 & -0.215 & 2.941 & 39.861 &1575.958 & 1894.168 & -0.863 & -0.092 \
      2011 & 28544 & 28544 & 2953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
      2012 & 26785 & 26786 & 2777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
      2013 & 28140 & 28144 & 2813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
      addlinespace
      2014 & 23603 & 23612 & 2916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
      2015 & 20968 & 20979 & 2799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
      2016 & 17190 & 17792 & 2449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
      2017 & 17559 & 18540 & 2410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
      2018 & 16071 & 17156 & 2243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
      addlinespace
      Overall &441636 &468861 & & -0.187 & -0.187 \

      end{longtable}
      end{landscape}
      end{document}





      share|improve this answer




























        4














        Since the numbers in the 11 numeric columns require both alignment on the respective decimal markers and the typesetting of thousands-separators, I recommend using the S column type of the siunitx package over the D column type of the dcolumn package.



        A nice side-effect of using the S column type is that it suffices to enclosed objects that shouldn't be aligned on decimal markers in curly braces; it is not necessary to write multicolumn{1}{c}{...}. Observe that in the code below, I've actually eliminated all hard-coded comma characters; it's the software setting group-minimum-digits=4, group-separator={,} that instructs LaTeX to typeset them.



        To make the large table a bit easier to read, I would also add a bit of extra whitespace after every fifth row; this may be accomplished via the addlinespace directive.



        enter image description here



        documentclass[10pt,a4paper]{article}
        usepackage{booktabs}
        usepackage[singlelinecheck=false, font={large, bf}]{caption}
        usepackage{array,lscape,longtable}
        usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
        usepackage{siunitx,amsmath}
        %% define a variant of the 'S' column type:
        newcolumntype{T}[1]{S[table-format=#1,
        group-minimum-digits=4, group-separator={,}]}

        begin{document}
        begin{landscape}
        %vspace*{-1.5cm} % not needed
        setlength{tabcolsep}{3pt} % default: 6pt
        begin{longtable}{@{} l *{2}{T{6.0}} T{4.0} *{2}{T{-1.3}}
        T{1.3} T{2.3} *{2}{T{4.3}} *{2}{T{-1.3}} @{}}
        caption{Summary Statistics}
        label{tab:addlabel}\

        toprule
        Year& {Observations}& {Observations}&
        {No.Firms}&{MeanNPV} &{MeanNPR}&
        multicolumn{2}{c}{MarShare$} &
        multicolumn{2}{c}{MarShare#} &
        {MarkNPV}&{MarkNPR}\
        cmidrule(lr){7-8} cmidrule(lr){9-10}
        & {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
        & {(NoShareholder)} &{(Shareholder)}&{Buy(B)}& {Sell(B)}
        & {Buy(000,000)}&{Sell(000,000)}\
        & {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
        & {(6)}& {(7)}& {(8)}&{(9)}&{(10)}&{(11)}\
        midrule
        endfirsthead

        caption{Summary Statistics -- Continued} \
        toprule
        Year & {Observations} & {Observations}
        &{No.Firms}&{MeanNPV} &{MeanNPR}
        & multicolumn{2}{c}{MarShare$}
        & multicolumn{2}{c}{MarShare#}
        & {MarkNPV}&{MarkNPR}\
        cmidrule(lr){7-8} cmidrule(lr){9-10}\
        & {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
        & {(NoShareholder)} &{(Shareholder)}& {Buy(B)}& {Sell(B)}
        & {Buy(000,000)} & {Sell(000,000)}\
        & {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
        & {(6)}&{(7)} & {(8)}&{(9)} &{(10)}&{(11)}\
        midrule
        endhead

        midrule
        multicolumn{12}{r@{}}{footnotesizeitshape Continued on the next page}
        endfoot

        bottomrule
        endlastfoot

        1994 & 2822 & 3531 & 1392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
        1995 & 3766 & 4724 & 1631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
        1996 & 4993 & 6114 & 2118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
        1997 & 5814 & 6999 & 2350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
        1998 & 7317 & 8800 & 2685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
        addlinespace
        1999 & 10716 & 12459 & 3056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
        2000 & 20588 & 23242 & 3786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
        2001 & 17613 & 19787 & 3194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
        2002 & 15837 & 17773 & 2976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
        2003 & 14205 & 15989 & 2584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
        addlinespace
        2004 & 18017 & 20370 & 3197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
        2005 & 17743 & 19976 & 3145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
        2006 & 19013 & 21275 & 3200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
        2007 & 23753 & 25662 & 3407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
        2008 & 30537 & 30565 & 3292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
        addlinespace
        2009 & 22468 & 22469 & 2398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
        2010 & 27574 & 27573 & 2789 & -0.216 & -0.215 & 2.941 & 39.861 &1575.958 & 1894.168 & -0.863 & -0.092 \
        2011 & 28544 & 28544 & 2953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
        2012 & 26785 & 26786 & 2777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
        2013 & 28140 & 28144 & 2813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
        addlinespace
        2014 & 23603 & 23612 & 2916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
        2015 & 20968 & 20979 & 2799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
        2016 & 17190 & 17792 & 2449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
        2017 & 17559 & 18540 & 2410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
        2018 & 16071 & 17156 & 2243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
        addlinespace
        Overall &441636 &468861 & & -0.187 & -0.187 \

        end{longtable}
        end{landscape}
        end{document}





        share|improve this answer


























          4












          4








          4







          Since the numbers in the 11 numeric columns require both alignment on the respective decimal markers and the typesetting of thousands-separators, I recommend using the S column type of the siunitx package over the D column type of the dcolumn package.



          A nice side-effect of using the S column type is that it suffices to enclosed objects that shouldn't be aligned on decimal markers in curly braces; it is not necessary to write multicolumn{1}{c}{...}. Observe that in the code below, I've actually eliminated all hard-coded comma characters; it's the software setting group-minimum-digits=4, group-separator={,} that instructs LaTeX to typeset them.



          To make the large table a bit easier to read, I would also add a bit of extra whitespace after every fifth row; this may be accomplished via the addlinespace directive.



          enter image description here



          documentclass[10pt,a4paper]{article}
          usepackage{booktabs}
          usepackage[singlelinecheck=false, font={large, bf}]{caption}
          usepackage{array,lscape,longtable}
          usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
          usepackage{siunitx,amsmath}
          %% define a variant of the 'S' column type:
          newcolumntype{T}[1]{S[table-format=#1,
          group-minimum-digits=4, group-separator={,}]}

          begin{document}
          begin{landscape}
          %vspace*{-1.5cm} % not needed
          setlength{tabcolsep}{3pt} % default: 6pt
          begin{longtable}{@{} l *{2}{T{6.0}} T{4.0} *{2}{T{-1.3}}
          T{1.3} T{2.3} *{2}{T{4.3}} *{2}{T{-1.3}} @{}}
          caption{Summary Statistics}
          label{tab:addlabel}\

          toprule
          Year& {Observations}& {Observations}&
          {No.Firms}&{MeanNPV} &{MeanNPR}&
          multicolumn{2}{c}{MarShare$} &
          multicolumn{2}{c}{MarShare#} &
          {MarkNPV}&{MarkNPR}\
          cmidrule(lr){7-8} cmidrule(lr){9-10}
          & {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
          & {(NoShareholder)} &{(Shareholder)}&{Buy(B)}& {Sell(B)}
          & {Buy(000,000)}&{Sell(000,000)}\
          & {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
          & {(6)}& {(7)}& {(8)}&{(9)}&{(10)}&{(11)}\
          midrule
          endfirsthead

          caption{Summary Statistics -- Continued} \
          toprule
          Year & {Observations} & {Observations}
          &{No.Firms}&{MeanNPV} &{MeanNPR}
          & multicolumn{2}{c}{MarShare$}
          & multicolumn{2}{c}{MarShare#}
          & {MarkNPV}&{MarkNPR}\
          cmidrule(lr){7-8} cmidrule(lr){9-10}\
          & {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
          & {(NoShareholder)} &{(Shareholder)}& {Buy(B)}& {Sell(B)}
          & {Buy(000,000)} & {Sell(000,000)}\
          & {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
          & {(6)}&{(7)} & {(8)}&{(9)} &{(10)}&{(11)}\
          midrule
          endhead

          midrule
          multicolumn{12}{r@{}}{footnotesizeitshape Continued on the next page}
          endfoot

          bottomrule
          endlastfoot

          1994 & 2822 & 3531 & 1392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
          1995 & 3766 & 4724 & 1631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
          1996 & 4993 & 6114 & 2118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
          1997 & 5814 & 6999 & 2350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
          1998 & 7317 & 8800 & 2685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
          addlinespace
          1999 & 10716 & 12459 & 3056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
          2000 & 20588 & 23242 & 3786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
          2001 & 17613 & 19787 & 3194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
          2002 & 15837 & 17773 & 2976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
          2003 & 14205 & 15989 & 2584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
          addlinespace
          2004 & 18017 & 20370 & 3197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
          2005 & 17743 & 19976 & 3145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
          2006 & 19013 & 21275 & 3200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
          2007 & 23753 & 25662 & 3407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
          2008 & 30537 & 30565 & 3292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
          addlinespace
          2009 & 22468 & 22469 & 2398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
          2010 & 27574 & 27573 & 2789 & -0.216 & -0.215 & 2.941 & 39.861 &1575.958 & 1894.168 & -0.863 & -0.092 \
          2011 & 28544 & 28544 & 2953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
          2012 & 26785 & 26786 & 2777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
          2013 & 28140 & 28144 & 2813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
          addlinespace
          2014 & 23603 & 23612 & 2916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
          2015 & 20968 & 20979 & 2799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
          2016 & 17190 & 17792 & 2449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
          2017 & 17559 & 18540 & 2410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
          2018 & 16071 & 17156 & 2243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
          addlinespace
          Overall &441636 &468861 & & -0.187 & -0.187 \

          end{longtable}
          end{landscape}
          end{document}





          share|improve this answer













          Since the numbers in the 11 numeric columns require both alignment on the respective decimal markers and the typesetting of thousands-separators, I recommend using the S column type of the siunitx package over the D column type of the dcolumn package.



          A nice side-effect of using the S column type is that it suffices to enclosed objects that shouldn't be aligned on decimal markers in curly braces; it is not necessary to write multicolumn{1}{c}{...}. Observe that in the code below, I've actually eliminated all hard-coded comma characters; it's the software setting group-minimum-digits=4, group-separator={,} that instructs LaTeX to typeset them.



          To make the large table a bit easier to read, I would also add a bit of extra whitespace after every fifth row; this may be accomplished via the addlinespace directive.



          enter image description here



          documentclass[10pt,a4paper]{article}
          usepackage{booktabs}
          usepackage[singlelinecheck=false, font={large, bf}]{caption}
          usepackage{array,lscape,longtable}
          usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
          usepackage{siunitx,amsmath}
          %% define a variant of the 'S' column type:
          newcolumntype{T}[1]{S[table-format=#1,
          group-minimum-digits=4, group-separator={,}]}

          begin{document}
          begin{landscape}
          %vspace*{-1.5cm} % not needed
          setlength{tabcolsep}{3pt} % default: 6pt
          begin{longtable}{@{} l *{2}{T{6.0}} T{4.0} *{2}{T{-1.3}}
          T{1.3} T{2.3} *{2}{T{4.3}} *{2}{T{-1.3}} @{}}
          caption{Summary Statistics}
          label{tab:addlabel}\

          toprule
          Year& {Observations}& {Observations}&
          {No.Firms}&{MeanNPV} &{MeanNPR}&
          multicolumn{2}{c}{MarShare$} &
          multicolumn{2}{c}{MarShare#} &
          {MarkNPV}&{MarkNPR}\
          cmidrule(lr){7-8} cmidrule(lr){9-10}
          & {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
          & {(NoShareholder)} &{(Shareholder)}&{Buy(B)}& {Sell(B)}
          & {Buy(000,000)}&{Sell(000,000)}\
          & {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
          & {(6)}& {(7)}& {(8)}&{(9)}&{(10)}&{(11)}\
          midrule
          endfirsthead

          caption{Summary Statistics -- Continued} \
          toprule
          Year & {Observations} & {Observations}
          &{No.Firms}&{MeanNPV} &{MeanNPR}
          & multicolumn{2}{c}{MarShare$}
          & multicolumn{2}{c}{MarShare#}
          & {MarkNPV}&{MarkNPR}\
          cmidrule(lr){7-8} cmidrule(lr){9-10}\
          & {(NoShareholder)}& {(Shareholder)}&{(No Shareholder)}
          & {(NoShareholder)} &{(Shareholder)}& {Buy(B)}& {Sell(B)}
          & {Buy(000,000)} & {Sell(000,000)}\
          & {(1)}& {(2)}& {(3)}&{(4)} &{(5)}
          & {(6)}&{(7)} & {(8)}&{(9)} &{(10)}&{(11)}\
          midrule
          endhead

          midrule
          multicolumn{12}{r@{}}{footnotesizeitshape Continued on the next page}
          endfoot

          bottomrule
          endlastfoot

          1994 & 2822 & 3531 & 1392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
          1995 & 3766 & 4724 & 1631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
          1996 & 4993 & 6114 & 2118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
          1997 & 5814 & 6999 & 2350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
          1998 & 7317 & 8800 & 2685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
          addlinespace
          1999 & 10716 & 12459 & 3056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
          2000 & 20588 & 23242 & 3786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
          2001 & 17613 & 19787 & 3194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
          2002 & 15837 & 17773 & 2976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
          2003 & 14205 & 15989 & 2584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
          addlinespace
          2004 & 18017 & 20370 & 3197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
          2005 & 17743 & 19976 & 3145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
          2006 & 19013 & 21275 & 3200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
          2007 & 23753 & 25662 & 3407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
          2008 & 30537 & 30565 & 3292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
          addlinespace
          2009 & 22468 & 22469 & 2398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
          2010 & 27574 & 27573 & 2789 & -0.216 & -0.215 & 2.941 & 39.861 &1575.958 & 1894.168 & -0.863 & -0.092 \
          2011 & 28544 & 28544 & 2953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
          2012 & 26785 & 26786 & 2777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
          2013 & 28140 & 28144 & 2813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
          addlinespace
          2014 & 23603 & 23612 & 2916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
          2015 & 20968 & 20979 & 2799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
          2016 & 17190 & 17792 & 2449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
          2017 & 17559 & 18540 & 2410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
          2018 & 16071 & 17156 & 2243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
          addlinespace
          Overall &441636 &468861 & & -0.187 & -0.187 \

          end{longtable}
          end{landscape}
          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 8 hours ago









          MicoMico

          298k32 gold badges410 silver badges811 bronze badges




          298k32 gold badges410 silver badges811 bronze badges

























              2














              Here is my suggestion using dcolumn to align the numbers with respect to . or ,, an abbreviation for "Shareholder" and some linebreaks in the column headers:



              enter image description here



              documentclass[10pt,a4paper]{article}
              usepackage{booktabs}
              usepackage[singlelinecheck=false, font={large, bf}]{caption}
              usepackage{array,lscape,longtable}
              usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
              usepackage{siunitx,amsmath,dcolumn}
              usepackage{makecell}
              newcolumntype{d}[1]{D{,}{,}{#1}}
              newcolumntype{e}[1]{D{.}{.}{#1}}
              begin{document}
              begin{landscape}
              vspace*{-1.5cm}

              begin{longtable}{@{}c
              d{3,3}
              d{3,3}
              d{1,3}
              e{-1,3}
              e{-1,3}
              e{1,3}
              e{2,3}
              e{4,3}
              e{4,3}
              e{-1,3}
              e{-1.3}@{}}
              caption{large{Summary Statistics}}label{tab:addlabel}\
              toprule
              multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
              multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
              multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
              multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
              }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
              multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
              endfirsthead
              caption{large{Summary Statistics - continued}}\
              toprule
              multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
              multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
              multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
              multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
              }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
              multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
              endhead
              midrule
              multicolumn{12}{r}{footnotesizeitshape
              Continue on the next page}
              endfoot
              bottomrule
              multicolumn{12}{l}{SH = Shareholder}
              endlastfoot
              1994 & 2,822 & 3,531 & 1,392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
              1995 & 3,766 & 4,724 & 1,631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
              1996 & 4,993 & 6,114 & 2,118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
              1997 & 5,814 & 6,999 & 2,350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
              1998 & 7,317 & 8,800 & 2,685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
              1999 & 10,716 & 12,459 & 3,056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
              2000 & 20,588 & 23,242 & 3,786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
              2001 & 17,613 & 19,787 & 3,194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
              2002 & 15,837 & 17,773 & 2,976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
              2003 & 14,205 & 15,989 & 2,584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
              2004 & 18,017 & 20,370 & 3,197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
              2005 & 17,743 & 19,976 & 3,145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
              2006 & 19,013 & 21,275 & 3,200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
              2007 & 23,753 & 25,662 & 3,407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
              2008 & 30,537 & 30,565 & 3,292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
              2009 & 22,468 & 22,469 & 2,398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
              2010 & 27,574 & 27,573 & 2,789 & -0.216 & -0.215 & 2.941 & 39.861 & 1575.958 & 1894.168 & -0.863 & -0.092 \
              2011 & 28,544 & 28,544 & 2,953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
              2012 & 26,785 & 26,786 & 2,777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
              2013 & 28,140 & 28,144 & 2,813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
              2014 & 23,603 & 23,612 & 2,916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
              2015 & 20,968 & 20,979 & 2,799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
              2016 & 17,190 & 17,792 & 2,449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
              2017 & 17,559 & 18,540 & 2,410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
              2018 & 16,071 & 17,156 & 2,243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
              Overall & 441,636 & 468,861 & & -0.187 & -0.187 & & & & & & \ bottomrule
              end{longtable}
              end{landscape}


              end{document}





              share|improve this answer



















              • 2





                I suspect the the , (comma) characters are not decimal markers but thousands-separators. Maybe the OP will clarify what the commas denote.

                – Mico
                8 hours ago
















              2














              Here is my suggestion using dcolumn to align the numbers with respect to . or ,, an abbreviation for "Shareholder" and some linebreaks in the column headers:



              enter image description here



              documentclass[10pt,a4paper]{article}
              usepackage{booktabs}
              usepackage[singlelinecheck=false, font={large, bf}]{caption}
              usepackage{array,lscape,longtable}
              usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
              usepackage{siunitx,amsmath,dcolumn}
              usepackage{makecell}
              newcolumntype{d}[1]{D{,}{,}{#1}}
              newcolumntype{e}[1]{D{.}{.}{#1}}
              begin{document}
              begin{landscape}
              vspace*{-1.5cm}

              begin{longtable}{@{}c
              d{3,3}
              d{3,3}
              d{1,3}
              e{-1,3}
              e{-1,3}
              e{1,3}
              e{2,3}
              e{4,3}
              e{4,3}
              e{-1,3}
              e{-1.3}@{}}
              caption{large{Summary Statistics}}label{tab:addlabel}\
              toprule
              multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
              multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
              multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
              multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
              }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
              multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
              endfirsthead
              caption{large{Summary Statistics - continued}}\
              toprule
              multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
              multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
              multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
              multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
              }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
              multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
              endhead
              midrule
              multicolumn{12}{r}{footnotesizeitshape
              Continue on the next page}
              endfoot
              bottomrule
              multicolumn{12}{l}{SH = Shareholder}
              endlastfoot
              1994 & 2,822 & 3,531 & 1,392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
              1995 & 3,766 & 4,724 & 1,631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
              1996 & 4,993 & 6,114 & 2,118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
              1997 & 5,814 & 6,999 & 2,350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
              1998 & 7,317 & 8,800 & 2,685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
              1999 & 10,716 & 12,459 & 3,056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
              2000 & 20,588 & 23,242 & 3,786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
              2001 & 17,613 & 19,787 & 3,194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
              2002 & 15,837 & 17,773 & 2,976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
              2003 & 14,205 & 15,989 & 2,584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
              2004 & 18,017 & 20,370 & 3,197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
              2005 & 17,743 & 19,976 & 3,145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
              2006 & 19,013 & 21,275 & 3,200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
              2007 & 23,753 & 25,662 & 3,407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
              2008 & 30,537 & 30,565 & 3,292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
              2009 & 22,468 & 22,469 & 2,398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
              2010 & 27,574 & 27,573 & 2,789 & -0.216 & -0.215 & 2.941 & 39.861 & 1575.958 & 1894.168 & -0.863 & -0.092 \
              2011 & 28,544 & 28,544 & 2,953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
              2012 & 26,785 & 26,786 & 2,777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
              2013 & 28,140 & 28,144 & 2,813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
              2014 & 23,603 & 23,612 & 2,916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
              2015 & 20,968 & 20,979 & 2,799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
              2016 & 17,190 & 17,792 & 2,449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
              2017 & 17,559 & 18,540 & 2,410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
              2018 & 16,071 & 17,156 & 2,243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
              Overall & 441,636 & 468,861 & & -0.187 & -0.187 & & & & & & \ bottomrule
              end{longtable}
              end{landscape}


              end{document}





              share|improve this answer



















              • 2





                I suspect the the , (comma) characters are not decimal markers but thousands-separators. Maybe the OP will clarify what the commas denote.

                – Mico
                8 hours ago














              2












              2








              2







              Here is my suggestion using dcolumn to align the numbers with respect to . or ,, an abbreviation for "Shareholder" and some linebreaks in the column headers:



              enter image description here



              documentclass[10pt,a4paper]{article}
              usepackage{booktabs}
              usepackage[singlelinecheck=false, font={large, bf}]{caption}
              usepackage{array,lscape,longtable}
              usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
              usepackage{siunitx,amsmath,dcolumn}
              usepackage{makecell}
              newcolumntype{d}[1]{D{,}{,}{#1}}
              newcolumntype{e}[1]{D{.}{.}{#1}}
              begin{document}
              begin{landscape}
              vspace*{-1.5cm}

              begin{longtable}{@{}c
              d{3,3}
              d{3,3}
              d{1,3}
              e{-1,3}
              e{-1,3}
              e{1,3}
              e{2,3}
              e{4,3}
              e{4,3}
              e{-1,3}
              e{-1.3}@{}}
              caption{large{Summary Statistics}}label{tab:addlabel}\
              toprule
              multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
              multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
              multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
              multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
              }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
              multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
              endfirsthead
              caption{large{Summary Statistics - continued}}\
              toprule
              multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
              multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
              multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
              multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
              }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
              multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
              endhead
              midrule
              multicolumn{12}{r}{footnotesizeitshape
              Continue on the next page}
              endfoot
              bottomrule
              multicolumn{12}{l}{SH = Shareholder}
              endlastfoot
              1994 & 2,822 & 3,531 & 1,392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
              1995 & 3,766 & 4,724 & 1,631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
              1996 & 4,993 & 6,114 & 2,118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
              1997 & 5,814 & 6,999 & 2,350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
              1998 & 7,317 & 8,800 & 2,685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
              1999 & 10,716 & 12,459 & 3,056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
              2000 & 20,588 & 23,242 & 3,786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
              2001 & 17,613 & 19,787 & 3,194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
              2002 & 15,837 & 17,773 & 2,976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
              2003 & 14,205 & 15,989 & 2,584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
              2004 & 18,017 & 20,370 & 3,197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
              2005 & 17,743 & 19,976 & 3,145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
              2006 & 19,013 & 21,275 & 3,200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
              2007 & 23,753 & 25,662 & 3,407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
              2008 & 30,537 & 30,565 & 3,292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
              2009 & 22,468 & 22,469 & 2,398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
              2010 & 27,574 & 27,573 & 2,789 & -0.216 & -0.215 & 2.941 & 39.861 & 1575.958 & 1894.168 & -0.863 & -0.092 \
              2011 & 28,544 & 28,544 & 2,953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
              2012 & 26,785 & 26,786 & 2,777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
              2013 & 28,140 & 28,144 & 2,813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
              2014 & 23,603 & 23,612 & 2,916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
              2015 & 20,968 & 20,979 & 2,799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
              2016 & 17,190 & 17,792 & 2,449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
              2017 & 17,559 & 18,540 & 2,410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
              2018 & 16,071 & 17,156 & 2,243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
              Overall & 441,636 & 468,861 & & -0.187 & -0.187 & & & & & & \ bottomrule
              end{longtable}
              end{landscape}


              end{document}





              share|improve this answer













              Here is my suggestion using dcolumn to align the numbers with respect to . or ,, an abbreviation for "Shareholder" and some linebreaks in the column headers:



              enter image description here



              documentclass[10pt,a4paper]{article}
              usepackage{booktabs}
              usepackage[singlelinecheck=false, font={large, bf}]{caption}
              usepackage{array,lscape,longtable}
              usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
              usepackage{siunitx,amsmath,dcolumn}
              usepackage{makecell}
              newcolumntype{d}[1]{D{,}{,}{#1}}
              newcolumntype{e}[1]{D{.}{.}{#1}}
              begin{document}
              begin{landscape}
              vspace*{-1.5cm}

              begin{longtable}{@{}c
              d{3,3}
              d{3,3}
              d{1,3}
              e{-1,3}
              e{-1,3}
              e{1,3}
              e{2,3}
              e{4,3}
              e{4,3}
              e{-1,3}
              e{-1.3}@{}}
              caption{large{Summary Statistics}}label{tab:addlabel}\
              toprule
              multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
              multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
              multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
              multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
              }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
              multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
              endfirsthead
              caption{large{Summary Statistics - continued}}\
              toprule
              multicolumn{1}{c}{Year}& multicolumn{2}{c}{Observations}&multicolumn{1}{c}{No.Firms}&multicolumn{2}{c}{Mean}& multicolumn{2}{c}{MarShare$} & multicolumn{2}{c}{MarShare#} & multicolumn{2}{c}{Mark}\ cmidrule(lr){2-3} cmidrule(lr){5-6} cmidrule(lr){7-8} cmidrule(lr){9-10} cmidrule(l){11-12}
              multicolumn{1}{c}{}& multicolumn{1}{c}{(No SH)}& multicolumn{1}{c}{(SH)}&multicolumn{1}{c}{(No SH)}&multicolumn{1}{c}{makecell[cc]{NPV \(No SH)}} &multicolumn{1}{c}{makecell[cc]{NPR \(SH)}}&
              multicolumn{1}{c}{Buy(B)}&multicolumn{1}{c}{Sell (B)} & multicolumn{1}{c}{makecell[cc]{Buy\ (000,000)}}&multicolumn{1}{c}{makecell[cc]{Sell\(000,000)}} & multicolumn{1}{c}{NPV} & multicolumn{1}{c}{NPR}\
              multicolumn{1}{c}{}& multicolumn{1}{c}{(1)
              }& multicolumn{1}{c}{(2)}&multicolumn{1}{c}{(3)}&multicolumn{1}{c}{(4)} &multicolumn{1}{c}{(5)}&
              multicolumn{1}{c}{(6)}&multicolumn{1}{c}{(7)} & multicolumn{1}{c}{(8)}&multicolumn{1}{c}{(9)}&multicolumn{1}{c}{(10)}&multicolumn{1}{c}{(11)}\ midrule
              endhead
              midrule
              multicolumn{12}{r}{footnotesizeitshape
              Continue on the next page}
              endfoot
              bottomrule
              multicolumn{12}{l}{SH = Shareholder}
              endlastfoot
              1994 & 2,822 & 3,531 & 1,392 & -0.086 & -0.085 & 0.531 & 1.376 & 158.712 & 286.982 & -0.443 & -0.288 \
              1995 & 3,766 & 4,724 & 1,631 & -0.233 & -0.232 & 0.281 & 3.191 & 58.814 & 499.643 & -0.838 & -0.789 \
              1996 & 4,993 & 6,114 & 2,118 & -0.181 & -0.181 & 0.391 & 4.946 & 72.252 & 2006.669 & -0.854 & -0.930 \
              1997 & 5,814 & 6,999 & 2,350 & -0.211 & -0.210 & 0.577 & 6.954 & 80.721 & 1596.603 & -0.847 & -0.904 \
              1998 & 7,317 & 8,800 & 2,685 & 0.017 & 0.018 & 0.936 & 12.013 & 132.938 & 2244.135 & -0.855 & -0.888 \
              1999 & 10,716 & 12,459 & 3,056 & 0.069 & 0.069 & 1.755 & 17.062 & 172.648 & 1471.266 & -0.813 & -0.790 \
              2000 & 20,588 & 23,242 & 3,786 & -0.007 & -0.006 & 2.992 & 35.909 & 348.423 & 1635.910 & -0.846 & -0.649 \
              2001 & 17,613 & 19,787 & 3,194 & -0.149 & -0.149 & 1.531 & 21.781 & 261.413 & 1383.436 & -0.869 & -0.682 \
              2002 & 15,837 & 17,773 & 2,976 & -0.105 & -0.105 & 1.229 & 14.055 & 227.652 & 973.902 & -0.839 & -0.621 \
              2003 & 14,205 & 15,989 & 2,584 & -0.241 & -0.241 & 1.060 & 18.975 & 114.725 & 1035.963 & -0.894 & -0.801 \
              2004 & 18,017 & 20,370 & 3,197 & -0.246 & -0.246 & 1.043 & 21.405 & 130.550 & 1093.540 & -0.907 & -0.787 \
              2005 & 17,743 & 19,976 & 3,145 & -0.231 & -0.230 & 1.924 & 20.957 & 214.510 & 1029.413 & -0.832 & -0.655 \
              2006 & 19,013 & 21,275 & 3,200 & -0.259 & -0.259 & 1.969 & 27.839 & 126.122 & 1096.229 & -0.868 & -0.794 \
              2007 & 23,753 & 25,662 & 3,407 & -0.160 & -0.160 & 3.210 & 31.636 & 250.604 & 1329.962 & -0.816 & -0.683 \
              2008 & 30,537 & 30,565 & 3,292 & -0.064 & -0.063 & 7.171 & 20.560 & 784.786 & 884.918 & -0.483 & -0.060 \
              2009 & 22,468 & 22,469 & 2,398 & -0.181 & -0.180 & 1.718 & 23.160 & 457.969 & 1058.823 & -0.862 & -0.396 \
              2010 & 27,574 & 27,573 & 2,789 & -0.216 & -0.215 & 2.941 & 39.861 & 1575.958 & 1894.168 & -0.863 & -0.092 \
              2011 & 28,544 & 28,544 & 2,953 & -0.183 & -0.183 & 3.409 & 43.146 & 351.198 & 2013.673 & -0.854 & -0.703 \
              2012 & 26,785 & 26,786 & 2,777 & -0.234 & -0.233 & 4.890 & 49.250 & 465.384 & 1886.073 & -0.819 & -0.604 \
              2013 & 28,140 & 28,144 & 2,813 & -0.277 & -0.277 & 5.546 & 62.036 & 414.053 & 2194.972 & -0.836 & -0.683 \
              2014 & 23,603 & 23,612 & 2,916 & -0.264 & -0.264 & 2.624 & 40.205 & 186.281 & 1398.489 & -0.877 & -0.765 \
              2015 & 20,968 & 20,979 & 2,799 & -0.241 & -0.240 & 2.779 & 37.524 & 179.134 & 1184.230 & -0.862 & -0.737 \
              2016 & 17,190 & 17,792 & 2,449 & -0.286 & -0.286 & 3.140 & 33.824 & 155.227 & 747.809 & -0.830 & -0.656 \
              2017 & 17,559 & 18,540 & 2,410 & -0.330 & -0.330 & 2.101 & 43.482 & 111.983 & 963.327 & -0.908 & -0.792 \
              2018 & 16,071 & 17,156 & 2,243 & -0.289 & -0.289 & 1.931 & 31.389 & 97.476 & 572.353 & -0.884 & -0.709 \
              Overall & 441,636 & 468,861 & & -0.187 & -0.187 & & & & & & \ bottomrule
              end{longtable}
              end{landscape}


              end{document}






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 8 hours ago









              leandriisleandriis

              16.8k1 gold badge11 silver badges36 bronze badges




              16.8k1 gold badge11 silver badges36 bronze badges








              • 2





                I suspect the the , (comma) characters are not decimal markers but thousands-separators. Maybe the OP will clarify what the commas denote.

                – Mico
                8 hours ago














              • 2





                I suspect the the , (comma) characters are not decimal markers but thousands-separators. Maybe the OP will clarify what the commas denote.

                – Mico
                8 hours ago








              2




              2





              I suspect the the , (comma) characters are not decimal markers but thousands-separators. Maybe the OP will clarify what the commas denote.

              – Mico
              8 hours ago





              I suspect the the , (comma) characters are not decimal markers but thousands-separators. Maybe the OP will clarify what the commas denote.

              – Mico
              8 hours ago











              0














              I am posting the way I solved the problem.



              documentclass[10pt,a4paper]{article}
              usepackage{booktabs}
              usepackage[singlelinecheck=false, font={large, bf}]{caption}
              usepackage{array,lscape,longtable}
              usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
              usepackage{siunitx,amsmath,dcolumn}
              newcolumntype{.}[1]{D{.}{.}{2.4}}
              newcolumntype{,}[1]{D{,}{,}{2.4}}
              begin{document}
              begin{landscape}
              vspace*{-1.5cm}
              setlength{tabcolsep}{5pt}
              begin{longtable}{cc,c,c.c.c.c.c.c.c.c.c.c.c}


              I kept all other codes intact.
              enter image description here






              share|improve this answer








              New contributor



              veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
























                0














                I am posting the way I solved the problem.



                documentclass[10pt,a4paper]{article}
                usepackage{booktabs}
                usepackage[singlelinecheck=false, font={large, bf}]{caption}
                usepackage{array,lscape,longtable}
                usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
                usepackage{siunitx,amsmath,dcolumn}
                newcolumntype{.}[1]{D{.}{.}{2.4}}
                newcolumntype{,}[1]{D{,}{,}{2.4}}
                begin{document}
                begin{landscape}
                vspace*{-1.5cm}
                setlength{tabcolsep}{5pt}
                begin{longtable}{cc,c,c.c.c.c.c.c.c.c.c.c.c}


                I kept all other codes intact.
                enter image description here






                share|improve this answer








                New contributor



                veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                  0












                  0








                  0







                  I am posting the way I solved the problem.



                  documentclass[10pt,a4paper]{article}
                  usepackage{booktabs}
                  usepackage[singlelinecheck=false, font={large, bf}]{caption}
                  usepackage{array,lscape,longtable}
                  usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
                  usepackage{siunitx,amsmath,dcolumn}
                  newcolumntype{.}[1]{D{.}{.}{2.4}}
                  newcolumntype{,}[1]{D{,}{,}{2.4}}
                  begin{document}
                  begin{landscape}
                  vspace*{-1.5cm}
                  setlength{tabcolsep}{5pt}
                  begin{longtable}{cc,c,c.c.c.c.c.c.c.c.c.c.c}


                  I kept all other codes intact.
                  enter image description here






                  share|improve this answer








                  New contributor



                  veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  I am posting the way I solved the problem.



                  documentclass[10pt,a4paper]{article}
                  usepackage{booktabs}
                  usepackage[singlelinecheck=false, font={large, bf}]{caption}
                  usepackage{array,lscape,longtable}
                  usepackage[a4paper, total={6in,10in},top=2cm]{geometry}
                  usepackage{siunitx,amsmath,dcolumn}
                  newcolumntype{.}[1]{D{.}{.}{2.4}}
                  newcolumntype{,}[1]{D{,}{,}{2.4}}
                  begin{document}
                  begin{landscape}
                  vspace*{-1.5cm}
                  setlength{tabcolsep}{5pt}
                  begin{longtable}{cc,c,c.c.c.c.c.c.c.c.c.c.c}


                  I kept all other codes intact.
                  enter image description here







                  share|improve this answer








                  New contributor



                  veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share|improve this answer



                  share|improve this answer






                  New contributor



                  veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  answered 8 hours ago









                  veryBigmanveryBigman

                  656 bronze badges




                  656 bronze badges




                  New contributor



                  veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.




                  New contributor




                  veryBigman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.
























                      veryBigman is a new contributor. Be nice, and check out our Code of Conduct.










                      draft saved

                      draft discarded


















                      veryBigman is a new contributor. Be nice, and check out our Code of Conduct.













                      veryBigman is a new contributor. Be nice, and check out our Code of Conduct.












                      veryBigman 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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f501149%2fhow-to-apply-dcolumn-in-my-longtable-case-need-help%23new-answer', 'question_page');
                      }
                      );

                      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







                      Popular posts from this blog

                      Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                      Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                      Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...