Skip to content

Instantly share code, notes, and snippets.

View op8867555's full-sized avatar

Alex Lu op8867555

  • Taipei, Taiwan
View GitHub Profile
@op8867555
op8867555 / sidenote.lua
Created October 30, 2021 12:50 — forked from tarleb/sidenote.lua
Reimplementation of pandoc-sitenote by @jez as Lua filter
local counter = 0
function make_label(nonu)
local label_class = 'margin-toggle' .. (nonu and '' or ' sidenote-number')
local label_sym = nonu and '⊕' or ''
local label_html = string.format(
'<label for="sn-%d" class="%s">%s</label>',
counter,
label_class,
label_sym
@op8867555
op8867555 / numerical-reference.hs
Last active August 29, 2015 14:18 — forked from jkr/numerical-reference.hs
remove unused counter when going to upper level
{-# LANGUAGE PatternGuards #-}
{- This filter allows for numerical section references. It should be
used with "--number-sections", since it uses a similar numbering
scheme. It works by using the link notation: given a header with a
given id, we can refer to that number by using a link with `#` in it:
My Header {#my-header-id}
=========
@op8867555
op8867555 / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console