Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibility to have style markups cross syllables #1121

Closed
eroux opened this issue May 25, 2016 · 22 comments
Closed

possibility to have style markups cross syllables #1121

eroux opened this issue May 25, 2016 · 22 comments
Assignees

Comments

@eroux
Copy link
Contributor

eroux commented May 25, 2016

It used to work like that but it has been removed (I thought it was safer not to do it), but it would be helpful for some projects to be able to do things such as

(c3) bla(g) <sc>bla(g) bla(g) bla</sc>(g)

how hard would it be to make this feature come back?

@henryso
Copy link
Contributor

henryso commented May 25, 2016

About average difficulty.

@henryso
Copy link
Contributor

henryso commented May 26, 2016

I think backwards compatibility may be a concern here. Because of the way it currently works, I'm willing to bet there are gabc files in the wild which depend on the fact that an opened style is automatically closed at the end of the syllable.

@eroux
Copy link
Contributor Author

eroux commented May 26, 2016

correct... Well, I'm not entirely sure what's best... I tend to like the behavior described here, maybe we could just switch to it with a big red warning in the changelog?

@henryso
Copy link
Contributor

henryso commented May 27, 2016

It would be possible to toggle the behavior with a gabc header, so that's worth consideration (though it does add complexity).

In the back of my mind is also the future "protrusion" tag, which really must be closed at the end of a syllable (and really nowhere else) and the future "clear" tag which really is a syllable modifier more than a styling toggle. Add that to <nlba> and <eu> which really do span syllables.

Whatever we decide for the toggle, I think it makes sense to allow styles to span syllables as well; this parallels the <nlba> and <eu> tags. That said, I think we need to come up with something better for "protrusion" and "clear" (maybe even different things) as they further stray from this (now more common) formulation.

@eroux
Copy link
Contributor Author

eroux commented May 27, 2016

I'm not really sure what you're suggesting for protrusion and clear?

@jakubjelinek
Copy link
Contributor

jakubjelinek commented May 27, 2016

All I want to say is that I'd appreciate this feature a lot,
<alt>Genua nunc flectantur omnia.</alt> <sc>Te</sc>(e) <sc>er</sc>(gh~)<sc>go</sc>(h) <sc>qu</sc><v>\GreSmallCaps{\'æ}</v>(h)<sc>su</sc>(h)<sc>mus,</sc>(h.) (,) <sc>tu</sc>(h)<sc>is</sc>(h) <sc>fá</sc>(h)<sc>mu</sc>(h')<sc>lis</sc>(g) <sc>súb</sc>(h!iwj)<sc>ve</sc>(ivHG)<sc>ni,</sc>(h.) (;) <sc>quos</sc>(e) <sc>pre</sc>(gh)<sc>ti</sc>(h)<sc>ó</sc>(h)<sc>so</sc>(h) <sc>sán</sc>(i)<sc>gui</sc>(h)<sc>ne</sc>(hg) <sc>re</sc>(h)<sc>de</sc>(hi)<sc>mí</sc>(g.)<sc>sti.</sc>(e.) (::)
is just terribly unreadable. This also shows troubles I had with ǽ for small caps, I've tried a lot of things and only \GreSmallCaps{'æ} actually worked, dunno if the problem is in the font I'm using (Junicode), or somewhere else.

@eroux
Copy link
Contributor Author

eroux commented May 27, 2016

For this you could just redefine the main style to be small caps, that would be more readable... But maybe that would be the best solution to our problem? It could be just a small verbatim...

For the ae' small caps, it indeed doesn't exist in Junicode. It's actually quite rare, Linux Libertine doesn't have it neither. ArnoPro does.

@jakubjelinek
Copy link
Contributor

Well, it is just a single stanza in the whole hymn that should be in small caps, everything else in the hymn is meant to be written normally (this is just to stress that on this stanza people should be kneeing).

@eroux
Copy link
Contributor Author

eroux commented May 27, 2016

Ok, but you could set the default style to small caps at the beginning of the stanza, and reset it to normal after...

@henryso
Copy link
Contributor

henryso commented May 27, 2016

@eroux I'm suggesting that we use a different syntax for protrusion and clear.

@henryso
Copy link
Contributor

henryso commented May 27, 2016

Thinking about it for a bit, perhaps something like $pr$ and $clear$ for non-close-able tags?

@henryso
Copy link
Contributor

henryso commented May 27, 2016

Looking at this in more detail, not closing the style tag in the syllable is very likely to generate a syntax error when running gregorio, so backwards compatibility is not an issue. The exception is when you have a close to match every open, but they are of different types. For example:

  • Te<b>st(g) generates a syntax error
  • Te<b>st</i>(g) does not generate a synax error.

I think it's fairly safe to just add this feature without worrying about backwards compatibility. What do you think?

@eroux
Copy link
Contributor Author

eroux commented May 27, 2016

Looks ok to me! Also, why do you think $ are better than <> for pr and clear? This is not really clear to me...

@henryso
Copy link
Contributor

henryso commented May 27, 2016

XML and typical use of HTML/SGML leave you with the idea that you need to "close" the open tag. pr really marks the point in the syllable where the protrusion begins; there is no need to mark the end. clear is a syllable attribute; it simply marks a syllable as having some special meaning to it and is not defining the beginning or end of anything. So my thought is by not using that syntax for things that are not closed, you pre-emptively stop people from putting in close tags which will (the way our system works) will be emitted as ordinary text. Even if we accept and ignore such tags, it will prevent people from thinking closing the tag is supposed to do something.

@jakubjelinek
Copy link
Contributor

jakubjelinek commented May 27, 2016

In that case we might want to use <pr /> and <clear /> instead of just <pr> or <clear> to make it clear they don't have corresponding end tags.

@eroux
Copy link
Contributor Author

eroux commented May 27, 2016

I see... why not <clear/>? For pr, maybe we can just ignore the end tag?

@henryso
Copy link
Contributor

henryso commented May 27, 2016

If that's the consensus, then I will acquiesce.

@henryso
Copy link
Contributor

henryso commented May 27, 2016

I'd rather error out on closing <pr> and <clear>. If someone does th<pr>i</pr>s(g), they are expecting the close to do something that it doesn't do.

@rpspringuel
Copy link
Contributor

I'm with @henryso on this one and would favor a separate syntax for tags which don't need to be closed. I find <br/> type syntax confusing in html and am always questioning whether I need that / or not (and where to put it. $pr$ is fine for me, but I'd be willing to entertain just about any other marker too.

Test(g) does not generate a synax error.

I also think this needs to be fixed so that open tags look only for a matching close.

@henryso
Copy link
Contributor

henryso commented May 27, 2016

Question about this issue specifically. If you open a style twice, do you want to require closing it twice before the style goes away? For example, with F<b>ac(g)t<b>us(g) e</b>st(g), would you expect st to be bold?

Note: If you try this in the current code, you have to do something incorrect in order to balance opens with closes, so I don't think the current behavior needs to be considered to answer this question.

@rpspringuel I will take care of the "correct" close problem as part of this issue, now that I'm aware of it.

@rpspringuel
Copy link
Contributor

I would label opening a style which is already open a syntax error. Once a style is open, it should be closed before it can be opened again.

@eroux
Copy link
Contributor Author

eroux commented May 27, 2016

I think it can be ignored... or it can raise an error, why not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants