Topics

Indent and add bar to Chorus when "quote" : false #resolved #ChordPro


com.sebright@...
 

Is it possible to offset and add bar to Chorus sections when "quote" : false?

My chordpro.json has the chorus section set like this:
    // Style of chorus.
    "chorus" : {
        "indent"     :  8,
        // Chorus side bar.
        // Suppress by setting offset and/or width to zero.
        "bar" : {
        "offset" :  4,
        "width"  :  2,
        "color"  : "red",
        },
        "tag" : "Chorus",
          // Recall style: Print the tag using the type.
          // Optionally quote the lines of the preceding chorus.
          "recall" : {
            "tag"   : "Chorus",
            "type"  : "chorus",
            "quote" : false,
          },
    },
Which for this input:
{title: Swing Low Sweet Chariot}

{start_of_chorus}
Swing [D]low, sweet [G]chari[D]ot,
...
{end_of_chorus}

# Verse
I [D]looked over Jordan, and [G]what did I [D]see,
...

{Chorus: Repeat Chorus}

Results in this:


My desired result would look something like this mockup:



If it is possible, how would I indent and bar the "Repeat chorus" without quoting the previous Chorus?


Johan Vromans
 

Have you considered to use

{start_of_chorus}
{comment: Repeat Chorus}
{end_of_chorus}

This seems to produce exactly what you are looking for.

PS: In your config file, you specify in the recall "type": "chorus". Instead of "chorus" you must use the name of a known "font", e.g. "comment".


com.sebright@...
 

Not quite, it results in:
 | Chorus
 | Repeat Chorus
I also tried:
{start_of_chorus: Repeat Chorus}
[]
{end_of_chorus}
Which results in:
 | Repeat Chorus
 | 
Which is closer and will have to do.

The "type": "chorus" was just a copy-paste error while trying different things. Thanks, I've corrected it.


Johan Vromans
 

I do not get the leading "Chorus" lines. What version are you running?


com.sebright@...
 

git master (chordpro --version reports 0.974_002)


Johan Vromans
 

Can you refresh your git (current is 0.974_050) and retry?


com.sebright@...
 

I've been tracking the master branch which is at  0.974_002, I switched to the dev branch (0.974_050) and I get no leading chorus lines. 


Johan Vromans
 

The dev version no longer uses the "tag" from the config file, but all sections can have margin labels. See https://github.com/ChordPro/chordpro/wiki/Directives-env#environment-directives

Does the dev version satisfy your original question?


com.sebright@...
 

It does indeed, thank you.