JSPDF: Difference between revisions

Find traditional instrumental music
No edit summary
No edit summary
Line 8: Line 8:
svg {display:block}
svg {display:block}
</style>
</style>
<style type="text/css">
</head>
</head>
<body bgcolor="#faf0e6">
<body bgcolor="#faf0e6">
Line 22: Line 21:
and the script <code>abcemb-1.js</code> which scans the document and replaces
and the script <code>abcemb-1.js</code> which scans the document and replaces
the ABC sequence(s) by SVG images.
the ABC sequence(s) by SVG images.
</p>
<p>
For playing the tune, this document simply includes the script
<code>play-1.js</code>. Check it by clicking the score!
</p>
</p>



Revision as of 12:54, 19 May 2017

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <script src="http://moinejf.free.fr/js/abc2svg-1.js" type="text/javascript"></script> <script src="http://moinejf.free.fr/js/abcemb-1.js" type="text/javascript"></script> <script src="http://moinejf.free.fr/js/play-1.js" type="text/javascript"></script> <style type="text/css"> svg {display:block} </style> </head> <body bgcolor="#faf0e6">

<h3>abcemb-1.js example</h3>

<p> This XHTML document contains a ABC tune ('Au clair de la lune'). </p> <p> To render this tune, it includes the abc2svg core (script <code>abc2svg-1.js</code>) and the script <code>abcemb-1.js</code> which scans the document and replaces the ABC sequence(s) by SVG images. </p>

%abc-2.2 %%pagewidth 12cm %%bgcolor white %%topspace 0 %%composerspace 0 %%leftmargin 0.8cm %%rightmargin 0.8cm X:1 T:Au clair de la lune C:Unknown M:C L:1/4 Q:1/4=140 K:C cccd | e2d2 | cedd | c4 :| dddd | A2A2 | dcBA | G4 | cccd | e2d2 | cedd | c4 ||

</body> </html>