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

Integrate commentary into score #662

Closed
rpspringuel opened this issue Oct 27, 2015 · 11 comments
Closed

Integrate commentary into score #662

rpspringuel opened this issue Oct 27, 2015 · 11 comments

Comments

@rpspringuel
Copy link
Contributor

As it stands, commentary is not part of a score, but rather a convenience command (\grecommentary) for printing right-aligned text. This request is that commentary be made part of the score, thereby allowing a couple of features:

  1. Control of the distance between the staff-lines and the commentary text. As is, any element which appears above the staff lines pushes the commentary and the staff-lines apart. By bringing the commentary into the score, the position of the commentary can be made relative to the staff-lines, allowing greater control over their positioning.
  2. Allow the commentary header field in gabc to transfer over much like the annotations fields do.

For implementation I see rewriting \grecommentary so that it fills a box, much like \greannotation does and then having that box be placed in the score by one of the macros used to construct the first line (again, much like the macro writing the initial is used to place the annotation box).

@rpspringuel rpspringuel added this to the 4.1 milestone Oct 27, 2015
@eroux
Copy link
Contributor

eroux commented Dec 31, 2015

Here's an attempt to control the distance between \grecommentary and the staff lines (inspired by @OldClaudio):

\makeatletter
\xdef\raisecommentary{1.4ex}

\def\grecommentary{\@ifnextchar[{\gre@commentary}{\gre@commentary[0pt]}}%

\def\gre@commentary[#1]#2{%
  \ifhmode\par\fi %
  \noindent\hbox to \hsize{\hfill #2}%
  \par %
  \kern\dimexpr#1+\raisecommentary-\baselineskip\relax %
  \relax %
}
\makeatother

This makes commentary closer to the lines by default, but the distance is tunable through an optional argument. I think it's a reasonable first step and it will help users using commentaries outside scores, but it doesn't really solve the issue...

What do you think?

Also, the example looks a bit better with the commentary in \footnotesize instead of \small, but that's not the core issue...

@henryso
Copy link
Contributor

henryso commented Jan 4, 2016

I propose #750 as a solution for passing custom headers to TeX. This proposed solution can be used to pass some header value to \grecommentary. It does not enhance \grecommenrary to fill a box.

@rpspringuel
Copy link
Contributor Author

Because this information should be here for reference:

@eroux started to try a fix based on his suggestion above the fix-662 branch. After looking it over, this was my response:

I've taken a glance at fix-662 and have to say that the direction Élie is taking there is completely different from the solution I was thinking of. As I haven't even tried to implement what I was thinking of yet I don't know which solution would be better or if they would both effectively get to the same end point. Once I finish up with the annotation stuff, I'll play around with my ideas to see how it stacks up against what Élie is doing.

To this @eroux replied:

Dear Brother, all,

I've taken a glance at fix-662 and have to say that the direction
Élie is taking there is completely different from the solution I was
thinking of.

You can completely discard it, I realized too late I was going in the
wrong direction, and gave it up. There are a few things that could be
kept though, such as

73f3ec3

a11c5e6

and

20768ee

@rpspringuel
Copy link
Contributor Author

Echoing my email to gregorio-devel:

There are a few things that could be
kept though, such as

73f3ec3

Kept.

a11c5e6

and

20768ee

These implement a style for the commentary field. I don't disapprove of this, but I feel that if the commentary field has a style associated with it, shouldn't the annotation as well? Especially after my rewrite, which makes \grecommentary very similar to \greannotation in its functionality, I feel like there should be some consistency here.

If others feel the styles are worth including, then I can add both before submitting my PR.

@henryso
Copy link
Contributor

henryso commented Jan 15, 2016

My guess is that the documentation changes for \grecommentary in 20768ee should be excluded as that change does not seem to be part of any of those commits.

@rpspringuel
Copy link
Contributor Author

Good point. I'll have to make changes manually rather than using git cherry-pick if I create the styles.

@eroux
Copy link
Contributor

eroux commented Jan 15, 2016

There could be a style for annotation indeed, but I don't see any particular default neither, and I'm just affraid that it will confuse users who use only mode in annotation: which style should they tune? How would you mix the different styles for mode and the style of annotation?

@rpspringuel
Copy link
Contributor Author

Well, the mode styles apply only to modes set with \GreMode (i.e. usually imported from the gabc). The annotation style, on the other hand would apply to all annotations, regardless of source (including those created by \GreMode).

@henryso
Copy link
Contributor

henryso commented Jan 18, 2016

With #786 merged, is everything from this issue done?

@rpspringuel
Copy link
Contributor Author

I believe so.

@eroux
Copy link
Contributor

eroux commented Jan 18, 2016

Yes, thanks a lot!

@eroux eroux closed this as completed Jan 18, 2016
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

3 participants