[NTG-context] minimal app to control layers

andrea valle valle at di.unito.it
Mon Oct 16 18:44:42 CEST 2006

Dear all,

Following the thread on layers:

(1. thanks to all)


I use ConTeXt for many things, but quantitatively mostly for slides. 
Powerpoint is rude in its graphic abiltities but it has two features 
ConTeXt has not. First, you can draw on the screen. Second, you can 
import and stack images as you prefer. I'm not interested in the first 
feature, as I use a specific sw for drawing, and then import the 
result. But I am (sometimes) interested in the second one (let's call 
it "compositing").

In ConTeXt one can evidently use layers to exactly place and stack 
everything as needed (images, text). But, especially  while preparing 
slides (a book worth the efforts indeed), it can be tedious to wrote 
all the code stuff.

So, I created a minimal app in python using tkinter which allows to 
manipulate visually areas ("boxes" in the app terms) which can the be 
filled with images.
The app has a second window which continuously updates with conTeXt 
code generated by the gui.

The idea is that the user prepares a visual layer, then switches to 
code window,  copy the generated code and paste it in the .tex file. 
Finally code is definitively modified it in the source, as usual.

It's very simple, I've tested and it seems to work. But it can be buggy.

I don't know if it can of any interest to anyone in the communities.
In any case, comments related to whatsoever aspect are welcome.

Actually, I've not documented it but it should be obvious. GUI should 
be completely portable.
Sources are here:

To run: >> python boxerController.py



Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
andrea.valle at unito.it

More information about the ntg-context mailing list