vojtechkral / bard

Markdown-based songbook compiler.
https://bard.md/
Apache License 2.0
48 stars 3 forks source link

Intro and Solo parts #12

Closed Lamera closed 2 years ago

Lamera commented 2 years ago

Hi @vojtechkral ! I made the songbook and I use your software regularly to add new songs. Again, I'm very happy with your solution! Thank you very much! Do you have a solution to bring the chords without lyrics on the same line as the custom labels (to save space) like Solo and Intro parts? At the moment I have here some songs that have repeating Intro, Solo or Instrumental parts and there I add "x2" and the result looks like this (and I'm not quite happy with this): grafik grafik

I could just write the chords as text, but these wouldn't transpose then: grafik

Maybe you have also a better idea to display repeating parts?

vojtechkral commented 2 years ago

Yeah, I've actually ran into this myself. It's a bit annoying, yes.

What about this: We could mark cords with an underscore (_) to indicate that they're supposed to go on the baseline of the text. Ie. with a single chord, this would be `D_`. With multiple chords, you could write something like `D_A_G_D` and they would go on the baseline.

What do you think?

In any case, I'm pretty busy this week, but I should be able to get back to bard next week.

vojtechkral commented 2 years ago

Maybe you have also a better idea to display repeating parts?

Typically I just use [: repeated part :], nothing too fancy...

Lamera commented 2 years ago

Yeah, I've actually ran into this myself. It's a bit annoying, yes.

What about this: We could mark cords with an underscore (_) to indicate that they're supposed to go on the baseline of the text. Ie. with a single chord, this would be `D_`. With multiple chords, you could write something like `D_A_G_D` and they would go on the baseline.

What do you think?

In any case, I'm pretty busy this week, but I should be able to get back to bard next week.

Sounds good to me. The underscore should be before the chord? To indicate the chord should be on the baseline? The thingy with multiple chords would then look like this: _D_A_G_D. Does this make sense?

vojtechkral commented 2 years ago

Sounds good to me. The underscore should be before the chord? To indicate the chord should be on the baseline? The thingy with multiple chords would then look like this: _D_A_G_D. Does this make sense?

I haven't decided yet, I'll think about it, I might make it such that it will be baselined if _ is anywhere, regardless of whether in front or tail...

vojtechkral commented 2 years ago

(Reopen to keep track that this needs a release.)

vojtechkral commented 2 years ago

@Lamera This is now implemented and released as 2.0.0-alpha1. Alpha release only for now as I still need to tie up a few loose ends for the final release.

With this release, you should be able to use chords with underscores like C_ or _C or C_F_G (it doesn't matter where the underscore is placed).

I also made a few other changes, most importantly, the HTML snippets from #11 are now prefixed with h- in order to avoid clashes, so for example these snippets

{{#*inline "small"}}\small{}{{/inline}}
{{#*inline "/small"}}\normalsize{}{{/inline}}

should become

{{#*inline "h-small"}}\small{}{{/inline}}
{{#*inline "h-/small"}}\normalsize{}{{/inline}}

in the new version (when the template is updated).

I've also started packing fonts with the default project, so if you use the new template, you might need to copy the output/fonts directory from the new default project. This ensures rendering works even if those fonts aren't installed in the running OS.