Verovio options can be embedded directly in Humdrum data. When the data is processed by verovio, the options will be used to control the rendering of the music notation.

The basic format for an embedded option is

!!!verovio: spacingStaff 0

The line starts with !!!verovio: followed by a camelCase verovio option name (as used in the Javascript version of the verovio toolkit), followed by at least one space and then the value for that option. Multiple options can be given in the file, with one option on each line. In the above case, the spacing between staves is set to 0. Compare the following example that uses the default staff spacing:

Adding an option to widen the spacing between staves:

See the complete list of verovio options that can be embedded along with their default values and allow ranges for numeric options.

The options can occur at any location in the file. Duplicate options give priority to the last occurence in the file. For option parameter groups, the groups will be processed in the order in which they are listed in the file (probably).

Option sets

Multiple option sets can be embedded into a file. For example, here are two option groups for staff spacing:

!!!verovio-compact: spacingStaff 0
!!!verovio-spacious: spacingStaff 20

To activate a particular option group, add a line such as the following to the file:

!!!verovio-parameter-group: spacious

This will cause the “spacious” option group to be used, while all other groups will be ignored:

Now choosing the “compact” parameter group:

Note that embedded verovio parameters not belonging to a specific group will always be active. To use such parameters as default values for a parameter, place them above any group equivalents. If placed afterwards, the will supercede the group parameters.

Here is the proper use of the default parameters, allowing the group parameter set “spacious” to override it: