-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57f4ab0
commit 6edeefa
Showing
10 changed files
with
223 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
\begin{table} | ||
\centering | ||
\begin{tblr}[ %% tabularray outer open | ||
] %% tabularray outer close | ||
{ %% tabularray inner open | ||
colspec={Q[]Q[]Q[]Q[]Q[]}, | ||
column{1}={halign=c,}, | ||
cell{1}{1}={}{halign=c,}, | ||
column{2}={halign=c,}, | ||
cell{1}{2}={}{halign=c,}, | ||
column{3}={halign=l,}, | ||
cell{1}{3}={}{halign=l,}, | ||
column{4}={halign=l,}, | ||
cell{1}{4}={}{halign=l,}, | ||
column{5}={halign=r,}, | ||
cell{1}{5}={}{halign=r,}, | ||
} %% tabularray inner close | ||
\toprule | ||
mpg & cyl & disp & hp & drat \\ \midrule %% TinyTableHeader | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
22.8 & 4 & 108 & 93 & 3.85 \\ | ||
21.4 & 6 & 258 & 110 & 3.08 \\ | ||
\bottomrule | ||
\end{tblr} | ||
\end{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,25 @@ | ||
|
||
\begin{table} | ||
\centering | ||
\begin{tblr}[ %% tabularray outer open | ||
] %% tabularray outer close | ||
{ %% tabularray inner open | ||
colspec={Q[]Q[]Q[]Q[]Q[]}, | ||
cell{2}{1}={}{,fg=orange,}, | ||
cell{3}{1}={}{,fg=orange,}, | ||
cell{2}{2}={}{,fg=orange,}, | ||
cell{3}{2}={}{,fg=orange,}, | ||
cell{2}{3}={}{,fg=orange,}, | ||
cell{3}{3}={}{,fg=orange,}, | ||
cell{2}{4}={}{,fg=orange,}, | ||
cell{3}{4}={}{,fg=orange,}, | ||
} %% tabularray inner close | ||
\toprule | ||
mpg & cyl & disp & hp & drat \\ \midrule %% TinyTableHeader | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
22.8 & 4 & 108 & 93 & 3.85 \\ | ||
21.4 & 6 & 258 & 110 & 3.08 \\ | ||
\bottomrule | ||
\end{tblr} | ||
\end{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,21 @@ | ||
|
||
\begin{table} | ||
\centering | ||
\begin{tblr}[ %% tabularray outer open | ||
] %% tabularray outer close | ||
{ %% tabularray inner open | ||
colspec={Q[]Q[]Q[]Q[]Q[]}, | ||
column{1}={,fg=orange,}, | ||
column{2}={,fg=orange,}, | ||
column{3}={,fg=orange,}, | ||
column{4}={,fg=orange,}, | ||
} %% tabularray inner close | ||
\toprule | ||
mpg & cyl & disp & hp & drat \\ \midrule %% TinyTableHeader | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
22.8 & 4 & 108 & 93 & 3.85 \\ | ||
21.4 & 6 & 258 & 110 & 3.08 \\ | ||
\bottomrule | ||
\end{tblr} | ||
\end{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,18 @@ | ||
|
||
\begin{table} | ||
\centering | ||
\begin{tblr}[ %% tabularray outer open | ||
] %% tabularray outer close | ||
{ %% tabularray inner open | ||
colspec={Q[]Q[]Q[]Q[]Q[]}, | ||
row{even}={bg=black!5!white}, | ||
} %% tabularray inner close | ||
\toprule | ||
mpg & cyl & disp & hp & drat \\ \midrule %% TinyTableHeader | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
22.8 & 4 & 108 & 93 & 3.85 \\ | ||
21.4 & 6 & 258 & 110 & 3.08 \\ | ||
\bottomrule | ||
\end{tblr} | ||
\end{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,16 @@ | ||
|
||
\begin{table} | ||
\centering | ||
\begin{tblr}[ %% tabularray outer open | ||
] %% tabularray outer close | ||
{ %% tabularray inner open | ||
colspec={Q[]Q[]Q[]Q[]Q[]}, | ||
} %% tabularray inner close | ||
\toprule | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
22.8 & 4 & 108 & 93 & 3.85 \\ | ||
21.4 & 6 & 258 & 110 & 3.08 \\ | ||
\bottomrule | ||
\end{tblr} | ||
\end{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,21 @@ | ||
|
||
\begin{table} | ||
\centering | ||
\begin{tblr}[ %% tabularray outer open | ||
] %% tabularray outer close | ||
{ %% tabularray inner open | ||
colspec={Q[]Q[]Q[]Q[]Q[]}, | ||
row{2}={,fg=orange,}, | ||
row{3}={,fg=orange,}, | ||
row{4}={,fg=orange,}, | ||
row{5}={,fg=orange,}, | ||
} %% tabularray inner close | ||
\toprule | ||
mpg & cyl & disp & hp & drat \\ \midrule %% TinyTableHeader | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
22.8 & 4 & 108 & 93 & 3.85 \\ | ||
21.4 & 6 & 258 & 110 & 3.08 \\ | ||
\bottomrule | ||
\end{tblr} | ||
\end{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,17 @@ | ||
|
||
\begin{table} | ||
\centering | ||
\begin{tblr}[ %% tabularray outer open | ||
] %% tabularray outer close | ||
{ %% tabularray inner open | ||
hlines,vlines, | ||
colspec={Q[]Q[]Q[]Q[]Q[]}, | ||
hlines={},vlines={}, | ||
} %% tabularray inner close | ||
mpg & cyl & disp & hp & drat \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
22.8 & 4 & 108 & 93 & 3.85 \\ | ||
21.4 & 6 & 258 & 110 & 3.08 \\ | ||
\end{tblr} | ||
\end{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,18 @@ | ||
|
||
\begin{table} | ||
\centering | ||
\begin{tblr}[ %% tabularray outer open | ||
] %% tabularray outer close | ||
{ %% tabularray inner open | ||
colspec={Q[]Q[]Q[]Q[]Q[]}, | ||
row{even}={bg=black!5!white}, | ||
} %% tabularray inner close | ||
\toprule | ||
mpg & cyl & disp & hp & drat \\ \midrule %% TinyTableHeader | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
22.8 & 4 & 108 & 93 & 3.85 \\ | ||
21.4 & 6 & 258 & 110 & 3.08 \\ | ||
\bottomrule | ||
\end{tblr} | ||
\end{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,15 @@ | ||
|
||
\begin{table} | ||
\centering | ||
\begin{tblr}[ %% tabularray outer open | ||
] %% tabularray outer close | ||
{ %% tabularray inner open | ||
colspec={Q[]Q[]Q[]Q[]Q[]}, | ||
} %% tabularray inner close | ||
mpg & cyl & disp & hp & drat \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
21 & 6 & 160 & 110 & 3.9 \\ | ||
22.8 & 4 & 108 & 93 & 3.85 \\ | ||
21.4 & 6 & 258 & 110 & 3.08 \\ | ||
\end{tblr} | ||
\end{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,45 @@ | ||
source("helpers.R") | ||
using("tinysnapshot") | ||
|
||
x <- mtcars[1:4, 1:5] | ||
|
||
expect_snapshot_print( | ||
tt(x, output = "latex", theme = "striped"), | ||
label = "latex-default") | ||
|
||
k <- x | ||
colnames(k) <- NULL | ||
expect_snapshot_print( | ||
tt(k, output = "latex"), | ||
label = "latex-nohead") | ||
|
||
# Align | ||
expect_snapshot_print( | ||
tt(x, output = "latex", align = "ccllr"), | ||
label = "latex-align") | ||
|
||
# Themes | ||
expect_snapshot_print( | ||
tt(x, output = "latex", theme = "striped"), | ||
label = "latex-theme_striped") | ||
|
||
expect_snapshot_print( | ||
tt(x, output = "latex", theme = "grid"), | ||
label = "latex-theme_grid") | ||
|
||
expect_snapshot_print( | ||
tt(x, output = "latex", theme = "void"), | ||
label = "latex-theme_void") | ||
|
||
# Styles | ||
expect_snapshot_print( | ||
tt(x, output = "latex") |> style_tt(i = 1:4, color = "orange"), | ||
label = "latex-row_color") | ||
|
||
expect_snapshot_print( | ||
tt(x, output = "latex") |> style_tt(j = 1:4, color = "orange"), | ||
label = "latex-col_color") | ||
|
||
expect_snapshot_print( | ||
tt(x, output = "latex") |> style_tt(i = 1:2, j = 1:4, color = "orange"), | ||
label = "latex-cell_color") |