Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. documentclass{scrartcl}
  2. usepackage{array}
  3. usepackage{ragged2e}
  4. usepackage{booktabs}
  5. usepackage{threeparttable}
  6. usepackage{siunitx}
  7. usepackage{xparse}
  8. usepackage{float}
  9.  
  10. floatstyle{komaabove}
  11. restylefloat{table}
  12. newcolumntype{L}[1]{>{RaggedRighthspace{0pt}}p{dimexpr #1linewidth-2tabcolsep}}
  13. newcolumntype{C}[1]{>{Centeringhspace{0pt}}p{dimexpr #1linewidth-2tabcolsep}}
  14. newcommand{uhrule}{midrule[heavyrulewidth]}
  15.  
  16. DeclareExpandableDocumentCommand{mcc}{o o m}{%
  17. IfNoValueTF{#1}
  18. {multicolumn{1}{c}{#3}}
  19. {IfNoValueTF{#2}
  20. {multicolumn{#1}{c}{#3}}
  21. {multicolumn{#1}{C{#2}}{#3}}
  22. }
  23. }
  24.  
  25. begin{document}
  26. begin{table}[t]
  27. centering
  28. begin{threeparttable}
  29. begin{tabular}{L{0.15}
  30. S[table-format=6]
  31. S[table-format=5]
  32. S[table-format=2.1,
  33. table-space-text-post = {**}]
  34. }
  35. toprule
  36. Race
  37. & mcc[1][0.20]{Populationtnote{b}}
  38. & mcc[1][0.20]{Homicides}
  39. & mcc[1][0.10]{Ratetnote{c}} \ uhrule
  40.  
  41. Blacktnote{d} & 29986 & 12114 & 40.5* \
  42. White & 199686 & 12153 & 6.1 \
  43. Othertnote{e} & 19038 & 635 & 3.3** \ midrule
  44. Total & 248710 & 24932 & 10.0 \
  45. bottomrule
  46. end{tabular}
  47. begin{tablenotes}[flushleft]
  48. item[a] Data developped from the Statistical Abstract of the United States -- 1993.
  49. item[b] Population in $1000$s.
  50. item[c] Rate per $100,000$ in the population.
  51. item[d] The rate for emph{Black} males was 69.2, for emph{White} males it was 9.0.
  52. item[e] About one-half of the emph{Other} category was composed of Asian Americans and Native Americans.
  53. end{tablenotes}
  54. $*p<.001$, two-tailed test. $**p<0.05$, two-tailed test.
  55. caption{Homicides by race of the victim in 1993 in the USA.tnote{a}}
  56. label{tab5}
  57. end{threeparttable}
  58. end{table}
  59. end{document}
  60.  
  61. documentclass{scrartcl}
  62. usepackage{array}
  63. usepackage{ragged2e}
  64. usepackage{booktabs}
  65. usepackage{threeparttable}
  66. usepackage{siunitx}
  67. usepackage{xparse}
  68. usepackage{float}
  69.  
  70. floatstyle{komaabove}
  71. restylefloat{table}
  72. newcolumntype{L}[1]{>{RaggedRighthspace{0pt}}p{dimexpr #1linewidth-2tabcolsep}}
  73. newcolumntype{C}[1]{>{Centeringhspace{0pt}}p{dimexpr #1linewidth-2tabcolsep}}
  74. newcommand{uhrule}{midrule[heavyrulewidth]}
  75.  
  76. DeclareExpandableDocumentCommand{mcc}{o o m}{%
  77. IfNoValueTF{#1}
  78. {multicolumn{1}{c}{#3}}
  79. {IfNoValueTF{#2}
  80. {multicolumn{#1}{c}{#3}}
  81. {multicolumn{#1}{C{#2}}{#3}}
  82. }
  83. }
  84.  
  85. begin{document}
  86. begin{table}[t]
  87. centering
  88. begin{threeparttable}
  89. caption{Homicides by race of the victim in 1993 in the USA.tnote{a}}
  90. label{tab5}
  91.  
  92. begin{tabular}{L{0.15}
  93. S[table-format=6]
  94. S[table-format=5]
  95. S[table-format=2.1,
  96. table-space-text-post = {**}]
  97. }
  98. toprule
  99. Race
  100. & mcc[1][0.20]{Populationtnote{b}}
  101. & mcc[1][0.20]{Homicides}
  102. & mcc[1][0.10]{Ratetnote{c}} \ uhrule
  103.  
  104. Blacktnote{d} & 29986 & 12114 & 40.5* \
  105. White & 199686 & 12153 & 6.1 \
  106. Othertnote{e} & 19038 & 635 & 3.3** \ midrule
  107. Total & 248710 & 24932 & 10.0 \
  108. bottomrule
  109. end{tabular}
  110. begin{tablenotes}[flushleft]
  111. item[a] Data developped from the Statistical Abstract of the United States -- 1993.
  112. item[b] Population in $1000$s.
  113. item[c] Rate per $100,000$ in the population.
  114. item[d] The rate for emph{Black} males was 69.2, for emph{White} males it was 9.0.
  115. item[e] About one-half of the emph{Other} category was composed of Asian Americans and Native Americans.
  116. end{tablenotes}
  117. $*p<.001$, two-tailed test. $**p<0.05$, two-tailed test.
  118. end{threeparttable}
  119. end{table}
  120. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement