page-format int

Default Scope Available in
(undefined) tunetxtmus
abc2svg >= 1.20.15

Set or unset page formatting.

When page formatting is set, txtmus or abc2svg adds <div> elements with a class nobrk around the SVG images of the tunes. This prevents the music to be split on page boundaries.

This page formatting mode is automatically set when %%pageheight is present.

This parameter may also be used to prevent gaps between the SVGs after inlining the music. In this case, the style would contain:

.nobrk {display:inline-block}
.nobrk svg {display:block}

SourceRendering
<script type="text/vnd.abc">
%abc-2.2
%%musicfont url(../js/abc2svg.woff2)
%%leftmargin 0
%%rightmargin 0
%%topspace 0
%
%%titlespace 0
%%musicspace 0
%%composerspace 0
%%staffsep 0
%%bgcolor #fff
</script>
<p>
Inline music
<span style="vertical-align:-12%;
  display:inline-block">
<script type="text/vnd.abc">
X:1
%%singleline 1
%%scale 0.5
K:none stafflines=0 clef=none
V:1 stem=up
|A2A4|

</script>
</span>
and text.

<p>
Full tune:
<span style="vertical-align:-80%";
  display:inline-block">
<script type="text/vnd.abc">
X:2
T:Scale of "C"
%%page-format 1
%%pagewidth 8cm
%%leftmargin .5cm
%%rightmargin .5cm
M:4/4
L:1/4
K:C
CDEF | GABc |

</span>
</script>

Inline music and text.

Full tune:

abc2svg documentation source author - page hosted by Free