Skip to content

Commit

Permalink
Merge commit 'ba5c4323450f7f644d1b8dc81d1526089d0371df' into release-6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rpspringuel committed Feb 17, 2025
2 parents 4c4f194 + ba5c432 commit 6a6545f
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 128 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed a bug that caused a custos to sometimes change into a clef. See [#1373](https://github.com/gregorio-project/gregorio/issues/1373).
- Fixed the alignment of 2-line initials so that an initial's baseline more exactly aligns with the baseline of the lowest line it appears next to.
- When fancyhdr and GregorioTeX are used together, GregorioTeX's disabling of hyphenation and its `post_linebreak` modification of the `post_linebreak_filter` interfere with multiline headers. Using the `fancyhdr/before` and `fancyhdr/after` hooks we temporarily reenable hyphenation and disable our `post_linebreak` modification while headers and footers are being processed in the middle of a score. See [#1603](https://github.com/gregorio-project/gregorio/issues/1603).
- Fixed a bug that could cause a hyphen to appear on the wrong line. See [#1319](https://github.com/gregorio-project/gregorio/issues/1319).
- Fixed the placement of above-lines text (`<alt>`) relative to a note above the staff or when the number of staff lines is not 4. See [#1613](https://github.com/gregorio-project/gregorio/issues/1613) and [#1614](https://github.com/gregorio-project/gregorio/issues/1614).
- Fixed a bug where the above-lines text (`<alt>`) could collid with a note above the staff. See [#1613](https://github.com/gregorio-project/gregorio/issues/1613).
- Fixed a bug that could cause the clef and staff to be printed too high. See [#1503](https://github.com/gregorio-project/gregorio/issues/1503).

### Changed
- Modified gregorio to append to the log file specified as an argument and to send early messages to it. See [#1541](https://github.com/gregorio-project/gregorio/issues/1541).
Expand Down
15 changes: 3 additions & 12 deletions doc/Command_Index_internal.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1294,9 +1294,6 @@ \section{Gregorio\TeX{} Controls}
\#1 & integer & The number of staff lines\\
\end{argtable}
\macroname{\textbackslash gre@stafflines}{}{gregoriotex-main.tex}
Contains the number of staff lines.
\macroname{\textbackslash gre@romannumeral@majuscule}{\#1}{gregoriotex-main.tex}
Typesets its numeric argument as an upper-case Roman numeral.
Expand Down Expand Up @@ -1912,15 +1909,6 @@ \subsection{Flags}
\macroname{\textbackslash ifgre@scale@stafflinefactor}{}{gregoriotex-spaces.tex}
Boolean indicating whether the stafflinefactor should scale with changes of \texttt{grefactor}, or not.
\macroname{\textbackslash ifgre@haslinethree}{}{gregoriotex-spaces.tex}
Boolean indicating whether the staff has a third line.
\macroname{\textbackslash ifgre@haslinefour}{}{gregoriotex-spaces.tex}
Boolean indicating whether the staff has a fourth line.
\macroname{\textbackslash ifgre@haslinefive}{}{gregoriotex-spaces.tex}
Boolean indicating whether the staff has a fifth line.
\macroname{\textbackslash gre@count@shiftaftermora}{}{gregoriotex-signs.tex}
Count indicating when the presence of a punctum mora at the end of a syllable should affect the spacing with the next syllable.
Expand Down Expand Up @@ -2024,6 +2012,9 @@ \subsection{Flags}
\macroname{\textbackslash ifgre@noteadditionalspacelinestext}{}{gregoriotex-main.tex}
Boolean indicating that the additional space needed between the notes and the lyrics due to really low notes should follow the user setting of noteadditionalspacelinestext (as opposed to being calculated automatically, the default).
\macroname{\textbackslash gre@count@stafflines}{}{gregoriotex-main.tex}
Count containing the number of staff lines.
\macroname{\textbackslash ifgre@alteration@effect@note}{}{gregoriotex-signs.tex}
Boolean indicating that soft alterations should last until they apply to a single note (i.e. all soft alterations will be printed).
Expand Down
65 changes: 11 additions & 54 deletions tex/gregoriotex-main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@
\let\gre@pitch@underbrace\gre@pitch@b %
\let\gre@pitch@overbraceglyph\gre@pitch@g %
\let\gre@pitch@bar\gre@pitch@g %
\let\gre@pitch@dummy\gre@pitch@g %
\let\gre@pitch@nominal\gre@pitch@e %
\let\gre@pitch@dummy\gre@pitch@e % not above or below staff, even if 2 lines

% factor is the factor with which you open you font (the number after the at). It will decide almost everything (spaces, etc.), so it is particularly important.
% it is set to the default value : 17 (the value that makes it look like a standard graduale)
Expand Down Expand Up @@ -735,8 +734,8 @@
\else%
\gre@dimen@temp@five=\gre@dimen@additionaltopspacenabc\relax%
\fi%
\gre@dimen@temp@five=\dimexpr(4\gre@dimen@stafflineheight %
+ 4\gre@dimen@interstafflinespace %
\gre@dimen@temp@five=\dimexpr(\gre@dimen@staffheight %
+ \gre@dimen@interstafflinespace %
+ \gre@space@dimen@spacebeneathtext %
+ \gre@dimen@currenttranslationheight %
+ \gre@space@dimen@spacelinestext %
Expand Down Expand Up @@ -789,45 +788,17 @@
\vbox attr \gre@attrid@part=2 {%
\gre@style@normalstafflines%
\vskip\glueexpr(\gre@dimen@additionaltopspace+\gre@space@skip@spaceabovelines+\gre@dimen@currentabovelinestextheight)\relax%
\ifgre@showlines %
\hrule height \gre@dimen@stafflineheight width \gre@dimen@stafflinewidth\relax%
\else %
\vskip\gre@dimen@stafflineheight\relax%
\fi %
\gre@skip@temp@four = \gre@dimen@interstafflinespace\relax%
\kern\gre@skip@temp@four %
\ifgre@showlines %
\hrule height \gre@dimen@stafflineheight width \gre@dimen@stafflinewidth\relax%
\else %
\vskip\gre@dimen@stafflineheight\relax%
\fi %
\ifgre@haslinethree %
\gre@skip@temp@four = \gre@dimen@interstafflinespace\relax%
\kern\gre@skip@temp@four %
\gre@count@temp@one=0\relax
\loop
\ifgre@showlines %
\hrule height \gre@dimen@stafflineheight width \gre@dimen@stafflinewidth\relax%
\else %
\vskip\gre@dimen@stafflineheight\relax%
\fi %
\fi %
\ifgre@haslinefour %
\gre@skip@temp@four = \gre@dimen@interstafflinespace\relax%
\kern\gre@skip@temp@four %
\ifgre@showlines %
\hrule height \gre@dimen@stafflineheight width \gre@dimen@stafflinewidth\relax%
\else %
\vskip\gre@dimen@stafflineheight\relax%
\fi %
\fi %
\ifgre@haslinefive %
\gre@skip@temp@four = \gre@dimen@interstafflinespace\relax%
\kern\gre@skip@temp@four %
\ifgre@showlines %
\hrule height \gre@dimen@stafflineheight width \gre@dimen@stafflinewidth\relax%
\else %
\vskip\gre@dimen@stafflineheight\relax%
\fi %
\fi %
\advance\gre@count@temp@one by 1\relax
\ifnum\gre@count@temp@one<\gre@count@stafflines
\kern\gre@dimen@interstafflinespace\relax
\repeat
\kern\dimexpr(\gre@space@dimen@spacelinestext+\gre@dimen@additionalbottomspace+\gre@space@dimen@spacebeneathtext+\gre@dimen@currenttranslationheight)\relax%
\endgre@style@normalstafflines %
}%
Expand Down Expand Up @@ -1049,13 +1020,11 @@
% gre@attr@dash (see its definition in gregorio-syllable) is 0 when we are in a score, and unset when we are not

\newif\ifgre@beginningofscore%
\newif\ifgre@haslinethree%
\newif\ifgre@haslinefour%
\newif\ifgre@haslinefive%

\newcount\gre@count@stafflines
\def\gre@setstafflines#1{%
\gre@trace{gre@setstafflines{#1}}%
\def\gre@stafflines{#1}%
\gre@count@stafflines=#1\relax
\ifcase#1% 0
\gre@error{Invalid number of staff lines}%
\or % 1
Expand All @@ -1080,9 +1049,6 @@
\let\gre@char@bar@divisiomaior\GreCPDivisioMaiorTwo %
\let\gre@char@bar@divisiomaiordotted\GreCPDivisioMaiorDottedTwo %
\let\gre@char@bar@divisiomaiordottedbacking\GreCPDivisioMaiorDottedBackingTwo %
\gre@haslinethreefalse %
\gre@haslinefourfalse %
\gre@haslinefivefalse %
\or % 3
\let\gre@pitch@adjust@top\gre@pitch@h %
\let\gre@pitch@abovestaff\gre@pitch@i %
Expand All @@ -1103,9 +1069,6 @@
\let\gre@char@bar@divisiomaior\GreCPDivisioMaiorThree %
\let\gre@char@bar@divisiomaiordotted\GreCPDivisioMaiorDottedThree %
\let\gre@char@bar@divisiomaiordottedbacking\GreCPDivisioMaiorDottedBackingThree %
\gre@haslinethreetrue %
\gre@haslinefourfalse %
\gre@haslinefivefalse %
\or % 4
\let\gre@pitch@adjust@top\gre@pitch@j %
\let\gre@pitch@abovestaff\gre@pitch@k %
Expand All @@ -1126,9 +1089,6 @@
\let\gre@char@bar@divisiomaior\GreCPDivisioMaiorFour %
\let\gre@char@bar@divisiomaiordotted\GreCPDivisioMaiorDottedFour %
\let\gre@char@bar@divisiomaiordottedbacking\GreCPDivisioMaiorDottedBackingFour %
\gre@haslinethreetrue %
\gre@haslinefourtrue %
\gre@haslinefivefalse %
\or % 5
\let\gre@pitch@adjust@top\gre@pitch@l %
\let\gre@pitch@abovestaff\gre@pitch@m %
Expand All @@ -1149,9 +1109,6 @@
\let\gre@char@bar@divisiomaior\GreCPDivisioMaiorFive %
\let\gre@char@bar@divisiomaiordotted\GreCPDivisioMaiorDottedFive %
\let\gre@char@bar@divisiomaiordottedbacking\GreCPDivisioMaiorDottedBackingFive %
\gre@haslinethreetrue %
\gre@haslinefourtrue %
\gre@haslinefivetrue %
\else %
\gre@error{Invalid number of staff lines}%
\fi %
Expand Down
22 changes: 11 additions & 11 deletions tex/gregoriotex-signs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -705,52 +705,52 @@
\or\gre@fontchar@custostoplong %
\or\gre@fontchar@custostopshort %
\or %
\ifgre@haslinethree %
\ifnum\gre@count@stafflines>2\relax
\gre@fontchar@custostoplong %
\else %
\gre@fontchar@custosbottomlong %
\fi %
\or %
\ifgre@haslinethree %
\ifnum\gre@count@stafflines>2\relax
\gre@fontchar@custostopshort %
\else %
\gre@fontchar@custosbottomshort %
\fi %
\or %
\ifgre@haslinefour %
\ifnum\gre@count@stafflines>3\relax
\gre@fontchar@custostoplong %
\else %
\gre@fontchar@custosbottomlong %
\fi %
\or %
\ifgre@haslinefour %
\ifnum\gre@count@stafflines>3\relax
\gre@fontchar@custostopshort %
\else %
\ifgre@haslinethree %
\ifnum\gre@count@stafflines>2\relax
\gre@fontchar@custosbottomshort %
\else %
\gre@fontchar@custosbottommiddle %
\fi %
\fi %
\or %
\ifgre@haslinefive %
\ifnum\gre@count@stafflines>4\relax
\gre@fontchar@custostoplong %
\else %
\gre@fontchar@custosbottomlong %
\fi %
\or %
\ifgre@haslinefive %
\ifnum\gre@count@stafflines>4\relax
\gre@fontchar@custostopshort %
\else %
\ifgre@haslinefour %
\ifnum\gre@count@stafflines>3\relax
\gre@fontchar@custosbottomshort %
\else %
\gre@fontchar@custosbottommiddle %
\fi %
\fi %
\or\gre@fontchar@custosbottomlong %
\or %
\ifgre@haslinefive %
\ifnum\gre@count@stafflines>4\relax
\gre@fontchar@custosbottomshort %
\else %
\gre@fontchar@custosbottommiddle %
Expand Down Expand Up @@ -1637,8 +1637,8 @@
+ \gre@space@dimen@spacebeneathtext %
+ \gre@space@dimen@spacelinestext %
+ \gre@dimen@currenttranslationheight %
+ \gre@stafflines\gre@dimen@interstafflinespace %
+ \gre@stafflines\gre@dimen@stafflineheight)\relax%
+ \gre@count@stafflines\gre@dimen@interstafflinespace %
+ \gre@count@stafflines\gre@dimen@stafflineheight)\relax%
\or % 1
\gre@dimen@glyphraisevalue=%
\dimexpr(\gre@dimen@additionalbottomspace %
Expand Down
16 changes: 8 additions & 8 deletions tex/gregoriotex-spaces.tex
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@
\def\gre@calculate@staffheight{%
\gre@trace{gre@calculate@staffheight}%
\global\gre@dimen@staffheight = \dimexpr %
\gre@stafflines\gre@dimen@stafflineheight %
+ \gre@stafflines\gre@dimen@interstafflinespace %
\gre@count@stafflines\gre@dimen@stafflineheight %
+ \gre@count@stafflines\gre@dimen@interstafflinespace %
- \gre@dimen@interstafflinespace\relax%
\relax %
\gre@trace@end%
Expand Down Expand Up @@ -733,7 +733,7 @@
\global\gre@isonalinetrue%
\or\gre@count@temp@three=\number 8%
\or\gre@count@temp@three=\number 9%
\ifgre@haslinethree %
\ifnum\gre@count@stafflines>2\relax
\global\gre@isonalinetrue%
\else %
\ifgre@ledgerline@above %
Expand All @@ -742,29 +742,29 @@
\fi %
\or\gre@count@temp@three=\number 10%
\or\gre@count@temp@three=\number 11%
\ifgre@haslinefour %
\ifnum\gre@count@stafflines>3\relax
\global\gre@isonalinetrue%
\else %
\ifgre@haslinethree %
\ifnum\gre@count@stafflines>2\relax
\ifgre@ledgerline@above %
\global\gre@isonalinetrue%
\fi %
\fi %
\fi %
\or\gre@count@temp@three=\number 12%
\or\gre@count@temp@three=\number 13%
\ifgre@haslinefive %
\ifnum\gre@count@stafflines>4\relax
\global\gre@isonalinetrue%
\else %
\ifgre@haslinefour %
\ifnum\gre@count@stafflines>3\relax
\ifgre@ledgerline@above %
\global\gre@isonalinetrue%
\fi %
\fi %
\fi %
\or\gre@count@temp@three=\number 14%
\or\gre@count@temp@three=\number 15%
\ifgre@haslinefive %
\ifnum\gre@count@stafflines>4\relax
\ifgre@ledgerline@above %
\global\gre@isonalinetrue%
\fi %
Expand Down
7 changes: 6 additions & 1 deletion tex/gregoriotex-syllable.tex
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,21 @@
% #7 is the line:char:column for a textedit link
\def\GreGlyph#1#2#3#4#5#6#7{%
\gre@newglyphcommon %
% Create box containing the new glyph.
\setbox\gre@box@temp@width=\hbox{\gre@pointandclick{\gre@font@music #1}{#7}}%
\global\gre@dimen@lastglyphwidth=\wd\gre@box@temp@width %
% the three next lines are a trick to get the additional lines below the glyphs
\gre@skip@temp@one = \gre@dimen@lastglyphwidth\relax%
\kern\gre@skip@temp@one %
% #5 contains things like ledger lines, but also calls to \GreGlyphHeights
#5\relax %
\kern-\gre@skip@temp@one %
\gre@calculate@glyphraisevalue{#2}{0}{}%
\raise\gre@dimen@glyphraisevalue%
\copy\gre@box@temp@width%
% Since \gre@box@temp@width was created before the calls
% to \GreGlyphHeights, we need to rebox it to
% set \gre@attr@glyph@top and \gre@attr@glyph@bottom correctly.
\hbox{\unhcopy\gre@box@temp@width}%
\ifgre@endofscore\else\ifgre@boxing\else %
#3%
\fi\fi %
Expand Down
Loading

0 comments on commit 6a6545f

Please sign in to comment.