#A simple solution for manual bibliography (like `\bibitem`)

6 messages · Page 1 of 1 (latest)

upper belfry
#

?r

#let bibitem(body)=figure(kind: "bibitem", supplement: none, body)
#show figure.where(kind: "bibitem"): it=>box(width: 2em, it.counter.display("[1]"))+it.body+parbreak()
#show ref: it=>{
  let e=it.element
  if e.func()==figure and e.kind=="bibitem"{
    let loc=e.location()
    return link(loc, numbering("[1]", ..e.counter.at(loc)))
  }
  it
}

@ref1 @ref2

#heading(numbering: none)[References]
#bibitem[hello] <ref1>
#bibitem[world] <ref2>
tame rover
#

Very nice!

#

I was working on a library for this a while ago but stopped... But i did get some progress , i just didn't know how to make the best API for it

#

In my implementation i didn't use figures though

#

But figures indeed enable you to quickly make this kind of thing