update `pandoc` data dir

master
urosm 2024-03-17 16:49:51 +01:00
parent 063b8b38b6
commit c93818efef
18 changed files with 1766 additions and 3 deletions

View File

@ -0,0 +1,234 @@
local path = pandoc.path
local MetaList = pandoc.MetaList
local Link = pandoc.Link
INPUT_FILES = (function(prog)
local insert = table.insert
local input_files = {}
local pfile = io.popen(prog)
for filename in pfile:lines() do
insert(input_files, filename)
end
pfile:close()
return input_files
end)("ls -t *.md")
OUTPUT_FILES = (function(pattern)
local insert = table.insert
local output_files = {}
for _,filename in ipairs(INPUT_FILES) do
local basename = path.split_extension(filename)
insert(output_files, (pattern):format(basename))
end
return output_files
end)("public_html/%s.html")
print("[INFO] bavbavhaus.net:")
do
for i,input_file in ipairs(INPUT_FILES) do
print(" " .. INPUT_FILES[i] .. " -> " .. OUTPUT_FILES[i])
end
end
print("[INFO] bavbavhaus.net: reading pages")
PAGES = (function()
local input_format = "markdown+wikilinks_title_before_pipe"
local reader_options = pandoc.ReaderOptions({})
local pages = MetaList({})
function pages:get(input_file)
return self:find_if(function(page)
return page["meta"]["input_file"] == input_file
end)
end
for i,input_file in ipairs(INPUT_FILES) do
local f = io.open(input_file)
if not f then goto continue end
local page = pandoc.read(f:read("*a"), input_format, reader_options)
f:close()
pages:insert(page)
::continue::
end
return pages
end)()
print("[INFO] bavbavhaus.net: updating metadata (initial)")
do
for i,page in ipairs(PAGES) do
local input_file = INPUT_FILES[i]
local output_file = OUTPUT_FILES[i]
PAGES[i] = page:walk({
Meta = function(meta)
meta["input_file"] = input_file
meta["output_file"] = output_file
meta["url"] = input_file
meta["title"] = meta["title"] or pandoc.Inlines(pandoc.Str(input_file))
return meta
end,
})
end
end
print("[INFO] bavbavhaus.net: scanning pages for internal links")
BACKLINKS, FORELINKS = (function(pages)
local MetaMap = pandoc.MetaMap
local backlinks = MetaMap({})
local forelinks = MetaMap({})
for i,page in ipairs(pages) do
local input_file = page["meta"]["input_file"]
page:walk({
Link = function(link)
if not PAGES:get(link.target) then return end
if input_file == link.target then return end
if not backlinks[link.target] then
backlinks[link.target] = MetaList({})
end
if not forelinks[input_file] then
forelinks[input_file] = MetaList({})
end
if not backlinks[link.target]:includes(input_file) then
backlinks[link.target]:insert(input_file)
end
if not forelinks[input_file]:includes(link.target) then
forelinks[input_file]:insert(link.target)
end
end
})
end
return backlinks, forelinks
end)(PAGES)
print("[INFO] bavbavhaus.net: updating index page")
do
local index = "index.md"
FORELINKS[index] = MetaList({})
for i,page in ipairs(PAGES) do
if PAGES[i]["meta"]["input_file"] == index then goto continue end
FORELINKS[index]:insert(page["meta"]["input_file"])
::continue::
end
end
print("[INFO] bavbavhaus.net: updating link targets")
do
function update_target(target)
return ("%s.html#start"):format(path.split_extension(target))
end
for i,page in ipairs(PAGES) do
PAGES[i] = page:walk({
Meta = function(meta)
meta["url"] = update_target(meta["url"])
return meta
end,
Link = function(link)
if not PAGES:get(link.target) then return end
link.target = update_target(link.target)
return Link(link.content, link.target)
end
})
end
end
print("[INFO] bavbavhaus.net: generating sitemap")
SITEMAP = (function()
local sitemap = MetaList({})
for _,page in ipairs(PAGES) do
local meta = page["meta"]
sitemap:insert(Link(meta["title"], meta["url"]))
end
return sitemap
end)()
print("[INFO] bavbavhaus.net: processing citations")
do
local csl = "pandoc/csl/chicago-fullnote-sl"
for i,page in ipairs(PAGES) do
PAGES[i] = page:walk({
Meta = function(meta)
meta["csl"] = csl
return meta
end,
Pandoc = function(doc)
return pandoc.utils.citeproc(doc)
end
})
end
end
print("[INFO] bavbavhaus.net: updating metadata (sitemap)")
do
for i,page in ipairs(PAGES) do
PAGES[i] = page:walk({
Meta = function(meta)
meta["sitemap"] = SITEMAP
return meta
end
})
end
end
do
print("[INFO] bavbavhaus.net: writing partial pages")
function get_template(path)
local f = io.open(path)
if not f then return end
local template = f:read("*a")
f:close()
return pandoc.template.compile(template)
end
local write = pandoc.write
local output_format = "html5"
local WriterOptions = pandoc.WriterOptions
local template = get_template("pandoc/templates/bavbavhaus.net.partial.html5")
local RawBlock = pandoc.RawBlock
for i,page in ipairs(PAGES) do
local input_file = page["meta"]["input_file"]
if not BACKLINKS[input_file] then goto continue end
local backlinks = MetaList({})
for _,backlink in ipairs(BACKLINKS[input_file]) do
local backlink_page = PAGES:get(backlink)
local writer_options = WriterOptions({
identifier_prefix = "back/" .. backlink,
template = template
})
local text = pandoc.write(backlink_page, output_format, writer_options)
backlinks:insert(RawBlock("html5", text))
end
PAGES[i] = page:walk({
Meta = function(meta)
meta["backlinks"] = backlinks
return meta
end
})
::continue::
end
for i,page in ipairs(PAGES) do
local input_file = page["meta"]["input_file"]
if not FORELINKS[input_file] then goto continue end
local forelinks = MetaList({})
for _,forelink in ipairs(FORELINKS[input_file]) do
local forelink_page = PAGES:get(forelink)
local writer_options = WriterOptions({
identifier_prefix = "fore/" .. forelink,
template = template
})
local text = pandoc.write(forelink_page, output_format, writer_options)
forelinks:insert(RawBlock("html5", text))
end
PAGES[i] = page:walk({
Meta = function(meta)
meta["forelinks"] = forelinks
return meta
end
})
::continue::
end
print("[INFO] bavbavhaus.net: writing pages")
for _,page in ipairs(PAGES) do
local f = io.open(page["meta"]["output_file"], "w")
f:write(pandoc.write(page, output_format, WriterOptions({
template = get_template("pandoc/templates/bavbavhaus.net.html5")
})))
f:close()
end
end

View File

@ -0,0 +1,9 @@
---
from: markdown+wikilinks_title_before_pipe
reference-doc: reference-sl.docx
citeproc: true
csl: chicago-fullnote-bibliography-sl
filters:
- pandoc-quotes.lua
- delink.lua
...

View File

@ -0,0 +1,10 @@
---
from: markdown+wikilinks_title_before_pipe
citeproc: true
csl: chicago-fullnote-bibliography-sl
metadata:
linestretch: 1.5
fontfamily: tgtermes
fontsize: 12pt
csquotes: true
...

View File

@ -0,0 +1,11 @@
---
template: default
from: markdown+wikilinks_title_before_pipe
to: s5
standalone: true
embed-resources: true
citeproc: true
csl: chicago-fullnote-bibliography-sl
filters:
- pandoc-quotes.lua
...

270
pandoc/logging.lua 100644
View File

@ -0,0 +1,270 @@
--[[
logging.lua: pandoc-aware logging functions (can also be used standalone)
Copyright: (c) 2022 William Lupton
License: MIT - see LICENSE file for details
Usage: See README.md for details
]]
-- if running standalone, create a 'pandoc' global
if not pandoc then
_G.pandoc = {utils = {}}
end
-- if there's no pandoc.utils, create a local one
if not pcall(require, 'pandoc.utils') then
pandoc.utils = {}
end
-- if there's no pandoc.utils.type, create a local one
if not pandoc.utils.type then
pandoc.utils.type = function(value)
local typ = type(value)
if not ({table=1, userdata=1})[typ] then
-- unchanged
elseif value.__name then
typ = value.__name
elseif value.tag and value.t then
typ = value.tag
if typ:match('^Meta.') then
typ = typ:sub(5)
end
if typ == 'Map' then
typ = 'table'
end
end
return typ
end
end
-- namespace
local logging = {}
-- helper function to return a sensible typename
logging.type = function(value)
-- this can return 'Inlines', 'Blocks', 'Inline', 'Block' etc., or
-- anything that built-in type() can return, namely 'nil', 'number',
-- 'string', 'boolean', 'table', 'function', 'thread', or 'userdata'
local typ = pandoc.utils.type(value)
-- it seems that it can also return strings like 'pandoc Row'; replace
-- spaces with periods
-- XXX I'm not sure that this is done consistently, e.g. I don't think
-- it's done for pandoc.Attr or pandoc.List?
typ = typ:gsub(' ', '.')
-- map Inline and Block to the tag name
-- XXX I guess it's intentional that it doesn't already do this?
return ({Inline=1, Block=1})[typ] and value.tag or typ
end
-- derived from https://www.lua.org/pil/19.3.html pairsByKeys()
logging.spairs = function(list, comp)
local keys = {}
for key, _ in pairs(list) do
table.insert(keys, tostring(key))
end
table.sort(keys, comp)
local i = 0
local iter = function()
i = i + 1
return keys[i] and keys[i], list[keys[i]] or nil
end
return iter
end
-- helper function to dump a value with a prefix (recursive)
-- XXX should detect repetition/recursion
-- XXX would like maxlen logic to apply at all levels? but not trivial
local function dump_(prefix, value, maxlen, level, add)
local buffer = {}
if prefix == nil then prefix = '' end
if level == nil then level = 0 end
if add == nil then add = function(item) table.insert(buffer, item) end end
local indent = maxlen and '' or (' '):rep(level)
-- get typename, mapping to pandoc tag names where possible
local typename = logging.type(value)
-- don't explicitly indicate 'obvious' typenames
local typ = (({boolean=1, number=1, string=1, table=1, userdata=1})
[typename] and '' or typename)
-- light userdata is just a pointer (can't iterate over it)
-- XXX is there a better way of checking for light userdata?
if type(value) == 'userdata' and not pcall(pairs(value)) then
value = tostring(value):gsub('userdata:%s*', '')
-- modify the value heuristically
elseif ({table=1, userdata=1})[type(value)] then
local valueCopy, numKeys, lastKey = {}, 0, nil
for key, val in pairs(value) do
-- pandoc >= 2.15 includes 'tag', nil values and functions
if key ~= 'tag' and val and type(val) ~= 'function' then
valueCopy[key] = val
numKeys = numKeys + 1
lastKey = key
end
end
if numKeys == 0 then
-- this allows empty tables to be formatted on a single line
-- XXX experimental: render Doc objects
value = typename == 'Doc' and '|' .. value:render() .. '|' or
typename == 'Space' and '' or '{}'
elseif numKeys == 1 and lastKey == 'text' then
-- this allows text-only types to be formatted on a single line
typ = typename
value = value[lastKey]
typename = 'string'
else
value = valueCopy
-- XXX experimental: indicate array sizes
if #value > 0 then
typ = typ .. '[' .. #value .. ']'
end
end
end
-- output the possibly-modified value
local presep = #prefix > 0 and ' ' or ''
local typsep = #typ > 0 and ' ' or ''
local valtyp = type(value)
if valtyp == 'nil' then
add('nil')
elseif ({boolean=1, number=1, string=1})[valtyp] then
typsep = #typ > 0 and valtyp == 'string' and #value > 0 and ' ' or ''
-- don't use the %q format specifier; doesn't work with multi-bytes
local quo = typename == 'string' and '"' or ''
add(string.format('%s%s%s%s%s%s%s%s', indent, prefix, presep, typ,
typsep, quo, value, quo))
-- light userdata is just a pointer (can't iterate over it)
-- XXX is there a better way of checking for light userdata?
elseif valtyp == 'userdata' and not pcall(pairs(value)) then
add(string.format('%s%s%s%s %s', indent, prefix, presep, typ,
tostring(value):gsub('userdata:%s*', '')))
elseif ({table=1, userdata=1})[valtyp] then
add(string.format('%s%s%s%s%s{', indent, prefix, presep, typ, typsep))
-- Attr and Attr.attributes have both numeric and string keys, so
-- ignore the numeric ones
-- XXX this is no longer the case for pandoc >= 2.15, so could remove
-- the special case?
local first = true
if prefix ~= 'attributes:' and typ ~= 'Attr' then
for i, val in ipairs(value) do
local pre = maxlen and not first and ', ' or ''
dump_(string.format('%s[%s]', pre, i), val, maxlen,
level + 1, add)
first = false
end
end
-- report keys in alphabetical order to ensure repeatability
for key, val in logging.spairs(value) do
local pre = maxlen and not first and ', ' or ''
-- this check can avoid an infinite loop, e.g. with metatables
-- XXX should have more general and robust infinite loop avoidance
if key:match('^__') and type(val) ~= 'string' then
add(string.format('%s%s: %s', pre, key, tostring(val)))
-- pandoc >= 2.15 includes 'tag'
elseif not tonumber(key) and key ~= 'tag' then
dump_(string.format('%s%s:', pre, key), val, maxlen,
level + 1, add)
end
first = false
end
add(string.format('%s}', indent))
end
return table.concat(buffer, maxlen and '' or '\n')
end
logging.dump = function(value, maxlen)
if maxlen == nil then maxlen = 70 end
local text = dump_(nil, value, maxlen)
if #text > maxlen then
text = dump_(nil, value, nil)
end
return text
end
logging.output = function(...)
local need_newline = false
for i, item in ipairs({...}) do
-- XXX space logic could be cleverer, e.g. no space after newline
local maybe_space = i > 1 and ' ' or ''
local text = ({table=1, userdata=1})[type(item)] and
logging.dump(item) or tostring(item)
io.stderr:write(maybe_space, text)
need_newline = text:sub(-1) ~= '\n'
end
if need_newline then
io.stderr:write('\n')
end
end
-- basic logging support (-1=errors, 0=warnings, 1=info, 2=debug, 3=debug2)
-- XXX should support string levels?
logging.loglevel = 0
-- set log level and return the previous level
logging.setloglevel = function(loglevel)
local oldlevel = logging.loglevel
logging.loglevel = loglevel
return oldlevel
end
-- verbosity default is WARNING; --quiet -> ERROR and --verbose -> INFO
-- --trace sets TRACE or DEBUG (depending on --verbose)
if type(PANDOC_STATE) == 'nil' then
-- use the default level
elseif PANDOC_STATE.trace then
logging.loglevel = PANDOC_STATE.verbosity == 'INFO' and 3 or 2
elseif PANDOC_STATE.verbosity == 'INFO' then
logging.loglevel = 1
elseif PANDOC_STATE.verbosity == 'WARNING' then
logging.loglevel = 0
elseif PANDOC_STATE.verbosity == 'ERROR' then
logging.loglevel = -1
end
logging.error = function(...)
if logging.loglevel >= -1 then
logging.output('(E)', ...)
end
end
logging.warning = function(...)
if logging.loglevel >= 0 then
logging.output('(W)', ...)
end
end
logging.info = function(...)
if logging.loglevel >= 1 then
logging.output('(I)', ...)
end
end
logging.debug = function(...)
if logging.loglevel >= 2 then
logging.output('(D)', ...)
end
end
logging.debug2 = function(...)
if logging.loglevel >= 3 then
logging.warning('debug2() is deprecated; use trace()')
logging.output('(D2)', ...)
end
end
logging.trace = function(...)
if logging.loglevel >= 3 then
logging.output('(T)', ...)
end
end
-- for temporary unconditional debug output
logging.temp = function(...)
logging.output('(#)', ...)
end
return logging

View File

@ -0,0 +1,23 @@
/* layout */
body {
width: 100vw;
height: 100vh;
max-width: 100vw;
max-height: 100vh;
display: grid;
grid-template-rows: 1fr auto;
}
body>main {
max-width: 100%;
max-height: 100%;
display: grid;
}
body>footer {
z-index: 100;
}
.slide {
z-index: 2;
}

View File

@ -0,0 +1,103 @@
<public:component>
<public:attach event="onpropertychange" onevent="iePNGFix(0)" />
<script type="text/javascript">
// IE5.5+ PNG Alpha Fix v1.0
// (c) 2004-2008 Angus Turnbull http://www.twinhelix.com
// This is licensed under the GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
// This must be a path to a blank image, relative to the HTML document(s).
// In production use I suggest '/images/blank.gif' or similar. That's all!
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
function filt(s, b)
{
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
var sM = (currentStyle.backgroundRepeat == 'no-repeat') ? 'crop' : 'scale';
s = (s || '').replace(/\(/g, '%28').replace(/\)/g, '%29');
if (s && !(/IMG|INPUT/.test(nodeName) && !b) &&
currentStyle.width == 'auto' && currentStyle.height == 'auto')
{
style.width = offsetWidth + 'px';
style.height = clientHeight + 'px';
if (currentStyle.display == 'inline') style.display = 'inline-block';
}
if (filters[f])
{
filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s }
}
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="' + sM + '")';
}
function iePNGFix(init)
{
if (!/MSIE (5\.5|6)/.test(navigator.userAgent) || typeof filters == 'unknown') return;
var evt = init ? { propertyName: 'src,background' } : event;
var isSrc = /src/.test(evt.propertyName);
var isBg = /background/.test(evt.propertyName);
var isClass = !init &&
((this.className != this._png_class) && (this.className || this._png_class));
if (!(isSrc || isBg || isClass)) return;
this._png_class = this.className;
var blank = blankImg.match(/([^\/]+)$/)[1];
// Required for Whatever:hover support - erase any set BG if className changes.
if (isClass && ((style.backgroundImage.indexOf('url(') == -1) ||
(style.backgroundImage.indexOf(blank) > -1)))
{
setTimeout(function() { this.style.backgroundImage = '' }, 0);
return;
}
if (isSrc && this.src && /IMG|INPUT/.test(nodeName))
{
if ((/\.png/i).test(src))
{
filt(src, 1);
src = blankImg;
}
else if (src.indexOf(blank) == -1) filt();
}
var bgSrc = currentStyle.backgroundImage || style.backgroundImage;
if ((bgSrc + this.src).indexOf(blank) == -1)
{
var bgPNG = bgSrc.match(/^url[("']+(.*\.png[^\)"']*)[\)"']+[^\)]*$/i);
if (bgPNG)
{
style.backgroundImage = 'url("' + blankImg + '")';
filt(bgPNG[1], 0);
// Unclickable elements inside PNG backgrounds.
var tags = ['a', 'input', 'select', 'textarea', 'iframe', 'object'],
t = tags.length, tFix = [];
while (t--)
{
var elms = all.tags(tags[t]), e = elms.length;
while (e--) tFix.push(elms[e]);
}
var t = tFix.length;
if (t && (/relative|absolute/i).test(currentStyle.position))
alert('IEPNGFix: Children of positioned element are unclickable:\n\n<' +
nodeName + (id && ' id=' + id) + '>');
while (t--)
if (!(/relative|absolute/i).test(tFix[t].currentStyle.position))
tFix[t].style.position = 'relative';
}
else filt();
}
}
iePNGFix(1);
</script>
</public:component>

View File

@ -0,0 +1,7 @@
/* DO NOT CHANGE THESE unless you really want to break Opera Show */
.slide {
visibility: visible !important;
position: static !important;
page-break-before: always;
}
#slide0 {page-break-before: avoid;}

View File

@ -0,0 +1,15 @@
/* don't change this unless you want the layout stuff to show up in the outline view! */
.layout div, #footer *, #controlForm * {display: none;}
#footer, #controls, #controlForm, #navLinks, #toggle {
display: block; visibility: visible; margin: 0; padding: 0;}
#toggle {float: right; padding: 0.5em;}
html>body #toggle {position: fixed; top: 0; right: 0;}
/* making the outline look pretty-ish */
#slide0 h1, #slide0 h2, #slide0 h3, #slide0 h4 {border: none; margin: 0;}
#slide0 h1 {padding-top: 1.5em;}
.slide h1 {margin: 1.5em 0 0; padding-top: 0.25em;
border-top: 1px solid #888; border-bottom: 1px solid #AAA;}
#toggle {border: 1px solid; border-width: 0 0 1px 1px; background: #FFF;}

View File

@ -0,0 +1,322 @@
/* variables */
:root {
--font-size: 18pt;
--line-height: 1.25;
--font-family: monospace;
/* font-derived width and height units */
--w-un: 1ch;
--h-un: calc(var(--font-size) * var(--line-height));
/* colors */
--fg-c: #e2e2e2;
--bg-c: #000000;
--blue-c: #856cff;
--magenta-c: #ff1170;
}
/* reset */
* {
box-sizing: inherit;
margin: unset;
}
:root {
box-sizing: border-box;
color: var(--fg-c);
background-color: var(--bg-c);
font: var(--font-size)/var(--line-height) var(--font-family);
}
:link, :visited {
text-decoration: none;
color: var(--blue-c);
}
h1, h2, h3, h4, h5, h6 {
color: var(--magenta-c);
font: inherit;
}
button {
border: unset;
background: unset;
font: inherit;
cursor: pointer;
}
select {
appearance: none;
border: unset;
background: unset;
font: inherit;
cursor: pointer;
}
div {
max-height: 100%;
}
.float {
height: 100%;
display: grid;
grid-template-rows: 1fr auto;
}
img {
background: var(--fg-c);
}
.figcaption {
}
/* layout */
.slide {
max-height: 100%;
padding: var(--h-un) var(--w-un);
}
/* footer */
body>footer {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 1fr;
justify-items: center;
}
body>footer * {
max-width: 100%;
color: var(--blue-c);
text-transform: lowercase;
overflow-x: hidden;
text-overflow: ellipsis;
}
body>footer :active {
color: var(--magenta-c);
}
/* s5 #slide0 */
#slide0 {
}
#slide0 h1 { /* title */
/* position: static;
margin: 1em 0 0;
padding: 0;
font: bold 2em Helvetica, sans-serif;
white-space: normal;
background: transparent; */
}
#slide0 h2 { /* subtitle */
}
#slide0 h3 { /* author */
}
#slide0 h4 { /* date */
}
#slide0 #footer {
}
ul, pre {
margin: 0;
line-height: 1em;
}
blockquote {
padding: 0 2em 0.5em;
margin: 0 1.5em 0.5em;
text-align: center;
font-size: 1em;
}
blockquote p {
margin: 0;
}
blockquote i {
font-style: normal;
}
blockquote b {
display: block;
margin-top: 0.5em;
font-weight: normal;
font-size: smaller;
font-style: normal;
}
blockquote b i {
font-style: italic;
}
kbd {
font-weight: bold;
font-size: 1em;
}
sup {
font-size: smaller;
line-height: 1px;
}
.slide code {
padding: 2px 0.25em;
font-weight: bold;
color: #533;
}
.slide code.bad, code del {
color: red;
}
.slide code.old {
color: silver;
}
.slide pre {
padding: 0;
margin: 0.25em 0 0.5em 0.5em;
color: #533;
font-size: 90%;
}
.slide pre code {
display: block;
}
.slide ul {
margin-left: 5%;
margin-right: 7%;
list-style: disc;
}
.slide li {
margin-top: 0.75em;
margin-right: 0;
}
.slide ul ul {
line-height: 1;
}
.slide ul ul li {
margin: .2em;
font-size: 85%;
list-style: square;
}
.slide img.leader {
display: block;
margin: 0 auto;
}
div.long {
font-size: 0.75em;
}
.slide h1 {
}
.slide h3 {
}
h1 abbr {
font-variant: small-caps;
}
div#controls {
position: absolute;
left: 50%;
bottom: 0;
width: 50%;
text-align: right;
/* font: bold 0.9em Verdana, Helvetica, sans-serif; */
}
html>body div#controls {
position: fixed;
padding: 0 0 1em 0;
top: auto;
}
div#controls form {
position: absolute;
bottom: 0;
right: 0;
width: 100%;
margin: 0;
padding: 0;
}
#controls #navLinks a {
padding: 0;
margin: 0 0.5em;
background: #005;
border: none;
color: #779;
cursor: pointer;
}
#controls #navList {
height: 1em;
}
#controls #navList #jumplist {
position: absolute;
bottom: 0;
right: 0;
background: #DDD;
color: #227;
}
ul.urls {
list-style: none;
display: inline;
margin: 0;
}
.urls li {
display: inline;
margin: 0;
}
.note {
display: none;
}
.external {
border-bottom: 1px dotted gray;
}
html>body .external {
border-bottom: none;
}
.external:after {
content: " \274F";
font-size: smaller;
color: #77B;
}
.incremental, .incremental *, .incremental *:after {
color: #DDE;
visibility: visible;
}
img.incremental {
visibility: hidden;
}
.slide .current {
color: #B02;
}

