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

Use \parshape for multiline initials #1608

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

davidweichiang
Copy link

This uses \parshape to indent the first k lines, then post_linebreak_filter to change the width of the staff lines.

\gre@hskip\gre@dimen@temp@four %
\global\advance\gre@dimen@initialwidth by \gre@dimen@temp@four %
\gre@debugmsg{annotation}{Ready to place initial.}%
\ifgre@showlyrics%
\box\gre@box@initial%
\smash{\box\gre@box@initial}%
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The \smash is presumably what's changing the appearance of initials with descenders.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember why the \smash was there. It seems to make no difference now...

@@ -678,7 +575,10 @@
%% has to be called before drawing the key, after drawing the initial
\def\gre@beginnotes{%
\gre@trace{gre@beginnotes}%
\gre@drawfirstlines %
% Draw the staff lines the same as the other staves; post_linebreak
% will fix them. The \hbox is there so that post_linebreak can find
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hack. It would be better either to mark the initial with an attribute, or to draw all the lines using \localleftbox (I couldn't figure out how).

@@ -392,7 +392,7 @@
\gre@trace{GreSetInitialClef{#1}{#2}{#3}{#4}{#5}{#6}{#7}}%
\gre@save@clef{#1}{#2}{#3}{#4}{#5}{#6}%
\ifgre@showclef%
\ifnum\gre@initiallines=1\relax %
\ifnum\gre@count@initiallines>0\relax %
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unsure why this was =1 but am just as unsure whether changing it to >0 made any sense.

@@ -435,7 +435,7 @@
\gre@debugmsg{bolshift}{ clefwidthcurrent = \the\gre@dimen@clefwidth@current}%
\gre@debugmsg{bolshift}{ clefwidthbol = \the\gre@dimen@clefwidth@bol}%
% we ignore the current-bol adjustment if the clef is the first of the score and there is an initial on one line:
\ifnum\gre@initiallines=1\ifgre@beginningofscore\else %
\ifnum\gre@count@initiallines>0\ifgre@beginningofscore\else %
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidweichiang
Copy link
Author

Would close #1488.

Possible alternative to #1491.

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

Successfully merging this pull request may close these issues.

1 participant