Page MenuHomePhabricator

Scores in a <div>, placed inside text flow (<span>, <p>), creates unwanted line breaks and malformed HTML
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do):

Use <score> tags within the body of a text, by provision of a suitable option to "inline" the generated output.

Steps to reproduce (a list of clear steps to create the situation that made you report this, including full links if applicable):

", thus by note and rest marking the action of the foot with the greatest nicety." ...

See also: https://en.wikisource.org/wiki/Template:FreedImg/span#Example_3:_Musical_Score

Use case(s) (describe the actual underlying problem which you want to solve, and not only a solution):

Insert a short musical notation sequence or symbol into the run of other text, without a break occurring as currently.

Event Timeline

Aklapper changed the task status from Open to Stalled.Aug 21 2021, 10:35 PM

Which problem would this solve, which outweighs a very small <score> output that's likely unreadable, or instead ending up with an increased line height which doesn't look much better than now either?

Which problem would this solve, which outweighs a very small <score> output that's likely unreadable, or instead ending up with an increased line height which doesn't look much better than now either?

See the second link I added, as in some situations where <score></score> tags will have been placed inside a P or SPAN wrapper, (that P or SPAN being used to set up formatting for the surrounding text), by a contributor. As the Score extension by default generates as DIV wrapper, this will lead to situations where malformed HTML is eventually generated. (see also the related comments in https://en.wikisource.org/wiki/Help:Block_and_inline_elements)

A DIV (as generated by the Score tags) cannot be placed inside a SPAN or P, and having an inline option to generate a SPAN wrapper instead would prevent the generation of malformed HTML, where a contributors intent was to put a short musical passage or symbol within the run of other text.

In the first linked example in my original request, mediawiki was intelligent enough to break the wrapping paragraph (without reporting an error). This behavior is not however something that should be relied upon by contributors. If the intention of contributor was for musical notation to be inline, then it should be explicitly indicated and supported as such.

I will also note that the documentation for the usage of the Score extension at :-
https://www.mediawiki.org/wiki/Extension:Score#Usage
doesn't currently mention that the score tag can't be placed inside P or SPAN without a 'break' (and thus potentially malformed HTML) being created as a result. If an inline option cannot be provided, perhaps at the very least the documentation could be updated to indicate the limtations on where Score tags can be (currently) placed?

Aklapper renamed this task from Allow music notation within the run of other text or paragraphs to be genrated from the Score extension. to Scores in a <div>, placed inside text flow (<span>, <p>), creates unwanted line breaks and malformed HTML.Aug 22 2021, 8:08 PM
Aklapper changed the task status from Stalled to Open.

Permit to insist on this topic.

Which problem would this solve, which outweighs a very small <score> output that's likely unreadable, or instead ending up with an increased line height which doesn't look much better than now either?

It would allow contributors on Wikisource to transcript with more precision books dedicated to music: e.g. this example with a score used inline, and this one with a floating score (on the right). Remind that, on Wikisource, we are dedicated to the faithful digital reproduction of printed books, and therefore we are not "free" to change the layout of the page.

I think that it just suffices to create an inline parameter that, when activated, changes the div with class mw-ext-score into a span. There is a similar case with the extension syntaxhighlight: <syntaxhighlight>blabla</syntaxhighlight> creates a div, whereas <syntaxhighlight inline>blabla</syntaxhighlight> creates a code element.