Hacker News new | ask | show | jobs
by airstrike 616 days ago
Strange to the untrained eye, perhaps. To me that just looks like a function. In a long document I recently wrote, I defined a custom function

    #let img(filepath, inset: 0.5em, caption: none) = {
      figure(
        box(inset: inset, stroke: 0.5pt + gray, image(filepath)),
        caption: caption
      );
    }
and just used it like:

    #img("images/excel-5.0.png", caption: "Microsoft Excel 5.0 was released in 1993.")

edit: fixed unused inset param
1 comments

Looks like it has a bug, the inset parameter is unused
Whoops, thanks. Wrote this one-off and never needed to change the inset so didn't catch that. Fixed!