This commit is contained in:
Morten Olsen
2021-08-26 14:40:51 +02:00
parent 315fb5721c
commit 0cc7078b1b
21 changed files with 4051 additions and 109 deletions

16
latex/header.lua Normal file
View 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