|
| 1 | +#set par(justify: true, leading: 0.52em) |
| 2 | +#set text(font: "Linux Libertine", size: 12pt) |
| 3 | + |
| 4 | +#let footnote_state = state("footnote", ()) |
| 5 | +#let footnote_counter = counter("footnote") |
| 6 | + |
| 7 | +#let footnote(text) = { |
| 8 | + locate(loc => { |
| 9 | + let counter = footnote_counter.at(loc) |
| 10 | + footnote_state.update(old => { |
| 11 | + old.push(( |
| 12 | + index: counter.first(), |
| 13 | + text: text, |
| 14 | + page: loc.page() |
| 15 | + )) |
| 16 | + old |
| 17 | + }) |
| 18 | + [ #super[ [#counter.first()] ] ] |
| 19 | + }) |
| 20 | + footnote_counter.step() |
| 21 | +} |
| 22 | + |
| 23 | + |
| 24 | +#set page( |
| 25 | + paper: "us-letter", |
| 26 | + header: align(right, [ |
| 27 | + #lorem(5) |
| 28 | + ]), |
| 29 | + footer: [ |
| 30 | + #locate(loc => { |
| 31 | + let state = footnote_state.at(loc) |
| 32 | + for x in state.filter(x => x.page == loc.page()) { |
| 33 | + [ #x.index. #x.text #linebreak() ] |
| 34 | + } |
| 35 | + }) |
| 36 | + |
| 37 | + Opa #counter(page).display() |
| 38 | + ], |
| 39 | + numbering: "1" |
| 40 | +) |
| 41 | +#set heading(numbering: "1.a") |
| 42 | + |
| 43 | + |
| 44 | +#show "ipsum": name => box[ |
| 45 | + #box[ |
| 46 | + #image("//home/lucasew/.icons/tixati.png", height: 0.7em) |
| 47 | + ] |
| 48 | + #name |
| 49 | +] |
| 50 | + |
| 51 | + |
| 52 | +#show heading: it => [ |
| 53 | + #set align(center) |
| 54 | + #set text(16pt, weight: "regular") |
| 55 | + #block(smallcaps(it.body)) |
| 56 | +] |
| 57 | + |
| 58 | +#let sum(x, y) = [A soma de #x e #y é #(x + y)] |
| 59 | + |
| 60 | += Teste |
| 61 | +#sum(6, 9) |
| 62 | + |
| 63 | +#footnote("Teste") |
| 64 | +#footnote("Teste") |
| 65 | +#footnote("Teste") |
| 66 | + |
| 67 | +Tixati é um programa. Teste tixati. |
| 68 | + |
| 69 | +#lorem(20) |
| 70 | + |
| 71 | +#columns(2, [ |
| 72 | +== Teste |
| 73 | + |
| 74 | +#lorem(20) |
| 75 | + |
| 76 | +#figure( |
| 77 | + image("//home/lucasew/.icons/tixati.png", width: 50%), |
| 78 | +) <favicon> |
| 79 | +]) |
| 80 | + |
| 81 | +#pagebreak() |
| 82 | + |
| 83 | +#footnote("Teste") |
| 84 | + |
| 85 | +== Eoq |
| 86 | + |
| 87 | +#counter(page).display() |
| 88 | + |
| 89 | +$x^2$ |
| 90 | + |
| 91 | +#lorem(20) |
| 92 | + |
| 93 | +#lorem(20) |
| 94 | + |
| 95 | +```python |
| 96 | +import os |
| 97 | +from sys import stdout |
| 98 | +``` |
| 99 | + |
| 100 | +```nix |
| 101 | +pkgs = import <nixpkgs> {}; |
| 102 | +``` |
| 103 | + |
| 104 | +```json |
| 105 | +{ |
| 106 | + "name": "Lucas", |
| 107 | +} |
| 108 | +``` |
0 commit comments