Main Page: Difference between revisions

From ZMOG test wiki (master branch)
No edit summary
 
No edit summary
Line 1: Line 1:
<strong>MediaWiki has been installed.</strong>
Welcome to a MediaWiki instance running 1.35 LTS, mainly for testing the [https://www.mediawiki.org/wiki/Extension:Score Score extension] and anything else I might be working on.


Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.
Forgive my indulgence, but I'm using the excellent skin from the [https://starcitizen.tools/ Star Citizen] wiki.


== Getting started ==
== Score Extension ==
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
 
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
'''''See also:''''' ''[[Score examples]].''
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]
 
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
This wiki is using an SVG-patched version of the Score extension; see [https://phabricator.wikimedia.org/T49578 T49578] and the [https://gitlab.com/doctorlard/mediawiki-extension-score/-/merge_requests/3/diffs REL1_35 patch] on GitLab. It is using LilyPond version [https://gitlab.com/lilypond/lilypond/-/releases/v2.23.82 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).
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]
 
;Note: To yoink Lilypond snippets from Wikipedia articles, see [https://en.wikipedia.org/wiki/Special:PagesWithProp?propname=score&namespace=0 Special:PagesWithProp] and search for the "score" property in Article space.
 
Here's the Wagner excerpt for [https://en.wikipedia.org/wiki/Contrabass_trombone contrabass trombone], from Wikipedia.
 
First, the score block looks like this:
 
<syntaxhighlight lang="Tex">
<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>
</syntaxhighlight>
 
Which normally generates a PNG image. Here's the original output, from the current version of Score:
 
[[File:Score.png|none|Standard output, using --ps and GhostScript, to PNG|class=mw-ext-score]]
 
But it now produces good, cropped SVG output:
 
<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>
 
Cropping is done with the new LilyPond ''-dno-use-paper-size-for-page'' option ([https://lilypond.org/doc/v2.23/Documentation/usage/command_002dline-usage#advanced-command-line-options-for-lilypond docs]), which precludes having to do it the old way with an extra ImageMagick ''convert'' shell command, and achieves the same result.

Revision as of 02:21, 2 December 2022

Welcome to a MediaWiki instance running 1.35 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 REL1_35 patch 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. Here's the original output, from the current version of Score:

Standard output, using --ps and GhostScript, to PNG

But it now produces good, cropped SVG output:

Unable to obtain LilyPond version:

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

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.