-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from PumasAI/jk/sort-order-with-missing-groups
Sort order in `summarytable` and `listingtable` when groups are missing
- Loading branch information
Showing
8 changed files
with
270 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
\documentclass{article} | ||
\usepackage{threeparttable} | ||
\usepackage{multirow} | ||
\usepackage{booktabs} | ||
\begin{document} | ||
\begin{table}[!ht] | ||
\setlength\tabcolsep{0pt} | ||
\centering | ||
\begin{threeparttable} | ||
\begin{tabular}{@{\extracolsep{2ex}}*{4}{lccc}} | ||
\toprule | ||
& \multicolumn{3}{c}{\textbf{B}} \\ | ||
\cmidrule{2-4} | ||
& 2 & 4 & 8 \\ | ||
\textbf{A} & \multicolumn{3}{c}{\textbf{value}} \\ | ||
\midrule | ||
'a' & & 6 & \\ | ||
'b' & 4 & 5 & \\ | ||
'c' & 2 & 1 & 3 \\ | ||
\bottomrule | ||
\end{tabular} | ||
\end{threeparttable} | ||
\end{table} | ||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<table class="st-cb1156a1"> | ||
<style> | ||
.st-cb1156a1 { | ||
border: none; | ||
margin: 0 auto; | ||
padding: 0.25rem; | ||
border-collapse: separate; | ||
border-spacing: 0.85em 0.2em; | ||
line-height: 1.2em; | ||
} | ||
|
||
.st-cb1156a1 tr td { | ||
vertical-align: top; | ||
padding: 0; | ||
border: none; | ||
} | ||
|
||
.st-cb1156a1 br { | ||
line-height: 0em; | ||
margin: 0; | ||
} | ||
|
||
.st-cb1156a1 sub { | ||
line-height: 0; | ||
} | ||
|
||
.st-cb1156a1 sup { | ||
line-height: 0; | ||
} | ||
</style> | ||
<tr><td colspan="4" style="border-bottom: 1.5px solid black; padding: 0"></td></tr> | ||
<tr> | ||
<td style="text-align:center;"></td> | ||
<td colspan="3" style="font-weight:bold;border-bottom:1px solid black; padding-bottom: 0.25em;text-align:center;">B</td> | ||
</tr> | ||
<tr> | ||
<td style="text-align:center;"></td> | ||
<td style="text-align:center;">2</td> | ||
<td style="text-align:center;">4</td> | ||
<td style="text-align:center;">8</td> | ||
</tr> | ||
<tr> | ||
<td style="font-weight:bold;text-align:left;">A</td> | ||
<td colspan="3" style="font-weight:bold;text-align:center;">value</td> | ||
</tr> | ||
<tr><td colspan="4" style="border-bottom:1px solid black;padding:0"></td></tr> <tr> | ||
<td style="text-align:left;">'a'</td> | ||
<td style="text-align:center;"></td> | ||
<td style="text-align:center;">6</td> | ||
<td style="text-align:center;"></td> | ||
</tr> | ||
<tr> | ||
<td style="text-align:left;">'b'</td> | ||
<td style="text-align:center;">4</td> | ||
<td style="text-align:center;">5</td> | ||
<td style="text-align:center;"></td> | ||
</tr> | ||
<tr> | ||
<td style="text-align:left;">'c'</td> | ||
<td style="text-align:center;">2</td> | ||
<td style="text-align:center;">1</td> | ||
<td style="text-align:center;">3</td> | ||
</tr> | ||
<tr><td colspan="4" style="border-bottom: 1.5px solid black; padding: 0"></td></tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
#table( | ||
rows: 6, | ||
columns: 4, | ||
column-gutter: 0.25em, | ||
align: (left, center, center, center), | ||
stroke: none, | ||
table.hline(y: 0, stroke: 1pt), | ||
[], | ||
table.cell(colspan: 3)[*B*], | ||
table.hline(y: 1, start: 1, end: 4, stroke: 0.75pt), | ||
[], | ||
[2], | ||
[4], | ||
[8], | ||
[*A*], | ||
table.cell(colspan: 3)[*value*], | ||
table.hline(y: 3, stroke: 0.75pt), | ||
['a'], | ||
[], | ||
[6], | ||
[], | ||
['b'], | ||
[4], | ||
[5], | ||
[], | ||
['c'], | ||
[2], | ||
[1], | ||
[3], | ||
table.hline(y: 6, stroke: 1pt), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
\documentclass{article} | ||
\usepackage{threeparttable} | ||
\usepackage{multirow} | ||
\usepackage{booktabs} | ||
\begin{document} | ||
\begin{table}[!ht] | ||
\setlength\tabcolsep{0pt} | ||
\centering | ||
\begin{threeparttable} | ||
\begin{tabular}{@{\extracolsep{2ex}}*{5}{llccc}} | ||
\toprule | ||
& & \multicolumn{3}{c}{\textbf{B}} \\ | ||
\cmidrule{3-5} | ||
& & 2 & 4 & 8 \\ | ||
\textbf{A} & & \multicolumn{3}{c}{\textbf{value}} \\ | ||
\midrule | ||
'a' & \textbf{sum} & & 6 & \\ | ||
'b' & \textbf{sum} & 4 & 5 & \\ | ||
'c' & \textbf{sum} & 2 & 1 & 3 \\ | ||
\bottomrule | ||
\end{tabular} | ||
\end{threeparttable} | ||
\end{table} | ||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<table class="st-c751c4b8"> | ||
<style> | ||
.st-c751c4b8 { | ||
border: none; | ||
margin: 0 auto; | ||
padding: 0.25rem; | ||
border-collapse: separate; | ||
border-spacing: 0.85em 0.2em; | ||
line-height: 1.2em; | ||
} | ||
|
||
.st-c751c4b8 tr td { | ||
vertical-align: top; | ||
padding: 0; | ||
border: none; | ||
} | ||
|
||
.st-c751c4b8 br { | ||
line-height: 0em; | ||
margin: 0; | ||
} | ||
|
||
.st-c751c4b8 sub { | ||
line-height: 0; | ||
} | ||
|
||
.st-c751c4b8 sup { | ||
line-height: 0; | ||
} | ||
</style> | ||
<tr><td colspan="5" style="border-bottom: 1.5px solid black; padding: 0"></td></tr> | ||
<tr> | ||
<td style="text-align:center;"></td> | ||
<td style="text-align:center;"></td> | ||
<td colspan="3" style="font-weight:bold;border-bottom:1px solid black; padding-bottom: 0.25em;text-align:center;">B</td> | ||
</tr> | ||
<tr> | ||
<td style="text-align:center;"></td> | ||
<td style="text-align:center;"></td> | ||
<td style="text-align:center;">2</td> | ||
<td style="text-align:center;">4</td> | ||
<td style="text-align:center;">8</td> | ||
</tr> | ||
<tr> | ||
<td style="font-weight:bold;text-align:left;">A</td> | ||
<td style="text-align:center;"></td> | ||
<td colspan="3" style="font-weight:bold;text-align:center;">value</td> | ||
</tr> | ||
<tr><td colspan="5" style="border-bottom:1px solid black;padding:0"></td></tr> <tr> | ||
<td style="text-align:left;">'a'</td> | ||
<td style="font-weight:bold;text-align:left;">sum</td> | ||
<td style="text-align:center;"></td> | ||
<td style="text-align:center;">6</td> | ||
<td style="text-align:center;"></td> | ||
</tr> | ||
<tr> | ||
<td style="text-align:left;">'b'</td> | ||
<td style="font-weight:bold;text-align:left;">sum</td> | ||
<td style="text-align:center;">4</td> | ||
<td style="text-align:center;">5</td> | ||
<td style="text-align:center;"></td> | ||
</tr> | ||
<tr> | ||
<td style="text-align:left;">'c'</td> | ||
<td style="font-weight:bold;text-align:left;">sum</td> | ||
<td style="text-align:center;">2</td> | ||
<td style="text-align:center;">1</td> | ||
<td style="text-align:center;">3</td> | ||
</tr> | ||
<tr><td colspan="5" style="border-bottom: 1.5px solid black; padding: 0"></td></tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
#table( | ||
rows: 6, | ||
columns: 5, | ||
column-gutter: 0.25em, | ||
align: (left, left, center, center, center), | ||
stroke: none, | ||
table.hline(y: 0, stroke: 1pt), | ||
[], | ||
[], | ||
table.cell(colspan: 3)[*B*], | ||
table.hline(y: 1, start: 2, end: 5, stroke: 0.75pt), | ||
[], | ||
[], | ||
[2], | ||
[4], | ||
[8], | ||
[*A*], | ||
[], | ||
table.cell(colspan: 3)[*value*], | ||
table.hline(y: 3, stroke: 0.75pt), | ||
['a'], | ||
[*sum*], | ||
[], | ||
[6], | ||
[], | ||
['b'], | ||
[*sum*], | ||
[4], | ||
[5], | ||
[], | ||
['c'], | ||
[*sum*], | ||
[2], | ||
[1], | ||
[3], | ||
table.hline(y: 6, stroke: 1pt), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters