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>`
 | 
					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
 | 
					## Reference
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Inspired by [the thesis of Timothe Albouy](https://github.com/TimotheAlbouy/talb-thesis/tree/main), some code might be copied from it.
 | 
					- 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
 | 
					    body
 | 
				
			||||||
  )
 | 
					  )
 | 
				
			||||||
])
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#let highlight(fill: luma(230), content) = {
 | 
				
			||||||
 | 
					  block(
 | 
				
			||||||
 | 
					    inset: 8pt,
 | 
				
			||||||
 | 
					    radius: 4pt,
 | 
				
			||||||
 | 
					    fill: fill,
 | 
				
			||||||
 | 
					    content
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,6 +37,11 @@
 | 
				
			||||||
  assert-etablissements(university)
 | 
					  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() 
 | 
					    todos() 
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    show-todos.update(false)
 | 
					    show-todos.update(false)
 | 
				
			||||||
| 
						 | 
					@ -90,7 +95,7 @@
 | 
				
			||||||
        // display last level-2 heading (current page included)
 | 
					        // display last level-2 heading (current page included)
 | 
				
			||||||
        let header-content = hydra(2, use-last: true,
 | 
					        let header-content = hydra(2, use-last: true,
 | 
				
			||||||
          display: (_, it) => {
 | 
					          display: (_, it) => {
 | 
				
			||||||
            if it.numbering == none [_ #it.body _ ]
 | 
					            if it.numbering == none [_ #it.body _]
 | 
				
			||||||
            else {
 | 
					            else {
 | 
				
			||||||
              let nb = counter(heading).at(it.location())
 | 
					              let nb = counter(heading).at(it.location())
 | 
				
			||||||
              let nb-fmt = numbering(
 | 
					              let nb-fmt = numbering(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,7 +23,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#let todos() = context {
 | 
					#let todos() = context {
 | 
				
			||||||
  if (todo-list.final().len() != 0) and (show-todos.get()) {
 | 
					  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]
 | 
					    text(size: 2em, weight: "bold", fill:red)[TO-DOs]
 | 
				
			||||||
    for t in todo-list.final() {
 | 
					    for t in todo-list.final() {
 | 
				
			||||||
      let l =  label(t.first())
 | 
					      let l =  label(t.first())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue