add commit in draft
This commit is contained in:
parent
3f3eb37339
commit
25342bd4b3
4 changed files with 19 additions and 3 deletions
|
@ -14,6 +14,8 @@ ln -s $(pwd) ~/.local/share/typst/packages/local/template-thesis-matisse/0.0.1
|
|||
|
||||
To generate a new project, run `typst init @local/template-thesis-matisse <directory>`
|
||||
|
||||
In draft mode, you can call typst with `--input commit=$(git rev-parse --short HEAD)` to display the current commit.
|
||||
|
||||
## Reference
|
||||
|
||||
- Inspired by [the thesis of Timothe Albouy](https://github.com/TimotheAlbouy/talb-thesis/tree/main), some code might be copied from it.
|
||||
|
|
|
@ -18,3 +18,12 @@
|
|||
body
|
||||
)
|
||||
])
|
||||
|
||||
#let highlight(fill: luma(230), content) = {
|
||||
block(
|
||||
inset: 8pt,
|
||||
radius: 4pt,
|
||||
fill: fill,
|
||||
content
|
||||
)
|
||||
}
|
||||
|
|
|
@ -36,7 +36,12 @@
|
|||
) = {
|
||||
assert-etablissements(university)
|
||||
|
||||
if draft {
|
||||
if draft {
|
||||
[== DRAFT - #title-en]
|
||||
// if typst was called with `--input commit=$(git rev-parse --short HEAD)`, add the current commit:
|
||||
if "commit" in sys.inputs {
|
||||
[Current version: commit #sys.inputs.commit \ \ ]
|
||||
}
|
||||
todos()
|
||||
} else {
|
||||
show-todos.update(false)
|
||||
|
@ -90,7 +95,7 @@
|
|||
// display last level-2 heading (current page included)
|
||||
let header-content = hydra(2, use-last: true,
|
||||
display: (_, it) => {
|
||||
if it.numbering == none [_ #it.body _ ]
|
||||
if it.numbering == none [_ #it.body _]
|
||||
else {
|
||||
let nb = counter(heading).at(it.location())
|
||||
let nb-fmt = numbering(
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#let todos() = context {
|
||||
if (todo-list.final().len() != 0) and (show-todos.get()) {
|
||||
pagebreak(weak: true)
|
||||
//pagebreak(weak: true)
|
||||
text(size: 2em, weight: "bold", fill:red)[TO-DOs]
|
||||
for t in todo-list.final() {
|
||||
let l = label(t.first())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue