BirminghamConservatoire / JohannesTinctoris

Editing and rendering text and music notation for online edition of music treatises
7 stars 4 forks source link

Rendering problems with <label> #20

Closed goursaud closed 3 years ago

goursaud commented 3 years ago

I'm using <label> to display several strophes of text beneath the final staff of a piece (Busnoys's Conditor alme siderum), and finding that a.) the first line is rendered twice, first justified left and then indented, and b.) all lines from line 3 onwards are indented.

image

`<piece: {mensural: void}, {staf: 5, black}>

{clef: F8} {solm: 0} {mens: C6} {prop: 3, 6} Test Test Test Test Test `
goursaud commented 3 years ago

Apologies, the example code didn't appear correctly above. This should be correct:

<piece: {mensural: void}, {staf: 5, black}> <part: Bassus> {clef: F8} {solm: 0} {mens: C6} {prop: 3, 6} <label: -10>Test</label> <label: -15>Test</label><label: -20>Test</label><label: -25>Test</label> <label: -30>Test</label></piece>

annplaksin commented 3 years ago

Okay, this is really strange. Somehow the rendering of two labels at the same height doesn't happen when there is a note included in the example. But I don't understand why the vertical alignment is so strange. (And why the first label is created before the note in the SVG) Okay, the first strangeness might be because the horizontal position is moving.

<piece: {mensural: void}, {staf: 5, black}> <part: Bassus> 
{clef: F8} {solm: 0} {mens: C6} {prop: 3, 6} Bd <label>Test</label>
<label: -10>Test 1</label> <label: -15>Test 2</label><label: -20>Test 3</label><label: -25>Test 4</label> <label: -30>Test 5</label>
</piece>

I assume you need to add several strophes only in the practical music? Or do we need this as well for the theoretical works?

JohannesTinctoris commented 3 years ago

We do have multi-line labels in De arte contrapuncti II-III: 2-line part names, to be precise. I had tried to do them like this: , but the line break isn't recognized (which is why Christian was trying multiple labels -- line breaks would be better...). There are two in II.xxx.ex1:

<example: {full measure}, {mensural: void}, {staf: 5, red}> <part: 1> <label: rot90c, 14>{var="Contratenorbassus" V BU Br1 : "Bassus" ModC : "Tenor 2us" Tr88 Luc CS14} {clef: "F8" V Br1 Tr88 Luc ModC : "F10" BU CS14} <label: 14>{var="Petrus de Domarto" V BU : "P. de Domarto" Tr88 Luc ModC : "De Domarto" CS14 : (om.) Br1} {solm: 0} {mens: O9} BF BG{red}? LF &F || <part: 2> <label: rot90c, 14>{var="Contratenoraltus" V BU Br1 : "Contratenor" Luc : "Contra" Tr88 ModC CS14} [-][-] {clef: "C8" V BU Br1 : "C10" Tr88 Luc ModC CS14} {solm: 0} {mens: O5} SF PS3 {var="Bf" V BU Br1 Tr88 Luc ModC : "Sf Sf" CS14}{red}-? Se. {var="md" V BU Br1 Luc ModC CS14 : "sd se" Tr88} Sf &f {var=(ins.) "||" V BU}

(Separate issue: the signum congruentiae in part 2 isn't displaying beneath the note to which it refers but afterwards.)

Best, Jeff


Dr Jeffrey J. Dean PI, AHRC Mensural Notation Project 4 Chandos Road Royal Birmingham Conservatoire Chorlton-cum-Hardy tel: +44(0)161 861 7542 Manchester M21 0ST fax: +44(0)161 861 7543 England www.earlymusictheory.org/Tinctoris/ jeffrey.dean@bcu.ac.uk jeffrey.dean@stingrayoffice.com

On 16 Oct 2020, at 15:40, Anna Plaksin notifications@github.com wrote:

Okay, this is really strange. Somehow the rendering of two labels at the same height doesn't happen when there is a note included in the example. But I don't understand why the vertical alignment is so strange. (And why the first label is created before the note in the SVG) Okay, the first strangeness might be because the horizontal position is moving.

<piece: {mensural: void}, {staf: 5, black}> {clef: F8} {solm: 0} {mens: C6} {prop: 3, 6} Bd <label: -10>Test 1 <label: -15>Test 2<label: -20>Test 3<label: -25>Test 4 <label: -30>Test 5

I assume you need to add several strophes only in the practical music? Or do we need this as well for the theoretical works?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

annplaksin commented 3 years ago

I already solved the line breaks within labels in #6 , but I see too, that it doesn't work in the example I took from liber de arte contrapuncti. They still don't work inside variants though...

See this example for a direct comparison

<treatise>
<example: {full measure}, {mensural: void}, {staf: 5, red}> 
<part: 1> 
    <label: rot90c, 14>
        <red>
            {var="Contratenor<l/>bassus" V BU Br1 : "Bassus" ModC : "Tenor 2us" Tr88 Luc CS14}
        </red>
    </label> 
    {clef: "F8" V Br1 Tr88 Luc ModC : "F10" BU CS14} 
    <label: 14>
        <red>
            {var="Petrus de Domarto" V BU : "P. de Domarto" Tr88 Luc ModC : "De Domarto" CS14 : (om.) Br1}
        </red>
    </label> 
    {solm: 0} {mens: O9} <lig>BF BG{red}? LF</lig> &F || 
</part>
<part: 2> 
    <label: rot90c, 14>
        <red>
            {var="Contratenor<l/>altus" V BU Br1 : "Contratenor" Luc : "Contra" Tr88 ModC CS14}
        </red>
    </label> 
    [-][-] {clef: "C8" V BU Br1 : "C10" Tr88 Luc ModC CS14} {solm: 0} {mens: O5} SF PS3 {var="Bf" V BU Br1 Tr88 Luc ModC : "Sf Sf" CS14}{red}-? Se. {var="md" V BU Br1 Luc ModC CS14 : "sd se" Tr88} Sf &f {var=(ins.) "||" V BU} 
</part>
</example>
<example: {full measure}, {mensural: void}, {staf: 5, red}> 
<part: 1> 
    <label: rot90c, 14>
        <red>
            Contratenor<l/>bassus
        </red>
    </label> 
    {clef: "F8" V Br1 Tr88 Luc ModC : "F10" BU CS14} 
    <label: 14>
        <red>
            Petrus de Domarto
        </red>
    </label> 
    {solm: 0} {mens: O9} <lig>BF BG{red}? LF</lig> &F || 
</part>
<part: 2> 
    <label: rot90c, 14>
        <red>
            Contratenor<l/>altus
        </red>
    </label> 
    [-][-] {clef: "C8" V BU Br1 : "C10" Tr88 Luc ModC CS14} {solm: 0} {mens: O5} SF PS3 {var="Bf" V BU Br1 Tr88 Luc ModC : "Sf Sf" CS14}{red}-? Se. {var="md" V BU Br1 Luc ModC CS14 : "sd se" Tr88} Sf &f {var=(ins.) "||" V BU} 
</part>
</example>
</treatise>
annplaksin commented 3 years ago

Now, line breaks work as well in variants inside text... please have a look at: https://earlymusictheory.github.io/JohannesTinctoris/editor/treatise/

<treatise>
<example: {full measure}, {mensural: void}, {staf: 5, red}> 
<part: 1> 
    <label: rot90c, 14><red>{var="Contratenor<l/>bassus" V BU Br1 : "Bassus" ModC : "Tenor 2us" Tr88 Luc CS14}</red></label> 
    {clef: F8} {solm: 0} {mens: O9}|| [-][-][-][-]
<label: rot90c, 14><red>Contratenor</red><l/><red>bassus</red></label>
</part>
</example>
</treatise>
annplaksin commented 3 years ago

Is this problem solved for now or do we need to fix the alignment of multiple text elements?