This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"definitions": { | |
"Attr": { | |
"type": "array", | |
"items": [ | |
{"type": "string"}, | |
{"type": "array", "items": {"type": "string"}}, | |
{ | |
"type": "array", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- don't do anything unless we target latex | |
if FORMAT ~= "latex" then | |
return {} | |
end | |
local List = require'pandoc.List' | |
local function latex(str) | |
return List:new{pandoc.RawInline('latex', str)} | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dkjson = require 'dkjson' | |
List = require 'pandoc.List' | |
utils = require 'pandoc.utils' | |
CitationOrig = pandoc.Citation | |
-- monkey-patch citation creation | |
pandoc.Citation = function(id, mode, prefix, suffix, note_num, hash) | |
local res = CitationOrig(id, mode, prefix, suffix, note_num, hash) | |
setmetatable( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- jsonld.lua | |
-- | |
-- Copyright (c) 2017-2018 Albert Krewinkel, Robert Winkler | |
-- | |
-- This program is free software; you can redistribute it and/or modify it | |
-- under the terms of the GNU public license version 2 or later. | |
-- See the LICENSE file for details. | |
-- USAGE: | |
-- The filters cito.lua and scholarly-metadata.lua must be run before this filter. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Pandoc Lua filter to include other Markdown files | |
--- | |
--- Usage: Use a special code block with class `include` to | |
--- include Markdown files. Each code line is treated as the | |
--- filename of a Markdown file, parsed as Markdown, and | |
--- included. Metadata from include files is discarded. | |
--- | |
--- Example: | |
--- | |
--- ``` {.include} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Inlines (inlns) | |
-- switch period/cite elements | |
for i=1,#inlns-1 do | |
local period, cite = inlns[i], inlns[i+1] | |
if period.t == 'Str' and period.text == '.' and cite.t == 'Cite' then | |
inlns[i], inlns[i+1] = cite, period | |
end | |
end | |
return inlns | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{tikz} | |
\usepackage{calc} | |
\newlength{\ORCIDidheight} | |
\newlength{\ORCIDidunit} | |
\definecolor{ORCIDgreen}{HTML}{A6CE39} | |
\newcommand{\ORCIDid}{% | |
% Scale icon to match current line height | |
\settoheight{\ORCIDidheight}{AXg}% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local yaml_template = "---\nDUMMY: %s\n---" | |
function evaluate (str) | |
local tag, value = str:match('^:(%a*):(.*)') | |
if tag == 'lua' then | |
return load( | |
'return ' .. value, | |
"evaluating " .. value | |
)() | |
elseif tag == 'json' then |
OlderNewer