Skip to content

Commit

Permalink
Merge pull request #1142 from henryso/fix-1141
Browse files Browse the repository at this point in the history
Big initial fixes
  • Loading branch information
eroux committed Jun 15, 2016
2 parents 1a6cf08 + d7bbc97 commit 837e6f8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.
As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/). It follows [some conventions](http://keepachangelog.com/).

[Unreleased][unreleased]
### Fixed
- A two-line initial on a two-line score no longer generates an error (see [#1139](https://github.com/gregorio-project/gregorio/issues/1139)).
- Staff lines after a two-line initial should now be sized correctly in a more consistent way (see [#1141](https://github.com/gregorio-project/gregorio/issues/1141)).


## [4.2.0-rc1] - 2016-05-31
Expand Down
3 changes: 3 additions & 0 deletions doc/Command_Index_gregorio.tex
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,9 @@ \section{Gregorio Controls}
\macroname{\textbackslash GreNewParLine}{}{gregoriotex-main.tex}
Same as \verb=\GreNewLine= except line is not justified.

\macroname{\textbackslash GreFinalNewLine}{}{gregoriotex-main.tex}
Handles a new line after the final bar. This currently just advances \verb=\gre@knownline= in order to prevent a potential error message with a two-line initial on a two-line score.

\macroname{\textbackslash GreNextCustos}{\#1\#2}{gregoriotex-signs.tex}
Sets the pitch to use for the next custos if it were to happen at the point
where this macro is called.
Expand Down
4 changes: 4 additions & 0 deletions src/gregoriotex/gregoriotex-write.c
Original file line number Diff line number Diff line change
Expand Up @@ -3319,6 +3319,10 @@ static void handle_final_bar(FILE *f, const char *type, gregorio_syllable *sylla
pitch_value(element->u.misc.pitched.pitch));
break;

case GRE_END_OF_LINE:
fprintf(f, "\\GreFinalNewLine%%\n");
break;

default:
/* do nothing */
break;
Expand Down
8 changes: 8 additions & 0 deletions tex/gregoriotex-main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@
\relax%
}%


% Eliminates the error for big initials where the second new line is at the end of the score
\def\GreFinalNewLine{%
\global\advance\gre@knownline by 1\relax %
}%

% the macro we call each time we force a changing of line, it automatically sets \gre@knownline, and adjusts left spaces
% #1 is 0 in case of gabc z, 1 for Z
% #2 is 0 in the normal case, 1 after a bar in the new spacing algorithm
Expand Down Expand Up @@ -321,6 +327,7 @@
\gre@penalty{-10001}%
\fi %
\gre@adjustlineifnecessary\relax %
%%
\gre@reseteolcustos\relax %
}%

Expand Down Expand Up @@ -399,6 +406,7 @@
\def\gre@updatelinewidth{%
\gre@debugmsg{ifdim}{ additionalleftspace = 0pt}%
\ifdim\gre@dimen@additionalleftspace=0pt\relax%
\gre@generatelines %
\else %
\gre@dimen@temp@five=\gre@dimen@stafflinewidth\relax%
\global\advance\gre@dimen@stafflinewidth by -\gre@dimen@additionalleftspace\relax%
Expand Down

0 comments on commit 837e6f8

Please sign in to comment.