Skip to content

Instantly share code, notes, and snippets.

@tosuke
Created April 27, 2022 06:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tosuke/1922dd03a8f150e63e8918faa06e8e74 to your computer and use it in GitHub Desktop.
Save tosuke/1922dd03a8f150e63e8918faa06e8e74 to your computer and use it in GitHub Desktop.
let-math \overset m-over m =
text-in-math MathOrd (fun ctx -> (
let font-size = ctx |> get-font-size in
let ib-over = embed-math (ctx |> set-font-size (font-size *' 0.85)) m-over in
let ib-over = inline-fil ++ ib-over ++ inline-fil in
let ib-m = embed-math ctx m in
let ib-sp = inline-graphics 0pt (font-size *' 0.1) 0pt (fun _ -> []) in
line-stack-bottom [ib-over; ib-sp; ib-m]
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment