Skip to content

Commit

Permalink
fix 4.1 part of #922
Browse files Browse the repository at this point in the history
  • Loading branch information
eroux committed Feb 15, 2016
1 parent 8968c0f commit ed65b71
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
- New bar spacing algorithm now accounts for translations (and other below lyrics stuff).
- Horizontal episema on initio debilis is now sized correctly (see [#880](https://github.com/gregorio-project/gregorio/issues/880)).
- Elisions immediately after the vowel are now properly left out of the center (see [#907](https://github.com/gregorio-project/gregorio/issues/907))
- Space between the text of two syllables of the same word when no hyphen is necessary is now strictly 0 (see [#922](https://github.com/gregorio-project/gregorio/issues/922))

### Changed
- Adjustments to the heuristic for ledger lines to include adjacent notes (see [#862](https://github.com/gregorio-project/gregorio/issues/862)).
Expand All @@ -17,6 +18,7 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- Controls for tuning horizontal episema vertical position. See GregorioRef for details (for the change request, see [#872](https://github.com/gregorio-project/gregorio/issues/872)).
- More dimensions are tunable: `overhepisemalowshift`, `overhepisemahighshift`, `underhepisemalowshift`, `underhepisemahighshift`, `hepisemamiddleshift`, `vepisemalowshift`, `vepisemahighshift`, `linepunctummorashift`, `spacepunctummorashift`, `spaceamonepespunctummorashift`, `lineporrectuspunctummorashift`, `spaceporrectuspunctummorashift`, and `raresignshift`. See GregorioRef for details (for the change request, see comments in [#872](https://github.com/gregorio-project/gregorio/issues/872)).
- A new dimension, `intersyllablespacestretchhyphen` is now available to add stretching in the case of syllables separated by an hyphen (see comments in [#922](https://github.com/gregorio-project/gregorio/issues/922))


## [4.1.0-beta3] - 2016-02-09
Expand Down
5 changes: 5 additions & 0 deletions doc/Command_Index_User.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,11 @@ \subsection{Distances}\label{distances}
Minimum space between notes of different syllables.
\end{gdimension}

\begin{gdimension}{intersyllablespacestretchhyphen}
Stretching added in the case where the text of two syllables of the same word are
separated with an automatic hyphen.
\end{gdimension}

\begin{gdimension}{interwordspacenotes}
Minimum space between notes of syllables from different words.
\end{gdimension}
Expand Down
1 change: 1 addition & 0 deletions doc/GregorioRef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ function GregorioRef.emit_extra_glyphs(csname)
end

function GregorioRef.emit_dimension(value)
texio.write_nl(value)
value = string.gsub(value, '(-?%d+%.%d+)%s*(%a+)', [[\unit[%1]{%2}]])
value = string.gsub(value, '(-?%d+%.)%s*(%a+)', [[\unit[%1]{%2}]])
value = string.gsub(value, '(-?%.?%d+)%s*(%a+)', [[\unit[%1]{%2}]])
Expand Down
3 changes: 2 additions & 1 deletion doc/GregorioRef.tex
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@
\makeatletter%
\NewDocumentEnvironment{gdimension}{m}{\macroname{#1}{}{gsp-default.tex}}{%

\gre@rubberpermit{#1}%
\makeatletter\gre@rubberpermit{#1}%
\ifgre@rubber%
Default: \directlua{GregorioRef.emit_dimension("\luaescapestring{\csname gre@space@skip@#1\endcsname}")}
\else%
Default: \directlua{GregorioRef.emit_dimension("\luaescapestring{\csname gre@space@dimen@#1\endcsname}")}
\fi%
\makeatother%
}

\newcommand{\writemode}[3]{%
Expand Down
22 changes: 18 additions & 4 deletions tex/gregoriotex-spaces.tex
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
\gre@skip@minNotesDistance=\gre@space@skip@interwordspacenotes\relax%
\fi %
\else %
\gre@skip@minNotesDistance=\gre@space@skip@intersyllablespacenotes\relax%
\gre@skip@minNotesDistance=\gre@space@dimen@intersyllablespacenotes\relax%
\fi %
\ifcase\gre@count@shiftaftermora\or\or\or\or %
\ifgre@thisendswithmora %
Expand All @@ -277,7 +277,7 @@
\ifnum#1=1\relax %
\gre@skip@minNotesDistance=\gre@space@skip@interwordspacenotes@alteration\relax %
\else %
\gre@skip@minNotesDistance=\gre@space@skip@intersyllablespacenotes@alteration\relax%
\gre@skip@minNotesDistance=\gre@space@dimen@intersyllablespacenotes@alteration\relax%
\fi %
\fi %
\gre@debugmsg{syllablespacing}{ minNotesDistance = \the\gre@skip@minNotesDistance}%
Expand Down Expand Up @@ -317,11 +317,14 @@
\gre@debugmsg{syllablespacing}{ minShiftText = \the\gre@skip@minShiftText}%
\ifdim\gre@skip@minShiftNotes < \gre@skip@minShiftText %
\global\gre@skip@syllablefinalskip = \gre@skip@minShiftText %
\gre@debugmsg{syllablespacing}{ syllablefinalskip = \the\gre@skip@minShiftText}%
\else %
\global\gre@skip@syllablefinalskip = \gre@skip@minShiftNotes %
\gre@debugmsg{syllablespacing}{ syllablefinalskip = \the\gre@skip@minShiftNotes}%
\fi %
\ifgre@showhyphenafterthissyllable %
\gre@debugmsg{syllablespacing}{ add intersyllablespacestretchhyphen (\gre@space@skip@intersyllablespacestretchhyphen)}%
\advance\gre@skip@syllablefinalskip by \gre@space@skip@intersyllablespacestretchhyphen\relax%
\fi %
\gre@debugmsg{syllablespacing}{ syllablefinalskip = \the\gre@skip@syllablefinalskip}%
\relax %
}

Expand Down Expand Up @@ -1009,6 +1012,8 @@
{minimalspaceatlinebeginning}{\gre@rubberfalse}%
{manualinitialwidth}{\gre@rubberfalse}%
{annotationseparation}{\gre@rubberfalse}%
{intersyllablespacenotes}{\gre@rubberfalse}%
{intersyllablespacenotes@alteration}{\gre@rubberfalse}%
{annotationraise}{\gre@rubberfalse}%
{commentaryseparation}{\gre@rubberfalse}%
{commentaryraise}{\gre@rubberfalse}%
Expand Down Expand Up @@ -1193,6 +1198,15 @@
\ifgre@scale@intersyllablespacenotes%
\gre@changeonedimenfactor{intersyllablespacenotes}{#1}{#2}%
\fi%
\ifgre@scale@interwordspacenotes@alteration%
\gre@changeonedimenfactor{interwordspacenotes@alteration}{#1}{#2}%
\fi%
\ifgre@scale@intersyllablespacenotes@alteration%
\gre@changeonedimenfactor{intersyllablespacenotes@alteration}{#1}{#2}%
\fi%
\ifgre@scale@intersyllablespacestretchhyphen%
\gre@changeonedimenfactor{intersyllablespacestretchhyphen}{#1}{#2}%
\fi%
\ifgre@scale@interwordspacetext%
\gre@changeonedimenfactor{interwordspacetext}{#1}{#2}%
\fi%
Expand Down
4 changes: 2 additions & 2 deletions tex/gregoriotex-syllable.tex
Original file line number Diff line number Diff line change
Expand Up @@ -928,15 +928,15 @@
\gre@skip@syllablefinalskip=\gre@space@skip@interwordspacenotes\relax%
\fi %
\else %
\gre@skip@syllablefinalskip=\gre@space@skip@intersyllablespacenotes\relax%
\gre@skip@syllablefinalskip=\gre@space@dimen@intersyllablespacenotes\relax%
\fi %
\or %
\gre@skip@syllablefinalskip=\gre@space@skip@notebarspace\relax%
\or %
\ifnum#4=1\relax %
\gre@skip@syllablefinalskip=\gre@space@skip@interwordspacenotes@alteration\relax %
\else %
\gre@skip@syllablefinalskip=\gre@space@skip@intersyllablespacenotes@alteration\relax%
\gre@skip@syllablefinalskip=\gre@space@dimen@intersyllablespacenotes@alteration\relax%
\fi %
\fi %
\gre@debugmsg{syllablespacing}{ space after bar = \the\gre@skip@syllablefinalskip}%
Expand Down
10 changes: 6 additions & 4 deletions tex/gsp-default.tex
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@
% minimal space between notes of different words
\grecreatedim{interwordspacenotes}{0.27 cm plus 0.15 cm minus 0.05 cm}{scalable}%
% minimal space between notes of the same syllable.
% Warning: always keep minus to 0; also keep plus very low, or some words won't be hyphenated
\grecreatedim{intersyllablespacenotes}{0.24 cm plus 0.04cm minus 0cm}{scalable}%
\grecreatedim{intersyllablespacenotes}{0.24 cm}{scalable}%
% stretching added in the case where the text of two syllables of the same word are
% separated with an automatic hyphen
\grecreatedim{intersyllablespacestretchhyphen}{0cm plus 0.05cm}{scalable}%
% minimal space between letters of different words. Makes sense to have
% the same plus and minus as interwordspacenotes.
\grecreatedim{interwordspacetext}{0.38 cm plus 0.15 cm minus 0.05 cm}{scalable}%
Expand All @@ -137,7 +139,7 @@
% versions of note spaces when the first note of the second syllable is an alteration
% those are used in euouae blocks
\grecreatedim{interwordspacenotes@alteration}{0.1 cm plus 0.07 cm minus 0.01 cm}{scalable}%
\grecreatedim{intersyllablespacenotes@alteration}{0.1 cm plus 0.04 cm minus 0 cm}{scalable}%
\grecreatedim{intersyllablespacenotes@alteration}{0.1 cm}{scalable}%
% space between notes of a bivirga or trivirga
\grecreatedim{bitrivirspace}{0.06927 cm plus 0.00182 cm minus 0.00546 cm}{scalable}%
% space between notes of a bistropha or tristrophae
Expand Down Expand Up @@ -202,7 +204,7 @@
% minimal space between a note and a bar
\grecreatedim{notebarspace}{0.31903 cm plus 0.27345 cm minus 0.02824 cm}{scalable}%
% maximal space between two syllables for which we consider a dash is not needed
\grecreatedim{maximumspacewithoutdash}{0.02 cm}{scalable}%
\grecreatedim{maximumspacewithoutdash}{0 cm}{scalable}%
% an extensible space for the beginning of lines
\grecreatedim{afterclefnospace}{0 cm plus 0.27345 cm minus 0 cm}{scalable}%
% space between the initial and the beginning of the score
Expand Down

0 comments on commit ed65b71

Please sign in to comment.