Embedded options

Humdrum notation plugin options can be embedded within Humdrum digital scores. This is useful for several types of cases, the main one being to automate conversion of a Humdrum text scripts. Here are two notation examples, where both are processed with a for-loop loading each example into displayHumdrum().

Large print:

Small print:

Options can be embedded into a humdrum file reference record according to this structure:

!!!hnp-option: parameter: value

where parameter is the name of an option parameter, and value is the value that the option is set to. Spaces are optional before or after colons surrounding the parameter name. Some Humdrum notation plugin options will be ignored (you get to figure out which ones, but some of them are source, target, and url). Mostly embedded options are intended for typesetting options, such as spacingStaff, and scale.

Large print:
<script class="auto" type="text/x-humdrum" id="large">
**kern
*M4/4
=1
4c
4d
4e
4f
4g
4a
4b
4cc
4b
4a
4g
4f
4e
4d
4c
==
*-
!!!hnp-option: scale: 70
</script>

Small print:
<script class="auto" type="text/x-humdrum" id="small">
**kern
*M4/4
=1
4c
4d
4e
4f
4g
4a
4b
4cc
4b
4a
4g
4f
4e
4d
4c
==
*-
!!!hnp-option: scale: 20
</script>


<script>
document.addEventListener("DOMContentLoaded", function() {
   var hscripts = document.querySelectorAll("script.auto");
   for (var i=0; i<hscripts.length; i++) {
      displayHumdrum({source: hscripts[i].id})
   }
})
</script>