Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ 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][develop]

### Fixed
- Fixed a bug that could cause problems with headers/footers by generalizing the fix for fancyhdr (see [#1610](https://github.com/gregorio-project/gregorio/pull/1610) to work with any headers/footers. In particular, it fixes a similar problem with the `memoir` class. See [#1753](https://github.com/gregorio-project/gregorio/pull/1753).
- Fixed some typos that would cause a handful of spaces to be scaled incorrectly. See [PR #1746](https://github.com/gregorio-project/gregorio/pull/1746).

### Removed
- `\gresethyphenprotrusion`
- `\GreInitialClefPosition`
- What were arguments 2-5 of `\GreBeginScore`. This macro now has only 4 arguments (instead of 8).

## [Unreleased][CTAN]
*Note:* 6.2.0 was not released to CTAN and is not compatible with 6.1.0 which is on CTAN. Please make all changes against develop until this is resolved.

Expand Down
16 changes: 4 additions & 12 deletions doc/Command_Index_gregorio.tex
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,14 @@ \section{Gregorio Controls}
\#2 & string & Second line text to place above the initial.\\
\end{argtable}

\macroname{\textbackslash GreBeginScore}{\#1\#2\#3\#4\#5\#6\#7\#8}{gregoriotex-main.tex}
\macroname{\textbackslash GreBeginScore}{\#1\#2\#3\#4}{gregoriotex-main.tex}
Macro to start a score.

\begin{argtable}
\#1 & string & a unique identifier for the score (currently an SHA-1-based digest of the gabc file)\\
\#2 & integer & the height number of the top pitch of the entire score, including signs (DEPRECATED)\\
\#3 & integer & the height number of the bottom pitch of the entire score, including signs (DEPRECATED)\\
\#4 & integer & whether there is a translation line (DEPRECATED)\\
& 0 & there is no translation line in the score\\
& 1 & there is a translation line somewhere in the score\\
\#5 & integer & whether there is above lines text (DEPRECATED)\\
& 0 & there is no above lines text in the score\\
& 1 & there is above lines text somewhere in the score\\
\#6 & string & the absolute filename of the gabc file if point-and-click is enabled\\
\#7 & integer & the number of staff lines\\
\#8 & \TeX\ code & macros to run before the score\\
\#2 & string & the absolute filename of the gabc file if point-and-click is enabled\\
\#3 & integer & the number of staff lines\\
\#4 & \TeX\ code & macros to run before the score\\
\end{argtable}

\macroname{\textbackslash GreEndScore}{}{gregoriotex-main.tex}
Expand Down
32 changes: 1 addition & 31 deletions src/gregoriotex/gregoriotex-write.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ typedef struct gregoriotex_status {
signed char top_height;
signed char bottom_height;

/* indicates if there is a translation on the line */
bool translation; /* DEPRECATED */

/* indicates if there is "above lines text" on the line */
bool abovelinestext; /* DEPRECATED */

bool suppressed_custos;
} gregoriotex_status;

Expand Down Expand Up @@ -4431,7 +4425,6 @@ static void initialize_score(gregoriotex_status *const status,

status->bottom_line = false;
status->top_height = status->bottom_height = UNDETERMINED_HEIGHT;
status->abovelinestext = status->translation = false;
status->suppressed_custos = false;

/* first pass to compute positioning */
Expand All @@ -4450,14 +4443,6 @@ static void initialize_score(gregoriotex_status *const status,
syllable = syllable->next_syllable) {
int voice;

if (syllable->translation) {
status->translation = true;
}

if (syllable->abovelinestext) {
status->abovelinestext = true;
}

/* simultaneously compute height extrema and determine the last "real"
* element in each voice */
for (voice = 0; voice < score->number_of_voices; ++voice) {
Expand All @@ -4468,10 +4453,6 @@ static void initialize_score(gregoriotex_status *const status,
gregorio_glyph *glyph;

switch (element->type) {
case GRE_ALT:
status->abovelinestext = true;
break;

case GRE_CUSTOS:
last_of_voice[voice] = element;
break;
Expand Down Expand Up @@ -4712,21 +4693,10 @@ void gregoriotex_write_score(FILE *const f, gregorio_score *const score,
if (score->first_voice_info) {
clef = score->first_voice_info->initial_clef;
}
/* After removing deprecated arguments, this will become:
fprintf(f, "\\GreBeginScore{%s}{%s}{%u}{}%%\n",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the fourth argument is always empty, why not remove it as well? (I know I wrote this line, but I don't remember the reason.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should remove it. I can't find anything in the codebase that indicates that the empty argument is still used.

digest_to_hex(score->digest),
point_and_click_filename? point_and_click_filename : "",
score->staff_lines); */
fprintf(f, "\\GreBeginScore{%s}{%d}{%d}{%d}{%d}{%s}{%u}"
"{\\GreInitialClefPosition{%d}{%d}}%%\n", /* DEPRECATED */
digest_to_hex(score->digest),
status.top_height, /* DEPRECATED */
status.bottom_height, /* DEPRECATED */
bool_to_int(status.translation), /* DEPRECATED */
bool_to_int(status.abovelinestext), /* DEPRECATED */
point_and_click_filename? point_and_click_filename : "",
score->staff_lines,
clef.line, clef.secondary_line); /* DEPRECATED */
score->staff_lines);
if (score->nabc_lines) {
fprintf(f, "\\GreScoreNABCLines{%d}", (int)score->nabc_lines);
}
Expand Down
18 changes: 7 additions & 11 deletions tex/gregoriotex-main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1214,14 +1214,10 @@

%macro called at the beginning of a score
% #1 is the gabc score id
% #2 is the high height (DEPRECATED)
% #3 is the low height (DEPRECATED)
% #4 is 1 if there is a translation somewhere (DEPRECATED)
% #5 is if 1 if we have space above the staff (DEPRECATED)
% #6 is the point-and-click filename
% #7 is the number of staff lines
% #8 is to set the initial clef position
\def\GreBeginScore#1#2#3#4#5#6#7#8{%
% #2 is the point-and-click filename
% #3 is the number of staff lines
% #4 is to set the initial clef position
\def\GreBeginScore#1#2#3#4{%
% scores must be new paragraphs!
\ifhmode\par\fi %
\gre@beginningofscoretrue%
Expand All @@ -1230,8 +1226,8 @@
\gre@resetledgerlineheuristics%
\global\setattribute\gre@attr@syllable@id{0}%
\global\setattribute\gre@attr@alteration@id{0}%
\xdef\gre@gabcname{#6}%
\gre@setstafflines{#7}%
\xdef\gre@gabcname{#2}%
\gre@setstafflines{#3}%
\ifnum\gre@count@lastline=0\relax
\xdef\gre@saved@parfillskip{\the\parfillskip}%
\parfillskip=0pt plus 0pt minus 0pt\relax%
Expand All @@ -1245,7 +1241,7 @@
\gre@generatelines %
\noindent%
\gre@calculate@additionalspaces
#8%
#4%
\directlua{gregoriotex.at_score_beginning([[#1]])}%
%TODO do something like LaTeX's AtBeginDocument
\ifdefined\optgabcAtScoreBeginning %
Expand Down
2 changes: 0 additions & 2 deletions tex/gregoriotex-signs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,6 @@
\gre@trace@end%
}%

\def\GreInitialClefPosition#1#2{}%% DEPRECATED

% macro that typesets the clef
% arguments are :
%% #1: the type of the clef : c or f
Expand Down
4 changes: 0 additions & 4 deletions tex/gregoriotex-spaces.tex
Original file line number Diff line number Diff line change
Expand Up @@ -566,10 +566,6 @@
\hbox to \gre@dimen@temp@four{#2\hss}%
}%

\def\gresethyphenprotrusion#1{% OBSOLETE
\gre@obsolete{\protect\gresethyphenprotrusion{percentage}}{\protect\gresetprotrusionfactor{eolhyphen}{factor}}% OBSOLETE
}% OBSOLETE

% dimen keeping the shift computed with next function
\newdimen\gre@dimen@eolshift

Expand Down