Ipelib
Programming in Lua

The library libipelua implements Lua bindings for many classes in Ipelib. The bindings are available in Lua ipelets, as well as in Lua scripts executed using the ipescript program.

These pages document the Lua bindings to Ipelib:

When writing Ipelets in Lua, you have access to additional methods provided by the Ipe program itself:

Examples

Here is a Lua script that reads an Ipe document and then recenters each page on the paper. You can run this script as "ipescript recenter".

The following script prints out all the gradients defined in a document:

And here is a script that shows how to add a gradient to a document (the same technique works for tilings and effects):

For more examples, have a look at the scripts in your Ipe installation, such as add-style.lua or update-styles.lua.