I think the title is obvious but I will explain my idea with the following picture:
(I am using moderncv classic style toghether with moderntimeline)
The first panel on the left shows the current output. The one in the center is something that I put together in photoshop to explain my objective (see below). The right panel is what I expect to obtain.
This is not a new problem and other have given good solutions to the problem (moderntimeline: alignment of text on start and end of bars or Moderncv with moderntimeline - how do I center the label above the timeline?).
However, none of them fulfill all my requirements and most of all they are not completely automatic, i.e. if the time scale changes I will have to change some code by hand).
We know the length of
hintscolumnwidth because we have to set it and here in my example is represented by green lines. All I want is the labels of
\tldatelabelcventry to stay inside that space. However, if the label using the default settings does not cross the green lines (orange box) than it should be left as is.
Now let's consider that the label is inside a box (here represented by blue and orange). If that box cross the green lines (blue box) than it should be moved either left or right. But how much? well it should be the minimum value so its border align with the green line it has crossed.
This way, the label keeps some "information" to its mark but is also aligned within hintscolumn.
I think if one could work with label boxes and
hintscolumnwidth than the process should be automatic and whenever the timeline increases the label box that was once blue could become orange and would not require the hack.