generated from typst-community/typst-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #4 from JamesxX/2-expose-footer-functionality
Add `header` and `footer` as arguments on `.make(..args)`
- Loading branch information
Showing
16 changed files
with
139 additions
and
87 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,23 @@ | ||
#import "../ledger.typ": * | ||
#set text(size: 11pt) | ||
#set page(height: 5cm, margin: 1em) | ||
#dining-table.make(columns: example, | ||
footer: none, | ||
data: data, | ||
notes: dining-table.note.display-list | ||
) | ||
|
||
#v(0.5cm) | ||
|
||
#dining-table.make(columns: example, | ||
footer: ( | ||
table.cell( | ||
colspan: 3, fill: none, | ||
align(right, strong(smallcaps[total])), | ||
), | ||
[#{7*100}],[00], | ||
[#{7*99}],[00] | ||
), | ||
data: data, | ||
notes: dining-table.note.display-list | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,13 @@ | ||
#import "../ledger.typ": * | ||
#set text(size: 11pt) | ||
#set page(height: 3.5cm, margin: 1em) | ||
#dining-table.make(columns: example, | ||
header: none, | ||
data: data, | ||
notes: dining-table.note.display-list | ||
) | ||
|
||
#dining-table.make(columns: example, | ||
data: data, | ||
notes: dining-table.note.display-list | ||
) |
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,80 @@ | ||
#import "/src/lib.typ" as dining-table | ||
|
||
#let data = ( | ||
( | ||
date: datetime.today(), | ||
particulars: lorem(05), | ||
ledger: [JRS123] + dining-table.note.make[Hello World], | ||
amount: (unit: $100$, decimal: $00$), | ||
total: (unit: $99$, decimal: $00$), | ||
), | ||
)*7 | ||
|
||
#import "@preview/typpuccino:0.1.0" | ||
#let bg-fill-1 = typpuccino.latte.base | ||
#let bg-fill-2 = typpuccino.latte.mantle | ||
|
||
#let example = ( | ||
( | ||
key: "date", | ||
header: align(left)[Date], | ||
display: (it)=>it.display(auto), | ||
fill: bg-fill-1, | ||
align: start, | ||
gutter: 0.5em, | ||
), | ||
( | ||
key: "particulars", | ||
header: text(tracking: 5pt)[Particulars], | ||
width: 1fr, | ||
gutter: 0.5em, | ||
), | ||
( | ||
key: "ledger", | ||
header: [Ledger], | ||
fill: bg-fill-2, | ||
width: 2cm, | ||
gutter: 0.5em, | ||
), | ||
( | ||
header: align(center)[Amount], | ||
fill: bg-fill-1, | ||
gutter: 0.5em, | ||
hline: arguments(stroke: dining-table.lightrule), | ||
children: ( | ||
( | ||
key: "amount.unit", | ||
header: align(left)[£], | ||
width: 5em, | ||
align: right, | ||
vline: arguments(stroke: dining-table.lightrule), | ||
gutter: 0em, | ||
), | ||
( | ||
key: "amount.decimal", | ||
header: align(right, text(number-type: "old-style")[.00]), | ||
align: left | ||
), | ||
) | ||
), | ||
( | ||
header: align(center)[Total], | ||
gutter: 0.5em, | ||
hline: arguments(stroke: dining-table.lightrule), | ||
children: ( | ||
( | ||
key: "total.unit", | ||
header: align(left)[£], | ||
width: 5em, | ||
align: right, | ||
vline: arguments(stroke: dining-table.lightrule), | ||
gutter: 0em, | ||
), | ||
( | ||
key: "total.decimal", | ||
header: align(right, text(number-type: "old-style")[.00]), | ||
align: left | ||
), | ||
) | ||
), | ||
) |
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