| 1 |
|
| 2 |
require("pgfplots.binary") |
| 3 |
|
| 4 |
-- all classes/globals will be added to this table: |
| 5 |
pgfplots = {} |
| 6 |
|
| 7 |
-- will be set by TeX: |
| 8 |
pgfplots.pgfplotsversion = nil |
| 9 |
|
| 10 |
if _VERSION == "Lua 5.1" or _VERSION == "Lua 5.0" then |
| 11 |
texio.write("pgfplots: setting 'lua support=false': the lua version on this system is " .. _VERSION .. "; expected at least 'Lua 5.2'. Use a more recent TeX distribution to benefit from LUA in pgfplots.\n") |
| 12 |
|
| 13 |
-- the entire lua backend will be switched off if this is false: |
| 14 |
tex.sprint("\\pgfplotsset{lua support=false}") |
| 15 |
return |
| 16 |
else |
| 17 |
-- well, 5.2 is what this stuff has been written for. |
| 18 |
-- Is there a good reason why it shouldn't work on 5.1 !? No, I guess not. Except that it took me a long time |
| 19 |
-- to figure out that 5.2 broke compatibility in lots of ways - and it was difficult enough to get it up and running. |
| 20 |
-- If someone wants (and needs) to run it in 5.1 - I would accept patches. |
| 21 |
end |
| 22 |
|
| 23 |
require("pgfplots.pgfplotsutil") |
| 24 |
|
| 25 |
-- see pgfrcs.code.tex -- all versions after 3.0.0 (excluding 3.0.0) will set this version: |
| 26 |
if not pgf or not pgf.pgfversion then |
| 27 |
pgfplots.log("log", "pgfplots.lua: loading complementary lua code for your pgf version...\n") |
| 28 |
pgfplots.pgfluamathfunctions = require("pgfplotsoldpgfsupp.luamath.functions") |
| 29 |
pgfplots.pgfluamathparser = require("pgfplotsoldpgfsupp.luamath.parser") |
| 30 |
else |
| 31 |
pgfplots.pgfluamathparser = require("pgf.luamath.parser") |
| 32 |
pgfplots.pgfluamathfunctions = require("pgf.luamath.functions") |
| 33 |
end |
| 34 |
pgfplots.pgftonumber = pgfplots.pgfluamathfunctions.tonumber |
| 35 |
pgfplots.tostringfixed = pgfplots.pgfluamathfunctions.tostringfixed |
| 36 |
pgfplots.toTeXstring = pgfplots.pgfluamathfunctions.toTeXstring |
| 37 |
|
| 38 |
|
| 39 |
require("pgfplots.plothandler") |
| 40 |
require("pgfplots.meshplothandler") |
| 41 |
require("pgfplots.colormap") |
| 42 |
require("pgfplots.streamer") |
| 43 |
|
| 44 |
-- hm. perhaps this here should become a separate module: |
| 45 |
require("pgfplots.pgfplotstexio") |