  We give explicit formulas and algorithms for the computation of the
Thurston-Bennequin invariant of a nullhomologous Legendrian knot on a page of a
contact open book and on contact Heegaard surfaces. Furthermore, we extend the
results to rationally nullhomologous knots in arbitrary 3-manifolds.
