sphinxnotes-lilypond#

Documentation Status Open Source License PyPI Package PyPI Package Downloads

Sphinx extension for embedding LilyPond scores.

Introduction#

The extension is originated from sphinx-contrib/lilypond , allows LilyPond music notes \score{\relative { c' }} to be included in Sphinx-generated documents. Compared to its predecessor, the extension has many new features such as:

Getting Started#

Note

We assume you already have a Sphinx documentation, if not, see Getting Started with Sphinx.

First, downloading extension from PyPI:

$ pip install sphinxnotes-lilypond

Then, add the extension name to extensions configuration item in your conf.py:

extensions = [
          # …
          'sphinxnotes.lilypond',
          # …
          ]

Install the follwing runtime dependencies before using the extension:

Note

A basic understanding of Lilypond notation is required, or you can refer to LilyPond Learning Manual.

We provide Roles for embedding score fragment and Directives for embedding a whole socre:

\score{\relative { c' }} is the first note of the C major scale.

:lily:`\relative { c' }` is the first note of the C major scale.

\version "2.20.0"
\header {
  title = "C Major Scale"
}

\score {
  <<
    \new Staff {
        \time 4/4
        \tempo 4 = 70
        c' d' e' f' g' a' b' c''
  }
  >>

  \midi {}
  \layout {}
}

.. lily::

   \version "2.20.0"
   \header {
     title = "C Major Scale"
   }

   \score {
     <<
       \new Staff {
           \time 4/4
           \tempo 4 = 70
           c' d' e' f' g' a' b' c''
     }
     >>

     \midi {}
     \layout {}
   }

See Usage for more details.

Contents#

The Sphinx Notes Project#

+The project is developed by Shengyu Zhang, as part of The Sphinx Notes Project.

The Sphinx Notes Project