View File

@ -0,0 +1 @@
/* The following rule is necessary to have all slides appear in print! DO NOT REMOVE IT! */ .slide, ul {page-break-inside: avoid; visibility: visible !important;} h1 {page-break-after: avoid;} body {font-size: 12pt; background: white;} * {color: black;} #slide0 h1 {font-size: 200%; border: none; margin: 0.5em 0 0.25em;} #slide0 h3 {margin: 0; padding: 0;} #slide0 h4 {margin: 0 0 0.5em; padding: 0;} #slide0 {margin-bottom: 3em;} h1 {border-top: 2pt solid gray; border-bottom: 1px dotted silver;} .extra {background: transparent !important;} div.extra, pre.extra, .example {font-size: 10pt; color: #333;} ul.extra a {font-weight: bold;} p.example {display: none;} #header {display: none;} #footer h1 {margin: 0; border-bottom: 1px solid; color: gray; font-style: italic;} #footer h2, #controls {display: none;} /* The following rule keeps the layout stuff out of print. Remove at your own risk! */ .layout, .layout * {display: none !important;}

View File

@ -0,0 +1,37 @@
/* Do not edit or override these styles! The system will likely break if you do. */
/*div#header, div#footer, div#controls, .slide {position: absolute;}*/
/*
html>body div#header,
html>body div#footer,
html>body div#controls,
html>body .slide {
position: fixed;
}
*/
body>main>article.presentation {
display: grid;
grid-template-areas: "slide";
}
body>main>article.presentation>.slide {
grid-area: slide;
}
.handout {
display: none;
}
/*
.layout {
display: block;
}
*/
.slide, .hideme, .incremental {
visibility: hidden;
}
#slide0 {
visibility: visible;
}

