summarylogtreecommitdiffstats
path: root/pgf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pgf.patch')
-rw-r--r--pgf.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/pgf.patch b/pgf.patch
new file mode 100644
index 000000000000..0b178245b58c
--- /dev/null
+++ b/pgf.patch
@@ -0,0 +1,45 @@
+--- cmscontrib/gerpythonformat/templates/lg/graphdrawing.tex 2019-02-01 20:37:11.175618929 +0100
++++ /tmp/graphdrawing.tex 2019-02-01 20:45:34.593613925 +0100
+@@ -2,6 +2,42 @@
+ \usetikzlibrary{graphs}
+ \usetikzlibrary{graphdrawing}
+
++\usepackage{luacode}
++\begin{luacode}
++ function pgf_lookup_and_require(name)
++ local sep = '/'
++ if string.find(os.getenv('PATH'),';') then
++ sep = '\string\\'
++ end
++ local function lookup(name)
++ local sub = name:gsub('%.',sep)
++ local find_func = function (name, suffix)
++ if resolvers then
++ local n = resolvers.findfile (name.."."..suffix, suffix) -- changed
++ return (not (n == '')) and n or nil
++ else
++ return kpse.find_file(name,suffix)
++ end
++ end
++ if find_func(sub, 'lua') then
++ require(name)
++ elseif find_func(sub, 'clua') then
++ collectgarbage('stop')
++ require(name)
++ collectgarbage('restart')
++ else
++ return false
++ end
++ return true
++ end
++ return
++ lookup('pgf.gd.' .. name .. '.library') or
++ lookup('pgf.gd.' .. name) or
++ lookup(name .. '.library') or
++ lookup(name)
++ end
++\end{luacode}
++
+ \usegdlibrary{force, layered}
+
+ \directlua{require("graphdrawing.lua")}