Skip to content

Commit

Permalink
Merge branch 'release-4.1' into change_default
Browse files Browse the repository at this point in the history
* release-4.1:
  oops
  fix (::Z)
  fix (::Z)
  • Loading branch information
rpspringuel committed Mar 2, 2016
2 parents 7877edf + 5d54707 commit 247ec52
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
4 changes: 3 additions & 1 deletion doc/Command_Index_internal.tex
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,14 @@ \section{Gregorio\TeX{} Controls}
\macroname{\textbackslash gre@savedlastoflinecount}{}{gregoriotex-main.tex}
A spot to save the \verb=\gre@lastoflinecount= so we can change it temporarily and revert to the saved value later.
\macroname{\textbackslash gre@newlinecommon}{\#1}{gregoriotex-main.tex}
\macroname{\textbackslash gre@newlinecommon}{\#1\#2}{gregoriotex-main.tex}
The macro which needs to be called each time a new lines is started.
\begin{argtable}
\#1 & \texttt{0} & Justifying the line being ended\\
& \texttt{1} & Do not justify the line being ended\\
\#2 & \texttt{0} & Take care of eolshift\\
& \texttt{1} & Do not adjust end of line (when already done by the new spacing algorithm)\\
\end{argtable}
\macroname{\textbackslash gre@endafterbar}{\#1}{gregoriotex-main.tex}
Expand Down
35 changes: 20 additions & 15 deletions tex/gregoriotex-main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,21 @@
% macro called to go to the next line
\def\GreNewLine{%
\gre@debugmsg{lineheight}{GreNewLine}%
\gre@newlinecommon{0}%
\gre@newlinecommon{0}{0}%
\relax%
}%

% basically same as above, but this one does a \hfill, so the lines are not justified
\def\GreNewParLine{%
\gre@debugmsg{lineheight}{GreNewParLine}%
\gre@newlinecommon{1}%
\gre@newlinecommon{1}{0}%
\relax%
}%

% the macro we call each time we force a changing of line, it automatically sets \gre@knownline, and adjusts left spaces
\def\gre@newlinecommon#1{%
% #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
\def\gre@newlinecommon#1#2{%
\ifgre@blockeolcustos\ifnum\gre@insidediscretionary=0\relax %
\gre@localrightbox{}%
\fi\fi %
Expand All @@ -244,21 +246,24 @@
\fi %
\global\advance\gre@knownline by 1\relax %
\global\gre@lastoflinecount=2\relax %
% we have to repeat the end of syllable shifts here because the manual line breaks will occur before we get to the regular shifting code in \GreSyllable
\ifdim\gre@dimen@enddifference <0pt\relax%
%% important, else we are not really at the end of the syllable
\kern -\gre@dimen@enddifference\relax%
\fi%
\ifgre@eolshiftsenabled%
\GreNoBreak% we want to make sure this shift doesn't get separated from the previous one if both occur
\gre@calculate@eolshift{\gre@dimen@enddifference}%
\gre@debugmsg{eolshift}{Manual end of line shift: \the\gre@dimen@eolshift}%
\kern -\gre@dimen@eolshift\relax%
\fi%
\ifnum#2=0\relax %
% we have to repeat the end of syllable shifts here because the manual line breaks will occur before we get to the regular shifting code in \GreSyllable
\ifdim\gre@dimen@enddifference <0pt\relax%
%% important, else we are not really at the end of the syllable
\kern -\gre@dimen@enddifference\relax%
\fi%
\ifgre@eolshiftsenabled%
\GreNoBreak% we want to make sure this shift doesn't get separated from the previous one if both occur
\gre@calculate@eolshift{\gre@dimen@enddifference}%
\gre@debugmsg{eolshift}{Manual end of line shift: \the\gre@dimen@eolshift}%
\kern -\gre@dimen@eolshift\relax%
\fi%
\fi %
\ifnum\gre@insidediscretionary=0\relax %
\gre@updateleftbox %
\fi %
\ifnum#1=1\relax %
\GreNoBreak %
\hfill %
\fi %
\gre@penalty{-10001}%
Expand Down Expand Up @@ -1646,7 +1651,7 @@
\ifgre@raggedbreakbeforeeuouae %
\directlua{gregoriotex.save_pos(#1,2)}%
\ifcase\directlua{gregoriotex.is_ypos_different(#1)}\relax%
\gre@newlinecommon{1}%
\gre@newlinecommon{1}{1}%
\fi %
\fi %
\gre@in@euouaetrue %
Expand Down
4 changes: 2 additions & 2 deletions tex/gregoriotex-syllable.tex
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@
% cannot allow (::z) to end the line right after the bar, so we just save the
% end of line for later.
\xdef\gre@newlinearg{-1}
\gdef\gre@newlinecommondelayed#1{%
\gdef\gre@newlinecommondelayed#1#2{%
\xdef\gre@newlinearg{#1}%
}

Expand Down Expand Up @@ -976,7 +976,7 @@
\fi%
\else\ifgre@endofscore\else %
\gre@debugmsg{barspacing}{calling new line with argument: \gre@newlinearg}%
\gre@newlinecommon{\gre@newlinearg}%
\gre@newlinecommon{\gre@newlinearg}{1}%
\fi\fi%
\else%
%
Expand Down

0 comments on commit 247ec52

Please sign in to comment.