work in progress... but see the SMARTIES LIBRARIES FOR WALL APPLICATIONS setion of thispaper and the example directory of the libSmarties source.