Luatodonotes: Boundary Labeling for Annotations in Texts

We present a tool for annotating Latex documents with comments. Our annotations are placed in the left, right, or both margins, and connected to the corresponding positions in the text with arrows so-called leaders. Problems of this type have been studied under the name boundary labeling. We consider various leader types straight-line, rectilinear, and Bezier and modify existing algorithms to allow for annotations of varying height. We have implemented our algorithms in Lua; they are available for download as an easy-to-use Luatex package.