1 2 3
A B C
--- Lists the formats that support all the extensions given on the command line. | |
-- | |
-- Usage: | |
-- | |
-- pandoc lua list-formats.lua [extensions,...] | |
-- | |
-- Example: | |
-- | |
-- $ pandoc lua list-formats.lua native_numbering citations | |
-- docx |
local function sentence_lines (el) | |
local inlines = el.content | |
for i = 2, #inlines do | |
if inlines[i].t == 'Space' and | |
inlines[i-1].t == 'Str' and | |
inlines[i-1].text:match '%.$' then | |
inlines[i] = pandoc.SoftBreak() | |
end | |
end | |
return el |
-- Default: Don't export comments | |
local comments = nil | |
function Meta (meta) | |
-- If there is a "comments" field in the YAML frontmatter, extract this | |
if meta.comments then | |
comments = pandoc.utils.stringify(meta.comments) | |
end | |
return meta | |
end |
#!/bin/bash | |
# Download recent transaction history from Paypal as JSON, | |
# and print on stdout. | |
# | |
# Requirements: a Paypal developer account, curl, jq (just for pretty-printing) | |
# | |
# brew install jq | |
# | |
# Limitations: | |
# - sees only the last 30 days of history |
1 2 3
A B C
from tensorfont.dataset import prepare_training_data | |
from tensorfont.generators import RandomPair | |
prepare_training_data() | |
def kern_generator(): | |
rpg = RandomPair(196, 196, 76, "training") | |
gen = rpg.generator() | |
while True: | |
font, left, right = next(gen) | |
img1, perturbation = rpg.get_image(font, left, right, perturbation_range= [-100,100]) |
-- a lua filter for panodoc | |
-- run pandoc your_word_doc.docx --track-change=all -t markdown --lua-filter=criticmarkup.lua | |
-- TODO: Detect substitutions in adjacent insertion/deletions | |
-- TODO: capture whole comment hightlight rather than just start point of comment | |
function Span(elem) | |
if elem.classes[1] and elem.classes[1] == "insertion" then | |
local opener = { pandoc.RawInline(FORMAT, "{++ ") } | |
local closer = { pandoc.RawInline(FORMAT, " ++}") } | |
return opener .. elem.content .. closer | |
elseif |
jw Shahjahanpur supercalifragilisticexpialidocious acquaintanceship | |
dichlorodifluoromethane insightfulnesses jl Erzgebirge vx kx Overijssel | |
solemnifying roofgarden boxberries fq substratosphere bxs Gewurztraminer | |
disconnectedly jg Thanksgivings bugbears Allhallowmas labdanums pq adjt | |
chymotrypsin sleepwalked kibitka awlworts unobjectionable sheqel | |
magnetohydrodynamics anthropomorphize goldfields Chappaquiddick Moskva clxii | |
misjudgment tx Panmunjom px earthquake outperform mx Netzahualcoyotl Skopje | |
bandwidths clavicytherium clampdown zx convolvulaceous honeysuckle qf fz | |
Gelbvieh succinylsulfathiazole sixfold bogtrotter subcultural pkwy eurhythmy | |
Ecbatana qx jimjams cml crowfeet prajna Flaxman Kafkaesque weekday Reykjavik |
{-# LANGUAGE ViewPatterns #-} | |
module InTex where | |
import Text.Pandoc.JSON | |
import Text.Pandoc | |
import Data.List | |
main :: IO () | |
main = toJSONFilter readFootnotes |