I made a extension for including Lilypond music notes. I made the extension
by modifying mathbase.py and pngmath.py. Most codes are copied and pasted
with some tiny changes. I don't know whether it is ok and I also don't know
what to put in the :copyright: area, so I just put my name there. If you
know what to put, please tell me.
The functionalities of the extension are:
- A new role 'lily'. the 'lily' role can input a standalone music markup.
For example, a G clef can be inserted by
:lily:`clefs.G`
The purpose of the 'lily' role is writing music comments or learning notes.
So only one markup is allowed.
- A new directive 'lily'. The 'lily' directive can input a piece of music
script, for example,
.. lily::
\relative c'' {
c4 a d c
}
- A new config 'pnglily_fontsize', which can be used to set fontsize of
'lily' role and 'lily' directive.
pnglily_fontsize = ['6', '-3']
The first value is for 'lily' role setting in absolute fontsize. The
second value is for 'lily' directive setting in relative fontsize.
Hope you enjoy with it!
Best wishes,
Wei-Wei
I changed the preamble of the extension and made some changes, so I attach it
here again.
Now the G clef should be inserted by
:lily:`\musicglyph #"clefs.G"`
Guenter Milde 写道:
> On 2009-04-06, Wei-Wei Guo wrote:
>
>> I made a extension for including Lilypond music notes. I made the extension
>> by modifying mathbase.py and pngmath.py.
>
> Thanks for the extension. This might be also interesting for the Docutils,
> so that stand-alone documents can be created. Maybe as a sandbox project.
Maybe lilypond-book is better for stand-alone documents. And the extension still
has many things needed to be done with the 'lily' role....
Best wishes,
Wei-Wei
Wouldn't it be good to integrate this module into Sphinx? Or is it
better to create a separate project at code.google or sourceforge?
I'm basically willing to contribute, maybe with patches but at least
with ideas. OTOH I'm doing this in my spare time, and currently I have
no urgent concrete usage for it.
Luc
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
> To post to this group, send email to sphin...@googlegroups.com
> To unsubscribe from this group, send email to sphinx-dev+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
Luc
Version on bitbucket is not up-to-date.
Wei-Wei, are you going to push latest changes in the next future?
Look forward to seeing any emprovement.
Thanks and regards,
Federico