Main Page

From ZMOG test wiki (master branch)
Revision as of 14:35, 3 December 2022 by Johnno (talk | contribs)

Welcome to a MediaWiki instance running 1.39 LTS, mainly for testing the Score extension and anything else I might be working on.

Forgive my indulgence, but I'm using the excellent skin from the Star Citizen wiki.

Score Extension

See also: Score examples.

This wiki is using an SVG-patched version of the Score extension; see T49578 and the patch mirrored on GitLab. It is using LilyPond version 2.23.82 (a release candidate for the 2.24 release scheduled for December 2022), which includes libcairo support for producing SVG (and PNG directly, without having to use PS and GhostScript; but one thing at a time).

Note
To yoink Lilypond snippets from Wikipedia articles, see Special:PagesWithProp and search for the "score" property in Article space.

Here's the Wagner excerpt for contrabass trombone, from Wikipedia.

First, the score block looks like this:

 <score lang="lilypond">
 \layout { ragged-right = ##t \context { \Score \omit BarNumber } }
 \relative g {
    \override DynamicTextSpanner.style = #'none
    \override Hairpin.minimum-length = #5
    \clef bass \key c \major
    g2~ \ff g8 f8 e8. d16
    c4 b a g  f e d c4 \break
    b a g f  e1~ \dim\!  << e1~ { s2 s4 s4 \> } >>  e4 \! \p r4 r2
 }
 </score>

Which normally generates a PNG image:

Standard PNG output, using Lilypond 2.22 --ps and GhostScript

But it now produces good SVG output:

Unable to obtain LilyPond version:

/bin/bash: line 1: /usr/local/bin/lilypond: No such file or directory

With a PNG fall-back generated using Lilypond's built-in libcairo support. As you can see, it almost identical; I think it is slightly crisper, more fine-grained, and clearer than the GhostScript output:

New PNG output, directly using Lilypond 2.24 directly with --png and libcairo

Cropping is done with the new LilyPond -dno-use-paper-size-for-page option (docs), which precludes having to do it the old way with an extra ImageMagick convert shell command, and achieves the same result.