Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom markup tags #462

Open
gwyndaf opened this issue Nov 20, 2024 · 0 comments
Open

Custom markup tags #462

gwyndaf opened this issue Nov 20, 2024 · 0 comments

Comments

@gwyndaf
Copy link

gwyndaf commented Nov 20, 2024

As per user forum discussion

From a user point of view, an example might be defining <bv> for backing vocals and <hc> for highlighted chord, used as:

[C]Lead vocal [<hc>G</hc>]lyric <bv>yeah, yeah, yeah</bv>

(I don't format chords ad hoc within songs, so not exactly sure whether markup should be fall inside or outside [ ]).

Config could be as brief as:

"markup_styles" : {
  "bv" : "style=italic color=#444444",
  "hc" : "background=yellow size=larger"
  }

Rationale/issues:

  • Essentially, we define the parameters to be added for a span tag, so there's no need to put span in the definition, but that gets added in translation.
  • Closing the user-defined tag, e.g. </bv> automatically translates to </span>, so no need to define that.
  • Could this be used to redefine existing convenience tags? Ideally, I think yes, but don't know what the implications are.
  • Custom tags won't make sense to third-party software (e.g. MSP), but that can be avoided by re-generating more compatible (but less readable) ChordPro files.
  • This could go within the pdf config section, or more general settings so it works with other output formats. I think the point above suggests is should be a general setting, so custom tags get expanded to full <span> tags for ChordPro output as well as PDF.
  • There may be overlap with more general discussion on custom styles (Custom styles #404), which seems a longer-term topic, but might be a consideration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants