vojtechkral / bard

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

Feature: capo declaration #20

Open Lamera opened 10 months ago

Lamera commented 10 months ago

Hello @vojtechkral Thanks for your continous work. I just updated my songbook to the latest version 2.0.1.

I have many songs that require a capo. Until now I declared the capo like this:

# song1
## band

K:2

The problem is that the page size is limited and sometimes a page break occurs just because of this one line. I would like to see a feature that handles this K:2 and places it to the top right of the page so it doesn't take up any more vertical space. And maybe we can highlight that using a red bold font. What do you think?

vojtechkral commented 10 months ago

Hi. I would recommend doing this using a syntax extension, like this

# song1
## band

<capo>2</capo>

See the Custom Extensions documentation on how to do this. Wdyt?

Lamera commented 10 months ago

I think this should work. But I also think this is something that should be defined in the default template. I just have to figure out on how to place the item to the correct position on the page …

Btw: can we define a custom extension file where all special customizations from a template are stored. And this file would then be loaded into the default template? So it would be more practical to update to a newer template version?

vojtechkral commented 10 months ago

But I also think this is something that should be defined in the default template.

I mean, maybe, it's easy to overcomplicate it. I had similar feelings about time signatures (4/4, 3/4, etc.) but ultimately I left them out even though it would be useful sometimes.

Btw: can we define a custom extension file where all special customizations from a template are stored. And this file would then be loaded into the default template? So it would be more practical to update to a newer template version?

Yeah. It's a bit tricky and it would still not guarantee a seamless udpate, but would improve the practicality. So yes, I'll have a look into it at some point.