Information Technology Reference
In-Depth Information
split line are labeled on the left side, those right of the split line are labeled in
the right margin. There are several ways to determine the position of this split
line. We use a weighted median to split the sites such that the sum of the label
heights on the left side is approximately equal to that of the right side. With this
algorithm it is not an issue if the widths of the two margins are different (which
means that the height of a label depends on the side on which it is placed).
5 Experimental Results
We compare the leader styles presented in the previous sections on an example
document with nine comments in it. This document stays the same, only the
options of our package are modified to switch between the available algorithms.
We used the label clustering approach described in the previous section for all
examples except for that of the po -leader algorithm. For comparison, we also
processed the document with the todonotes package (see Fig. 4a).
The NorthEastBelow algorithm for s -leaders (Fig. 4b) is straight-forward and
fast. It is easy for the reader to match the sites to their corresponding label.
Using Bézier curves (Fig. 4c) instead of the straight-line leaders yields a more
aesthetic result with the disadvantage of a significantly higher runtime caused by
the iterations of the force-directed algorithm. Using two-sided label placement
withthesameleadertypeproducesshorter leaders because the labels can be
placed closer to their site. Especially in text segments with a lot of comments
this makes the relationship between sites and their labels clearer.
Our algorithm for po -leaders (Fig. 4d) has a high asymptotic runtime and
space consumption. But in practice when there are only few comments per page
this is not an issue. Among the algorithms we implemented, this is the only
algorithm minimizing the total leader length.
The opo -leaders and os -leaders are available mainly for comparison. Clearly,
it gets hard for the reader to match sites to their labels on pages with many
comments. In particular, if several sites are in the same line it is hard to tell
the matching between sites and labels. On the other hand the leaders only run
between the lines and in the track routing area and thus don't disturb the text.
The running times of Luatex with the different leader types for some example
documents are shown in Table 1. Note that Documents 2 and 3 with 15 resp.
25 comments on one page are quite unrealistic. When using two-sided label
placement both sides are processed independently and thus the algorithm for
po -leaders becomes feasible again. The measured times are for a single run of
Tex only. When the absolute position of a site of a label changes, a second run
is needed. When we deactivate our package, processing still needs 1.4 seconds.
This means that s -and opo -leaders cause only small extra cost compared to
a standard Latex run. With the classical todonotes package processing needs
about 1.8 seconds, too.
We would have liked to give a numerical comparison of the drawing quality
of the different algorithms, but it is not obvious how to find an appropriate
indicator for the quality that is suitable for all of the available leader types. So
we ask the reader to inspect Fig. 4 visually.
 
Search WWH ::




Custom Search