How do I align text with character (Solved)

I use Libre Office for all of my Musical Chord Charts currently I have alternating rows styles as Chords and Default. Both styles are set at Noto Mono and 11 point. If, however I need to increase the size of the Chord style text, I then have to also increase the size of the default correspondingly. In normal circumstances this would not matter. HOWEVER! I wish to keep the Default style at the original size and have the Chords increase as I desire. By using text boxes I can align the Text with the Correct Chord but this is a fiddly operation that works. I’ve tried Frames but the line spacing becomes problematic when the line wraps because of the larger font size.

How can I for example, ensure that (in the following) “word” is always aligned with “D”, “Second” with “F” and so forth regardless of the font size of D, F, and Em? Will I have to resort to text boxes to perform such a task?
eg.
D___ F___________________ Em
word second word verse and so forth

1 Like

It sounds as if you might need a table with the word in the cell below the chord cell.

Before you go down that route, have you checked out the extension site? This is a search on music, Extensions » Libreoffice Extensions

This looks like a job for Ruby text (Asian Phonetic Guide). Despite the name, it may be used in any text, not only Asian; but it only appears in Format menu, when Asian languages support is enabled in language options.

By default, “Rubies” character style is 6 pt; but on the screenshot, I made it 14 pt. Note that I didn’t even use monospace fonts. You may use different styles for different guide instances, thus allowing you to have some of them e.g. emphasized, increased, whatever.

3 Likes

Thanks, Earnest I have looked at all of those. They did not offer enough of what I am looking for. I’ve already developed code to transpose to any key including Nashville Numbers. Every Chord line is a special format using noto mono font of the same size as the line below. Problem being, if I increase the size of the font, then the formatting becomes unworkable.
By including the text in a text box anchored to the Chord, this works, but this is a slow and tedious task.

Thanks for that, mikekaganski, I shall investigate this further.
Is there a method whereby I can perform a search and replace on those characters. My current setup allows me to transpose the chords based upon their default style, otherwise, this looks perfect.

As far as I know, there’s no built-in search to look inside fields (the Rubies are fields; we have tdf#70142). A macro could do that.

That’s a pity, I have developed macros to perform most of the tasks in my document, but I’d suspect that this would complicate them even more. I’ve already got about 1000 lines of macros to perform various tasks including transposition and formatting. I might just work with text boxes as, the lyrics never change. Thanks anyway.

in case … Extension AltSearch - bugs and requests

Why do we insist on using Writer for something for which it is not prepared?
There are specialized programs to treat music, Chord and Lirics.
I agree with @EarnestAl, you can use an extension

Unfortunately, none of the programs do not format music as I desire. Not many support Nashville Numbers which is essential to me when I play bass. I also prefer to have inversions noted in a different colour and need the facility to enlarge text from time to time. My current process is to create a setlist from my songs (each is a separate writer document, formatted) in one document then exporting it as a PDF which is then displayed on a tablet also running Linux. I then use a pedal to scroll through the document.

Many of the apps do provide some functions, but not all. I am just attempting to make something that works for me. I may have to get into php and another programming language to write something for myself, its just that Libre Office has the potential to do what I need. At this point I am now linking text boxes to chords and this seems to be the most suitable for now. Below is an example

imagen
imagen

The problem with that Leroy is that you are also increasing the size of the text. I only need the chords enlarged. I achieve that using paragraph styles. (I could also use a character style). My problem with using Rubies is that the chords are then unable to be modified automatically should need to transpose a song. As I already stated, text boxes seem to be the most suitable solution. I do, however, wonder if there is a global style that can be assigned to text boxes so that I could, possibly, change one of the style attributes without having to modify each and every text box.

The changes to Ruby text size and paragraph text size are not related (done changing the style).

Why not with a macro?

Unless you customise your inserted rubies, they are character-styled Rubies. All you need to do is to modify character style Rubies (or the one you selected). Since this character style can be assigned ruby by ruby, you can have several independent chord annotations which you control separately with their dedicated character styles.

No. Text boxes like any other drawing object are external to text and can’t be controlled by styles. Thus you must edit them one by one.

Thank you very much, I missed the rubies character style when first I looked at it. It will make my job even easier than using text boxes which, to me, was a huge pain for a gain that I was willing to make, Rubies is much better than that!

There does remain the problem of transposition. can I perform a search and replace on Ruby text? Otherwise it’s back to I had the bright idea of linking rubies to the chord rather than the text, except when the chord is changed (i.e. in transposing) it loses the ruby text. I’m still playing with it and it appears that linking to spaces might solve that issue, is it easier than text boxes, remains to be seen. It, at least allows me to modify the size of the text as well as the chords and still have everything line up.

After fiddling with Ruby text and liking the text to spaces it gave some interesting results which would require even more formatting to resolve, I shall live with text boxes as they, at least can be linked to the chord without going missing when I change the chord.

Thanks guys and gals for all your help, it was/is and interesting exercise. I might just have to get back into programming again and write some code to make my issues easier. :smiley:

In that case, rather than text boxes you should consider Frames. The frame style Inline Heading could be used as an example of using a frame to get around a restriction. In that case a restriction against having two paragraph styles on the same line.

Frames can include paragraph and character styles, in fact, pretty much anything a page can contain

1 Like

Thanks for that Earnest, I might look at Frames,
My last response indicated that text boxes were my preferred method, however, they did not respond to size changes well, Ruby, does, so, that seems to be the better solution, so far.
Is there a method whereby you can set the default position of ruby text to “bottom” and the default “Character style” in the “Asian Phonetic Guide” window?

1 Like

Frames are almost as problematic as text boxes, however my final solution is to use rubies for text below the chords and use frames in the background for highlighting different sections.
Thank you all, once again for your input!

1 Like

Inserting and Editing Tab Stops