Generating functions of symplectomorphisms