latex-make enters debian

For all of you folks that always complain about how difficult it is to create latex documents with those complex Makefiles compiling figures, linking eps’s, doing bad works to generate pdf or ps automatically, latex-make is here.

It’s a makefile include file to help you compile and track dependencies of a latex document. For example, if you want to compile a latex-only document (of one or more files), you only have to create a Makefile with one line. Imagine the master tex file is called mydocument.tex. Then you would write a Makefile with two lines like this:

LU_MASTERS=mydocument.tex

include LaTeX.mk

If you want to state which kind of outputs you want it to compile by default, you only have to state the flavors (PS, DVIPDF and/or PDF):

FLAVORS=DVIPDF

And about the figures. If you have the figures of your document in figures directory, you only have to add:

LU_mydocument_GPATH=figures

There are more interesting points. It adds a module to handle .fig files and bibliographies.

GtkNotebook and Dogtail

This week I’ve been hacking a while around Dogtail. It’s a Python library intended for implementation of functional tests of applications providing accessibility support through AT-SPI. It lets you check and manipulate the user interface from Python scripts, and it’s easy to integrate it into test cases.

While I was working, I found that I could not easily browse tabs in a GtkNotebook using dogtail. This issue has been reported in Gnome bugzilla (bug report). The problem is:

  • Dogtail uses Python SPI bindings (in project pyspi) to access the accessibility layer. This bindings are a direct wrapper over CSPI.
  • GtkNotebook accessibility implementation has the page tab list role, and the tabs have the page tab role. The notebook exposes the currently selected tab through the Selection interface. It lets you specify a selection of children of an accessible container.
  • Unfortunately neither Python SPI bindings nor Dogtail provide support for this. Then it’s not easy to change the currently active tab of a notebook.

I’m not the only one that has detected the problem this way. Peter Johanson has sent two bugs and patches to solve the issue and add tab browsing support in Dogtail (report in Pyspi and report in Dogtail). In parallel I was developing similar patches. As Peter Johansons’ are more complete, I’ve simply added some functionalities this morning to the dogtail patch to provide an easier way to use the selection interface in Dogtail. I’ve uploaded the new patch to the Dogtail bug report.

Now you can simply write:

focus.application('gedit')
focus.widget(roleName='page tab', name='My tab')
focus.widget.node.select()

And it raises the desired tab easily. Hope those patches go upstream. I think they're a good solution for the tab browsing issue.

DBUS and the power and network managers

Some time ago, in the Guadec-es in Coruña, there was an interesting meeting to talk about interesting enhancement in Gnome desktop. It was mainly centered in i18n issues, but I talked about the way other platforms work in network APIs.

Briefly, I missed a way to know about network status and manage connections, as other platforms do (for example, we get this kind of API in Microsoft Windows related SDK with Connection Manager API. The same applies to power management.

But now there’s an interesting work to face this issue. If Network manager and Power manager DBUS message providers get more or less standarised in Linux distros, we’ll get an standard API to do this kind of use cases:

  • Know if we’re connected to the internet
  • Bring up the default network connection to the internet if it’s shut down. (Useful for devices like palms or mobile phones or even PC’s with analog modem internet). Maybe with a standard dialog in Gnome.
  • Some knowledge about the network status.
  • Know if the PC or device is plugged, and then decide if our application wants to save power or not.

It seems these managers, and their use of DBUS, are the way to go. Good luck!