mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
17 lines
515 B
Lua
17 lines
515 B
Lua
require("lualibs.lua")
|
|
local file = io.open('../package.json')
|
|
local jsonstring = file:read('*a')
|
|
file:close()
|
|
jsondata = utilities.json.tolua(jsonstring)
|
|
|
|
function addHeader()
|
|
if jsondata["watermark"] ~= nil and jsondata["watermark"] ~= false then
|
|
tex.print("\\usepackage{draftwatermark}")
|
|
tex.print("\\SetWatermarkLightness{0.9}")
|
|
tex.print("\\SetWatermarkScale{6}")
|
|
if jsondata["watermark"] ~= true then
|
|
tex.print("\\SetWatermarkText{" .. jsondata["watermark"] .. "}")
|
|
end
|
|
end
|
|
end
|