mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
update
This commit is contained in:
16
latex/header.lua
Normal file
16
latex/header.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
Reference in New Issue
Block a user