View File

@ -0,0 +1,3 @@
@import url(s5-core.css); /* required to make the slide show run at all */
@import url(framing.css); /* sets basic placement and size of slide components */
@import url(pretty.css); /* stuff that makes the slides look better than blah */

View File

@ -0,0 +1,553 @@
// S5 v1.1 slides.js -- released into the Public Domain
//
// Please see http://www.meyerweb.com/eric/tools/s5/credits.html for information
// about all the wonderful and talented contributors to this code!
var undef;
var slideCSS = '';
var snum = 0;
var smax = 1;
var incpos = 0;
var number = undef;
var s5mode = true;
var defaultView = 'slideshow';
var controlVis = 'visible';
var isIE = navigator.appName == 'Microsoft Internet Explorer' && navigator.userAgent.indexOf('Opera') < 1 ? 1 : 0;
var isOp = navigator.userAgent.indexOf('Opera') > -1 ? 1 : 0;
var isGe = navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('Safari') < 1 ? 1 : 0;
function hasClass(object, className) {
if (!object.className) return false;
return (object.className.search('(^|\\s)' + className + '(\\s|$)') != -1);
}
function hasValue(object, value) {
if (!object) return false;
return (object.search('(^|\\s)' + value + '(\\s|$)') != -1);
}
function removeClass(object,className) {
if (!object) return;
object.className = object.className.replace(new RegExp('(^|\\s)'+className+'(\\s|$)'), RegExp.$1+RegExp.$2);
}
function addClass(object,className) {
if (!object || hasClass(object, className)) return;
if (object.className) {
object.className += ' '+className;
} else {
object.className = className;
}
}
function GetElementsWithClassName(elementName,className) {
var allElements = document.getElementsByTagName(elementName);
var elemColl = new Array();
for (var i = 0; i< allElements.length; i++) {
if (hasClass(allElements[i], className)) {
elemColl[elemColl.length] = allElements[i];
}
}
return elemColl;
}
function isParentOrSelf(element, id) {
if (element == null || element.nodeName=='BODY') return false;
else if (element.id == id) return true;
else return isParentOrSelf(element.parentNode, id);
}
function nodeValue(node) {
var result = "";
if (node.nodeType == 1) {
var children = node.childNodes;
for (var i = 0; i < children.length; ++i) {
result += nodeValue(children[i]);
}
}
else if (node.nodeType == 3) {
result = node.nodeValue;
}
return(result);
}
function slideLabel() {
var slideColl = GetElementsWithClassName('*','slide');
var list = document.getElementById('jumplist');
smax = slideColl.length;
for (var n = 0; n < smax; n++) {
var obj = slideColl[n];
var did = 'slide' + n.toString();
obj.setAttribute('id',did);
if (isOp) continue;
var otext = '';
var menu = obj.firstChild;
if (!menu) continue; // to cope with empty slides
while (menu && menu.nodeType == 3) {
menu = menu.nextSibling;
}
if (!menu) continue; // to cope with slides with only text nodes
var menunodes = menu.childNodes;
for (var o = 0; o < menunodes.length; o++) {
otext += nodeValue(menunodes[o]);
}
list.options[list.length] = new Option(n + ': ' + otext, n);
}
}
function currentSlide() {
var cs;
if (document.getElementById) {
cs = document.getElementById('currentSlide');
} else {
cs = document.currentSlide;
}
cs.innerHTML = '<span id="csHere">' + snum + '<\/span> ' +
'<span id="csSep">\/<\/span> ' +
'<span id="csTotal">' + (smax-1) + '<\/span>';
// if (snum == 0) {
// cs.style.visibility = 'hidden';
// } else {
// cs.style.visibility = 'visible';
// }
}
function go(step) {
if (document.getElementById('slideProj').disabled || step == 0) return;
var jl = document.getElementById('jumplist');
var cid = 'slide' + snum;
var ce = document.getElementById(cid);
if (incrementals[snum].length > 0) {
for (var i = 0; i < incrementals[snum].length; i++) {
removeClass(incrementals[snum][i], 'current');
removeClass(incrementals[snum][i], 'incremental');
}
}
if (step != 'j') {
snum += step;
lmax = smax - 1;
if (snum > lmax) snum = lmax;
if (snum < 0) snum = 0;
} else
snum = parseInt(jl.value);
var nid = 'slide' + snum;
var ne = document.getElementById(nid);
if (!ne) {
ne = document.getElementById('slide0');
snum = 0;
}
if (step < 0) {incpos = incrementals[snum].length} else {incpos = 0;}
if (incrementals[snum].length > 0 && incpos == 0) {
for (var i = 0; i < incrementals[snum].length; i++) {
if (hasClass(incrementals[snum][i], 'current'))
incpos = i + 1;
else
addClass(incrementals[snum][i], 'incremental');
}
}
if (incrementals[snum].length > 0 && incpos > 0)
addClass(incrementals[snum][incpos - 1], 'current');
ce.style.visibility = 'hidden';
ne.style.visibility = 'visible';
jl.selectedIndex = snum;
currentSlide();
number = 0;
}
function goTo(target) {
if (target >= smax || target == snum) return;
go(target - snum);
}
function subgo(step) {
if (step > 0) {
removeClass(incrementals[snum][incpos - 1],'current');
removeClass(incrementals[snum][incpos], 'incremental');
addClass(incrementals[snum][incpos],'current');
incpos++;
} else {
incpos--;
removeClass(incrementals[snum][incpos],'current');
addClass(incrementals[snum][incpos], 'incremental');
addClass(incrementals[snum][incpos - 1],'current');
}
}
function toggle() {
var slideColl = GetElementsWithClassName('*','slide');
var slides = document.getElementById('slideProj');
var outline = document.getElementById('outlineStyle');
if (!slides.disabled) {
slides.disabled = true;
outline.disabled = false;
s5mode = false;
fontSize('1em');
for (var n = 0; n < smax; n++) {
var slide = slideColl[n];
slide.style.visibility = 'visible';
}
} else {
slides.disabled = false;
outline.disabled = true;
s5mode = true;
fontScale();
for (var n = 0; n < smax; n++) {
var slide = slideColl[n];
slide.style.visibility = 'hidden';
}
slideColl[snum].style.visibility = 'visible';
}
}
function showHide(action) {
var obj = GetElementsWithClassName('*','hideme')[0];
switch (action) {
case 's': obj.style.visibility = 'visible'; break;
case 'h': obj.style.visibility = 'hidden'; break;
case 'k':
if (obj.style.visibility != 'visible') {
obj.style.visibility = 'visible';
} else {
obj.style.visibility = 'hidden';
}
break;
}
}
// 'keys' code adapted from MozPoint (http://mozpoint.mozdev.org/)
function keys(key) {
if (!key) {
key = event;
key.which = key.keyCode;
}
if (key.which == 84) {
toggle();
return;
}
if (s5mode) {
switch (key.which) {
case 10: // return
case 13: // enter
if (window.event && isParentOrSelf(window.event.srcElement, 'controls')) return;
if (key.target && isParentOrSelf(key.target, 'controls')) return;
if(number != undef) {
goTo(number);
break;
}
case 32: // spacebar
case 34: // page down
case 39: // rightkey
case 40: // downkey
if(number != undef) {
go(number);
} else if (!incrementals[snum] || incpos >= incrementals[snum].length) {
go(1);
} else {
subgo(1);
}
break;
case 33: // page up
case 37: // leftkey
case 38: // upkey
if(number != undef) {
go(-1 * number);
} else if (!incrementals[snum] || incpos <= 0) {
go(-1);
} else {
subgo(-1);
}
break;
case 36: // home
goTo(0);
break;
case 35: // end
goTo(smax-1);
break;
case 67: // c
showHide('k');
break;
}
if (key.which < 48 || key.which > 57) {
number = undef;
} else {
if (window.event && isParentOrSelf(window.event.srcElement, 'controls')) return;
if (key.target && isParentOrSelf(key.target, 'controls')) return;
number = (((number != undef) ? number : 0) * 10) + (key.which - 48);
}
}
return false;
}
function clicker(e) {
number = undef;
var target;
if (window.event) {
target = window.event.srcElement;
e = window.event;
} else target = e.target;
if (target.getAttribute('href') != null || target.getAttribute("onclick") != null || target.getAttribute("onchange") != null || hasValue(target.rel, 'external') || isParentOrSelf(target, 'controls') || isParentOrSelf(target,'embed') || isParentOrSelf(target,'object') || isParentOrSelf(target, "jumplist")) return true;
if (!e.which || e.which == 1) {
if (!incrementals[snum] || incpos >= incrementals[snum].length) {
go(1);
} else {
subgo(1);
}
}
}
function findSlide(hash) {
var target = null;
var slides = GetElementsWithClassName('*','slide');
for (var i = 0; i < slides.length; i++) {
var targetSlide = slides[i];
if ( (targetSlide.name && targetSlide.name == hash)
|| (targetSlide.id && targetSlide.id == hash) ) {
target = targetSlide;
break;
}
}
while(target != null && target.nodeName != 'BODY') {
if (hasClass(target, 'slide')) {
return parseInt(target.id.slice(5));
}
target = target.parentNode;
}
return null;
}
function slideJump() {
if (window.location.hash == null) return;
var sregex = /^#slide(\d+)$/;
var matches = sregex.exec(window.location.hash);
var dest = null;
if (matches != null) {
dest = parseInt(matches[1]);
} else {
dest = findSlide(window.location.hash.slice(1));
}
if (dest != null)
go(dest - snum);
}
function fixLinks() {
var thisUri = window.location.href;
thisUri = thisUri.slice(0, thisUri.length - window.location.hash.length);
var aelements = document.getElementsByTagName('A');
for (var i = 0; i < aelements.length; i++) {
var a = aelements[i].href;
var slideID = a.match('\#slide[0-9]{1,2}');
if ((slideID) && (slideID[0].slice(0,1) == '#')) {
var dest = findSlide(slideID[0].slice(1));
if (dest != null) {
if (aelements[i].addEventListener) {
aelements[i].addEventListener("click", new Function("e",
"if (document.getElementById('slideProj').disabled) return;" +
"go("+dest+" - snum); " +
"if (e.preventDefault) e.preventDefault();"), true);
} else if (aelements[i].attachEvent) {
aelements[i].attachEvent("onclick", new Function("",
"if (document.getElementById('slideProj').disabled) return;" +
"go("+dest+" - snum); " +
"event.returnValue = false;"));
}
}
}
}
}
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName('a');
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute('href') && hasValue(anchor.rel, 'external')) {
anchor.target = '_blank';
addClass(anchor,'external');
}
}
}
function createControls() {
var controlsDiv = document.getElementById("controls");
if (!controlsDiv) return;
var hider = ' onmouseover="showHide(\'s\');" onmouseout="showHide(\'h\');"';
var hideDiv = '', hideList = '';
if (controlVis == 'hidden') {
hideDiv = hider;
} else {
hideList = hider;
}
controlsDiv.innerHTML = '<form action="#" id="controlForm"' + hideDiv + '>' +
'<div id="navLinks">' +
'<a accesskey="t" id="toggle" href="javascript:toggle();">&#216;<\/a>' +
'<a accesskey="z" id="prev" href="javascript:go(-1);">&#xab;<\/a>' +
'<a accesskey="x" id="next" href="javascript:go(1);">&#xbb;<\/a>' +
'<div id="navList"' + hideList + '><select id="jumplistx" onchange="go(\'j\');"><\/select><\/div>' +
'<\/div><\/form>';
if (controlVis == 'hidden') {
var hidden = document.getElementById('navLinks');
} else {
var hidden = document.getElementById('jumplist');
}
addClass(hidden,'hideme');
}
function fontScale() { // causes layout problems in FireFox that get fixed if browser's Reload is used; same may be true of other Gecko-based browsers
if (!s5mode) return false;
var vScale = 22; // both yield 32 (after rounding) at 1024x768
var hScale = 32; // perhaps should auto-calculate based on theme's declared value?
if (window.innerHeight) {
var vSize = window.innerHeight;
var hSize = window.innerWidth;
} else if (document.documentElement.clientHeight) {
var vSize = document.documentElement.clientHeight;
var hSize = document.documentElement.clientWidth;
} else if (document.body.clientHeight) {
var vSize = document.body.clientHeight;
var hSize = document.body.clientWidth;
} else {
var vSize = 700; // assuming 1024x768, minus chrome and such
var hSize = 1024; // these do not account for kiosk mode or Opera Show
}
var newSize = Math.min(Math.round(vSize/vScale),Math.round(hSize/hScale));
fontSize(newSize + 'px');
if (isGe) { // hack to counter incremental reflow bugs
var obj = document.getElementsByTagName('body')[0];
obj.style.display = 'none';
obj.style.display = 'block';
}
}
function fontSize(value) {
// if (!(s5ss = document.getElementById('s5ss'))) {
// if (!isIE) {
// document.getElementsByTagName('head')[0].appendChild(s5ss = document.createElement('style'));
// s5ss.setAttribute('media','screen, projection');
// s5ss.setAttribute('id','s5ss');
// } else {
// document.createStyleSheet();
// document.s5ss = document.styleSheets[document.styleSheets.length - 1];
// }
// }
// if (!isIE) {
// while (s5ss.lastChild) s5ss.removeChild(s5ss.lastChild);
// s5ss.appendChild(document.createTextNode('body {font-size: ' + value + ' !important;}'));
// } else {
// document.s5ss.addRule('body','font-size: ' + value + ' !important;');
// }
}
function notOperaFix() {
slideCSS = document.getElementById('slideProj').href;
var slides = document.getElementById('slideProj');
var outline = document.getElementById('outlineStyle');
slides.setAttribute('media','screen');
outline.disabled = true;
if (isGe) {
slides.setAttribute('href','null'); // Gecko fix
slides.setAttribute('href',slideCSS); // Gecko fix
}
if (isIE && document.styleSheets && document.styleSheets[0]) {
document.styleSheets[0].addRule('img', 'behavior: url(ui/default/iepngfix.htc)');
document.styleSheets[0].addRule('div', 'behavior: url(ui/default/iepngfix.htc)');
document.styleSheets[0].addRule('.slide', 'behavior: url(ui/default/iepngfix.htc)');
}
}
function getIncrementals(obj) {
var incrementals = new Array();
if (!obj)
return incrementals;
var children = obj.childNodes;
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (hasClass(child, 'incremental')) {
if (child.nodeName == 'OL' || child.nodeName == 'UL') {
removeClass(child, 'incremental');
for (var j = 0; j < child.childNodes.length; j++) {
if (child.childNodes[j].nodeType == 1) {
addClass(child.childNodes[j], 'incremental');
}
}
} else {
incrementals[incrementals.length] = child;
removeClass(child,'incremental');
}
}
if (hasClass(child, 'show-first')) {
if (child.nodeName == 'OL' || child.nodeName == 'UL') {
removeClass(child, 'show-first');
if (child.childNodes[isGe].nodeType == 1) {
removeClass(child.childNodes[isGe], 'incremental');
}
} else {
incrementals[incrementals.length] = child;
}
}
incrementals = incrementals.concat(getIncrementals(child));
}
return incrementals;
}
function createIncrementals() {
var incrementals = new Array();
for (var i = 0; i < smax; i++) {
incrementals[i] = getIncrementals(document.getElementById('slide'+i));
}
return incrementals;
}
function defaultCheck() {
var allMetas = document.getElementsByTagName('meta');
for (var i = 0; i< allMetas.length; i++) {
if (allMetas[i].name == 'defaultView') {
defaultView = allMetas[i].content;
}
if (allMetas[i].name == 'controlVis') {
controlVis = allMetas[i].content;
}
}
}
// Key trap fix, new function body for trap()
function trap(e) {
if (!e) {
e = event;
e.which = e.keyCode;
}
try {
modifierKey = e.ctrlKey || e.altKey || e.metaKey;
}
catch(e) {
modifierKey = false;
}
return modifierKey || e.which == 0;
}
function startup() {
defaultCheck();
createControls();
slideLabel();
fixLinks();
externalLinks();
// fontScale();
if (!isOp) {
notOperaFix();
incrementals = createIncrementals();
slideJump();
if (defaultView == 'outline') {
toggle();
}
document.onkeyup = keys;
document.onkeypress = trap;
document.onclick = clicker;
}
currentSlide();
}
window.onload = startup;
// window.onresize = function(){setTimeout('fontScale()', 50);}

