I've recently started experimenting with LilyPond (Version 2.18.2 in case it matters). I've been fairly successful in creating basic scores, but I cannot figure how to properly make position/barre markers for my guitar scores.
The documentation suggests using Text Spanners for this purpose and using this method I've been able to produce the following output:
While basically functional, I'd prefer if I could make them look closer to this (made in MuseScore):
More specifically the things I'd like to do in LilyPond are:
1. Make the line be aligned to the middle of the numeral rather than the bottom.
2. Having the option adding a "hook" at the end of the line, indicating the extent of the barre.
I've experimented with the options for Text Spanners but have been unable to make any progress. I also found this suggested solution but not only am I unable to follow what's actually going on, the pictured output doesn't match what I hope to achieve.
In short, what I'm asking is:
1. Is it possible to achieve what I'm after using Text Spanners, and how would I go about doing it?
2. If not, is there some other feature/workaround that I could try that would produce the desired output?
3. If neither is possible, is there some alternate way to convey the same information using a feature which is easier to produce in LilyPond?