show_source position source_prefix

Scope Available in
tunetxtmus
abc2svg >= 1.22.19

This command adds the music source as HTML <pre> elements in the SVG stream of the music. The SVGs of the associated tune are wrapped into a <div> with the class source, so that the source may appear in the same line as the music with a style .source {display:inline-block}.

position is optional. It is a single letter meaning:

b
let the source of the next tune before the music,
a
let the source of the next tune after the music,
+
let the source of all tunes after all the music,
*
dump the source up to the next %%show_source,
0
stop dumping the source.
When absent, the source goes before the music.

The source_prefix is a HTML sequence that is put before the source. The tags that are not closed are automatically closed at the end of the source.

This command cannot appear inside a tune.

In the following example, the command is
   %%show_source b<pre> before the first tune and
   %%show_source a<pre> before the second tune.
(both the source and the music elements have a style display:inline-block)

After the second tune, %%show_source *<pre> starts dumping the end of the source.

abc2svg documentation source author - page hosted by Free