View File

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
$for(author-meta)$
<meta name="author" content="$author-meta$" />
$endfor$
$if(date-meta)$
<meta name="dcterms.date" content="$date-meta$" />
$endif$
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
$if(description-meta)$
<meta name="description" content="$description-meta$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<link rel="stylesheet" href="css/style.css" />
$for(header-includes)$
$header-includes$
$endfor$
</head>
<body>
$for(include-before)$
$include-before$
$endfor$
<main>
$if(sitemap)$
<article class="sitemap">
<nav id="sitemap">
<h1><a href="index.html#start">bavbavhaus.net</a></h1>
<ul>
$for(sitemap)$
<li>$sitemap$</li>
$endfor$
</ul>
</nav>
</article>
$endif$
$for(backlinks)$
<article class="backlink">
$backlinks$
</article>
$endfor$
<article id="start">
$if(title)$
<h1><a href="$url$">$title$</a></h1>
$endif$
$if(toc)$
<nav>
$if(toc-title)$
<h2>$toc-title$</h2>
$endif$
$table-of-contents$
</nav>
$endif$
$body$
</article>
$for(forelinks)$
<article class="forelink">
$forelinks$
</article>
$endfor$
</main>
$for(include-after)$
$include-after$
$endfor$
</body>
</html>

View File

@ -0,0 +1,12 @@
$if(title)$
<h1><a href="$url$">$title$</a></h1>
$endif$
$if(toc)$
<nav>
$if(toc-title)$
<h2>$toc-title$</h2>
$endif$
$table-of-contents$
</nav>
$endif$
$body$

View File

@ -1,3 +0,0 @@
[[!meta title="$title$"]]
$body$

View File

@ -0,0 +1,85 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
$for(author-meta)$
<meta name="version" content="S5 1.1" />
<meta name="author" content="$author-meta$" />
$endfor$
$if(date-meta)$
<meta name="date" content="$date-meta$" />
$endif$
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<style type="text/css">
$styles.html()$
</style>
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
$for(css)$
<link rel="stylesheet" href="$css$" type="text/css" />
$endfor$
<!-- style sheet links -->
<link rel="stylesheet" href="$s5-url$/slides.css" type="text/css" media="projection" id="slideProj" />
<link rel="stylesheet" href="$s5-url$/outline.css" type="text/css" media="screen" id="outlineStyle" />
<link rel="stylesheet" href="$s5-url$/print.css" type="text/css" media="print" id="slidePrint" />
<link rel="stylesheet" href="$s5-url$/opera.css" type="text/css" media="projection" id="operaFix" />
<!-- S5 JS -->
<script src="$s5-url$/slides.js" type="text/javascript"></script>
$if(math)$
$math$
$endif$
$for(header-includes)$
$header-includes$
$endfor$
</head>
<body>
<main>
<article class="presentation">
$if(title)$
<div class="title-slide slide">
<hgroup>
<h1 class="title">$title$</h1>
$if(subtitle)$
<h2 class="subtitle">$subtitle$</h2>
$endif$
</hgroup>
$if(author)$
<address>
<span class="author">$for(author)$$author$$sep$<br/>$endfor$</span>
$if(institute)$
<span class="institute">$for(institute)$$institute$$sep$<br/>$endfor$</span>
$endif$
</address>
$endif$
$if(date)$
<time class="date">$date$</time>
$endif$
</div>
$endif$
$if(toc)$
<div class="slide" id="$idprefix$TOC">
$table-of-contents$
</div>
$endif$
$body$
</article>
</main>
<footer>
<span>$title$</span>
<span>$author$</span>
<span>$date$</span>
<select id="jumplist" onchange="go('j');"></select>
<span>
<button onclick="go(-1);">&lt;</button>
<span id="currentSlide"></span>
<button onclick="go(1);">&gt;</button>
<span>
</footer>
</body>
</html>