The placement of tooltip is controlled by the WML of the GUI engine. The
code is not used yet, only available with a proof-of-concept define named
DEBUG_TOOLTIP.
Use cleveref and add some helper macros for references it can't handle
(yet). Support for listings is in a newer version, so look at that in
the future.