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

Last line of Score alignment #43

Closed
rpspringuel opened this issue Feb 8, 2015 · 4 comments
Closed

Last line of Score alignment #43

rpspringuel opened this issue Feb 8, 2015 · 4 comments
Assignees

Comments

@rpspringuel
Copy link
Contributor

Currently the last line of a score is always set ragged. It should be possible to manually override this in either the gabc or TeX so that the last line is justified. It is possible to get this effect by messing around in the gtex file currently.

  1. End your score with just (z).

  2. Run the score through gregorio and open the generated gtex file.

  3. At the end of the file you'll see something like this (I've removed empty lines to save space):

\grebarsyllable{}{}{}{1}{\gresetnextsyllable{}{}{}}{}{0}{%
\grelastofline %
}{%
\gredivisiofinalis{}%
}%
\grenewline %
\endgregorioscore %
\endinput %

Modify this by changing \grelastofline to \grelastofscore and moving \grenewline to be right after \gredivisiofinalis{}. You should end up with something like the following:

\grebarsyllable{}{}{}{1}{\gresetnextsyllable{}{}{}}{}{0}{%
\grelastofscore %
}{%
\gredivisiofinalis{}%
\grenewline %
}%
\endgregorioscore %
\endinput %

  1. Now typeset the main document that includes this score and you should get the divisio finalis all the way to the right hand side of the score and the neumes spaced to fill the line.

I think that there should either be a TeX switch that adds code to \grefinaldivisiofinalis{0} (what you usually get for the last syllable you end your gabc with (::)) or gregorio should recognize (::z) as requiring that code.

Note: Adding \grenewline to between lines 1534 and 1536 of gregoriotex-signs.tex has the desired effect. All that's needed is a switch.

Also, are there ever occasions when \grefinaldivisiofianlis{0} doesn't end the score? My quick testing didn't reveal any. If this is true, then \grelastofline in this function should be changed to \grelastofscore (though it doesn't seem to have any visible effect in my testing).

@henryso
Copy link
Contributor

henryso commented Apr 30, 2015

I have a few projects where I break up the longer work into multiple scores. In some cases, they end with (:), which results in \grefinaldivisiomaior{0} rather than \grefinaldivisiofinalis{0}.

@rpspringuel
Copy link
Contributor Author

Sorry, what I meant was are there any occasions where there are other elements after \grefinaldivisiofinalis{0}? I fully expect it to not appear at all in scores which don't end with a divisio finalis. What I'm concerned about are occasions where it might appear in the middle of a score.

@henryso
Copy link
Contributor

henryso commented May 2, 2015

The gregorio executable is engineered so that no normal elements can occur after \grefinaldivisiofinalis{0} or \grefinaldivisiomaior{0}. However, "texverb" items (and faked "texverb" items) can appear afterward, such as a manual custos.

%%
(c4) e(e) (::f+)

produces

% File generated by gregorio 4.0.0-rc1-font-naming-consistency-8f038bb-1736
\gregoriotexapiversion{4.0.0-rc1}%
\begingregorioscore%
\greinitial{e}%
\grebeginnotes %
\gresetinitialclef{c}{4}{a}%
\gresyllable{}{}{}{1}{\gresetnextsyllable{}{}{}}{}{12}{}{%
\greglyph{\grecpPunctum}{e}{g}{0}{}{}%
}%
%
\grefinaldivisiofinalis{0}%
% verbatim text at element level:
\gremanualcusto{f}%
% end of verbatim text
\endgregorioscore %
\endinput %

@henryso
Copy link
Contributor

henryso commented May 5, 2015

Note: in the current develop, this will produce

...
\grefinaldivisiofinalis{%
\gremanualcusto{f}%
}%
\endgregorioscore %
\endinput %

@henryso henryso self-assigned this May 26, 2015
@henryso henryso closed this as completed May 27, 2015
rpspringuel added a commit to rpspringuel/gregorio that referenced this issue May 27, 2015
* develop:
  Added macros to switch between justified and ragged last lines.  Fixes gregorio-project#43.
  Reverted generation of new-line macros within a final-divisio macro.
  Modified to remove the glue that precedes an empty line which is removed.
  move misplaced debug message
  no space after final bar, fix missing %
  Enabled 'z' to force-justify the last line of a score.  Fixes gregorio-project#43.
  Changing redlines to use gregoriocolor
rpspringuel added a commit to rpspringuel/gregorio that referenced this issue May 29, 2015
* develop:
  Added macros to switch between justified and ragged last lines.  Fixes gregorio-project#43.
  Reverted generation of new-line macros within a final-divisio macro.
  Modified to remove the glue that precedes an empty line which is removed.
  move misplaced debug message
  no space after final bar, fix missing %
  Enabled 'z' to force-justify the last line of a score.  Fixes gregorio-project#43.
  Changing redlines to use gregoriocolor
rpspringuel added a commit to rpspringuel/gregorio that referenced this issue May 29, 2015
…texrenaming

* commit '24a5b991f1ce94d202bff82789113f1701d546cd':
  fix previous commit
  fix first line when no initial
  Added macros to switch between justified and ragged last lines.  Fixes gregorio-project#43.
  Reverted generation of new-line macros within a final-divisio macro.
  Modified to remove the glue that precedes an empty line which is removed.
  move misplaced debug message
  no space after final bar, fix missing %
  Enabled 'z' to force-justify the last line of a score.  Fixes gregorio-project#43.
  Changing redlines to use gregoriocolor
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

2 participants