Skip to content

Commit

Permalink
Merge branch 'develop' into fix-683_bolnoclef
Browse files Browse the repository at this point in the history
* develop:
  Adding Known Bugs to CHANGELOG
  Making Release
  Called gregorio_strdup instead of strdup.
  Applied fixes suggested by Karl Berry for integration into TeX Live.
  Fixed incorrect detection of note-in-same-glyph for episema height adjustment. Fixes gregorio-project#693.
  Spelling error in CHANGELOG
  Typo in example
  Corrected end-of-word detection when there is no whitespace at end-of-file. Fixes gregorio-project#675.
  Improved the display of enum values in gabc output error messages.
  Modified gabc and dump writers to write only non-deprecated headers. Fixes gregorio-project#670.
  Corrected markdown formatting. Part of the implementation for gregorio-project#632.
  Added \MessageBreak to break up the long message for readability in the log. Fixed missing "else" case in IfStrEq.  Part of the implementation for gregorio-project#632.
  Added change log and upgrade documentation for this change. Part of the implementation for gregorio-project#632.
  Deprecated \gre@style@biginitial. Part of the implementation for gregorio-project#632.
  Added change log with link to gregorio-project#631.
  Deprecated gabc initial-style header. Part of the implementation for gregorio-project#632.
  Documented new and renamed macros. Part of the implementation for gregorio-project#632.
  Refactored first syllable output to allow TeX-controlled initial style. Part of the implementation for gregorio-project#632.
  Corrected escape of hash sign in documentation.
  Implemented salicus flexus glyphs.  Fixes gregorio-project#631.
  • Loading branch information
rpspringuel committed Dec 9, 2015
2 parents 86009a2 + 7c52222 commit fd9d61e
Show file tree
Hide file tree
Showing 57 changed files with 1,445 additions and 1,239 deletions.
2 changes: 1 addition & 1 deletion .gregorio-version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
4.0.0-rc2
4.0.0

*** Do not modify this file. ***
Use VersionManager.py to change the version.
92 changes: 36 additions & 56 deletions CHANGELOG.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

This file contains instructions to upgrade to a new release of Gregorio.

## 4.1

### Initial handling

Initial handling has been simplified. This deprecates the `initial-style` gabc header and the `biginitial` style.

Rather than using the `initial-style` gabc header, set the number of lines the initial should use in Tex with the `\gresetinitiallines` command. It currently accepts 0 (for no initial), 1 (for a one-line initial), or 2 (for a two-line initial).

As for the `biginitial` style, the intent is that the `initial` style be changed within the TeX document whenever the initial style should change, regardless of how many lines the initial requires. For example, before including a score that has a two-line initial, you would probably want to redefine the `initial` style to use a larger font. Then, before including a score which requires a one-line initial, you would then redefine the `initial` style back to what it was before.

In order to allow a smoother transition to the new behavior, GregorioTeX will behave differently depending on whether or not deprecated usage is allowed (controlled by the `[allowdeprecated]` package option). If deprecated usage is allowed, GregorioTeX will use the deprecated `biginitial` style for big initials. If not, GregorioTeX will use the `initial` style for big initials.

Since the `biginitial` style will disappear with Gregorio 5.0, please consider disabling deprecated usage (set `[allowdeprecated=false]` when using the `gregoriotex` package) and use the `initial` style as just described.

## 4.0

### Font changes
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ dnl
dnl You should have received a copy of the GNU General Public License
dnl along with Gregorio. If not, see <http://www.gnu.org/licenses/>.

AC_INIT([gregorio],[4.0.0-rc2],[[email protected]])
FILENAME_VERSION="4_0_0-rc2"
AC_INIT([gregorio],[4.0.0],[[email protected]])
FILENAME_VERSION="4_0_0"
AC_SUBST(FILENAME_VERSION)
MK=""
AC_SUBST(MK)
Expand Down
24 changes: 13 additions & 11 deletions doc/Command_Index_User.tex
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,17 @@ \subsubsection{Including scores}
\gregorioscore[a]{TecumPrincipium} % gabc auto compiled.
\end{latexcode}

\macroname{\textbackslash gabcsnippet}{[\optional{\#1}]\{\#2\}}{gregoriotex-main.tex}
Converts the gabc notation specified in \texttt{\#2} to Gregorio\TeX\ and
includes it directly in the document. The optional argument \texttt{[\#1]}
may be used to specify a gabc \texttt{initial-style}, which defaults to
\texttt{1}.
\macroname{\textbackslash gabcsnippet}{\{\#1\}}{gregoriotex-main.tex}
Converts the gabc notation specified in \texttt{\#1} to Gregorio\TeX\ and
includes it directly in the document.

\begin{argtable}
\#1 & number & Optional. The gabc \texttt{initial-style} value to use.\\
\#2 & string & The gabc to insert into the document.\\
\#1 & string & The gabc to insert into the document.\\
\end{argtable}

\medskip For example:\par\medskip
\begin{latexcode}
\gabcsnippet[0]{(c3) Al(eg~)le(gv.fhg)lu(efe___)ia(e.) (::)}
\gabcsnippet{(c3) Al(eg~)le(gv.fhg)lu(efe___)ia(e.) (::)}
\end{latexcode}


Expand Down Expand Up @@ -512,7 +509,7 @@ \subsubsection{Glyph Alteration}
For example:

\medskip \begin{latexcode}
\gresimpledefbarglyph{A}{0.3em}
\gresimpledefbarredsymbol{A}{0.3em}
\end{latexcode}

Will define \texttt{\textbackslash Abar} to be a A with a bar shifted right
Expand Down Expand Up @@ -611,8 +608,7 @@ \subsubsection{Styling}
\begin{tabular}{lp{7cm plus .5cm}r}
Element Name & Description & Default\\
\hline
\stylename{initial} & Normal Initials & 40 pt font\\
\stylename{biginitial} & Big (2-Line) Initials & 80 pt font\\
\stylename{initial} & Score initial (the first letter of the score, when offset from the rest of the text) & 40 pt font\\
\stylename{translation} & Translation text (appears below lyrics) & {\it italics}\\
\stylename{abovelinestext} & Above line text (\texttt{<alt></alt>} in gabc, appears above the staff) & normal\\
\stylename{normalstafflines} & Full length staff lines & none\\
Expand Down Expand Up @@ -698,6 +694,12 @@ \subsubsection{Text Elements}

\textbf{Nota Bene:} Usually the argument of this command should be an \verb=\includegraphics= command, but you may use what ever you want as the illuminated initial.

\macroname{\textbackslash gresetinitiallines}{\#1}{gregoriotex-syllable.tex}
Sets the number of lines the score initial requires.

\begin{argtable}
\#1 & number & The number of lines required by the initial. If \texttt{0}, the score will have no separated initial.\\
\end{argtable}

\subsubsection{Text Alignment}
Gregorio\TeX\ allows you to manipulate the global alignment behavior of some text elements using the following commands.
Expand Down
42 changes: 24 additions & 18 deletions doc/Command_Index_gregorio.tex
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ \section{Gregorio Controls}
\#3 & integer & Set horizontal episema (0), horizontal episema under a note (1), line at top of staff (2), line at bottom of staff (3), choral sign (4).\\
\end{argtable}

\macroname{\textbackslash GreAdjustSecondLine}{}{gregoriotex.tex}
%didn't actually find this one in gregoriotex-write.c, classified it here based on it’s related function GreAdjustThirdLine
Macro to call before first syllable, but after \verb=\GreSetInitialClef=.

\macroname{\textbackslash GreAdjustThirdLine}{}{gregoriotex-main.tex}
Macro to call during the second line.

\macroname{\textbackslash GreAugmentumDuplex}{\#1\#2\#3}{gregoriotex-signs.tex}
Macro for typesetting an augmentum duplex (a pair of punctum mora)

Expand Down Expand Up @@ -114,9 +107,6 @@ \section{Gregorio Controls}
& \texttt{1} & Call came from translation centering.
\end{argtable}

\macroname{\textbackslash GreBeginNotes}{}{gregoriotex.tex}
Macro to draw the staff lines. Comes after the initial but before the clef.

\macroname{\textbackslash GreBold}{\#1}{gregoriotex.sty and gregoriotex.tex}
Makes argument bold. Accesses \LaTeX\ \verb=\textbf= (\textit{gregoriotex.sty}) or Plain \TeX\ \verb=\bf= (\textit{gregoriotex.tex}) as appropriate. Corresponds to ``<b></b>'' tags in gabc.

Expand Down Expand Up @@ -532,9 +522,6 @@ \section{Gregorio Controls}
\#1 & integer & Height number of the custos.\\
\end{argtable}

\macroname{\textbackslash GreNoInitial}{}{gregoriotex-main.tex}
Macro called when no initial is being set.

\macroname{\textbackslash GreOverBrace}{\#1\#2\#3\#4}{gregoriotex-signs.tex}
Macro to typeset a round brace above the lines.

Expand Down Expand Up @@ -625,6 +612,16 @@ \section{Gregorio Controls}
\#2 & string & Type of glyph the semicirculus is attached to. See \nameref{EpisemaSpecial} argument for description of options.\\
\end{argtable}

\macroname{\textbackslash GreScoreOpening}{\#1\#2\#3\#4}{gregoriotex-syllable.tex}
Opens the score.

\begin{argtable}
\#1 & \TeX\ code & Macros rendering the things after the initial but before the notes.\\
\#2 & \TeX\ code & Macros rendering the things after starting notes but before the syllable.\\
\#3 & \TeX\ control sequence & Control sequence for the syllable.\\
\#4 & \TeX\ code & Macros rendering the first syllable; should emit the initial and populate \verb=\gre@opening@syllabletext=.\\
\end{argtable}

\macroname{\textbackslash GreScoreReference}{\#1}{gregoriotex-main.tex}
Currently does nothing.

Expand All @@ -636,8 +633,17 @@ \section{Gregorio Controls}
\#2 & string & Type of glyph the semicirculus is attached to. See \nameref{EpisemaSpecial} argument for description of options.\\
\end{argtable}

\macroname{\textbackslash GreSetBigInitial}{}{gregoriotex-main.tex}
Macro which indicates that a 2-line initial is desired.
\macroname{\textbackslash GreSetFirstSyllableText}{\#1\#2\#3\#4\#5\#6}{gregoriotex-syllable.tex}
Sets the first syllable text.

\begin{argtable}
\#1 & \TeX\ code & Initial.\\
\#2 & \TeX\ code & First letter after the initial.\\
\#3 & \TeX\ code & Everything else in the syllable.\\
\#4 & \TeX\ code & Three syllable parts when there is a separated initial.\\
\#5 & \TeX\ code & Three syllable parts where there is no separated initial.\\
\#6 & \TeX\ code & Extra macros to run if there is an initial.\\
\end{argtable}

\macroname{\textbackslash GreSetFixedNextTextFormat}{\#1}{gregoriotex-syllable.tex}
Same as \verb=\GreSetFixedTextFormat= except for next syllable.
Expand Down Expand Up @@ -669,9 +675,6 @@ \section{Gregorio Controls}
& \texttt{5} & underline
\end{argtable}

\macroname{\textbackslash GreSetInitial}{\#1}{gregoriotex-main.tex}
Macro to set the initial in the score.

\begin{argtable}
\#1 & character & The initial letter of the score.\\
\end{argtable}
Expand Down Expand Up @@ -705,6 +708,9 @@ \section{Gregorio Controls}
\#3 & string & the end letters, they don't count for alignment\\
\end{argtable}

\macroname{\textbackslash GreSetNoFirstSyllableText}{}{gregoriotex-syllable.tex}
Macro that indicates there is no next in the first syllable.

\macroname{\textbackslash GreSetTextAboveLines}{\#1}{gregoriotex-main.tex}
Macro to place argument above the lines and empty
\verb=\gre@currenttextabovelines= when done.
Expand Down
55 changes: 43 additions & 12 deletions doc/Command_Index_internal.tex
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,6 @@ \section{Gregorio\TeX{} Controls}
\#1 & string & Snippet of gabc code.\\
\end{argtable}
\macroname{\textbackslash gre@gabcsnippet@option}{[\#1]\#2}{gregoriotex-main.tex}
Macro that handles \verb=\gabcsnippet= calls when they have an optional
argument.
\begin{argtable}
\#1 & int & Value of initial style to be passed to gregorio \\
\#2 & string & Snippet of gabc code.\\
\end{argtable}
\macroname{\textbackslash gre@writemode}{\#1}{gregoriotex-main.tex}
Macro that writes its argument with \verb=\greannotation=. The
argument typically is given to this macro by \verb=\GreMode= in the
Expand Down Expand Up @@ -369,6 +360,27 @@ \section{Gregorio\TeX{} Controls}
\#1 & integer & height of the custos character to be placed\\
\end{argtable}
\macroname{\textbackslash gre@beginnotes}{}{gregoriotex-main.tex}
Macro to draw the staff lines. Comes after the initial but before the clef.
\macroname{\textbackslash gre@noinitial}{}{gregoriotex-main.tex}
Macro called when no initial is being set.
\macroname{\textbackslash gre@setbiginitial}{}{gregoriotex-main.tex}
Macro which indicates that a 2-line initial is desired.
\macroname{\textbackslash gre@setinitial}{\#1}{gregoriotex-main.tex}
Macro to set the initial in the score.
\macroname{\textbackslash gre@adjustsecondline}{}{gregoriotex.tex}
Macro to call before first syllable, but after \verb=\GreSetInitialClef=.
\macroname{\textbackslash gre@adjustthirdline}{}{gregoriotex-main.tex}
Macro to call during the second line.
\macroname{\textbackslash gre@adjustlineifnecessary}{}{gregoriotex-main.tex}
Macro that calls \verb=\gre@adjustthirdline= if indicated by \verb=\ifgre@thirdlineadjustmentnecessary=.
\macroname{\textbackslash gre@addspaceabove}{}{gregoriotex-main.tex}
Macro to increase the space above the lines to account for above lines text.
Expand Down Expand Up @@ -458,6 +470,24 @@ \section{Gregorio\TeX{} Controls}
& \texttt{0} & otherwise\\
\end{argtable}
\macroname{\textbackslash gre@setfirstsyllabletext}{\#1\#2\#3\#4\#5\#6}{gregoriotex-syllable.tex}
Internal macro to set the first syllable text after all parts are known.
\begin{argtable}
\#1 & \TeX\ code & First part of the syllable (before the vowel)\\
\#2 & \TeX\ code & Middle part of the syllable (the vowel)\\
\#3 & \TeX\ code & Last part of the syllable (after the vowel)\\
\#4 & \TeX\ code & First letter of the syllable\\
\#5 & \TeX\ code & Everything after the first letter of the syllable\\
\#6 & \TeX\ code & Macros to run after the text is emitted\\
\end{argtable}
\macroname{\textbackslash gre@opening@syllabletext}{}{gregoriotex-syllable.tex}
Macro that stores the computed \TeX\ code for rendering the text of the first syllable.
\macroname{\textbackslash gre@opening@initialstyle}{}{gregoriotex-syllable.tex}
Macro used by \verb=GreSetInitialStyle= to store the initial style
\macroname{\textbackslash gre@exhyphencharsave}{}{gregoriotex-main.tex}
Macro for saving the ex hyphen character so that it can be restored at the end of the score.
Expand Down Expand Up @@ -518,6 +548,7 @@ \section{Gregorio\TeX{} Controls}
& \texttt{1} & stay at the end of the glyph; doesn’t make much sense to use this\\
& \texttt{2} & go back the width of \#1; this starts the episema at the glyph from the end that starts at \#1’s width from the end\\
& \texttt{3} & go back to the beginning of the previous glyph and then forward the width of \#1; this starts the episema at the glyph from the start that starts just after \#1’s width from the start\\
& \texttt{4} & go back to the beginning of the previous glyph and then forward the width of \#1, then back the width of \#2; this ends the episema at the end of \#1\\
\#3 & integer &the ambitus for a two note episema at the diagonal stroke of a porrectus, porrectus flexus, orculus resupinus, or torculus resupinus flexus\\
\#4 & \texttt{0} & an horizontal episema\\
& \texttt{1} & an horizontal episema under a note\\
Expand Down Expand Up @@ -941,9 +972,6 @@ \subsection{Fonts}
\macroname{\textbackslash gre@font@nabc}{}{gregoriotex-nabc.tex}
The font for ancient notation.
\macroname{\textbackslash gre@font@biginitial}{}{gregoriotex.tex}
The font for the default big initial format in Plain \TeX.
\macroname{\textbackslash gre@font@initial}{}{gregoriotex.tex}
The font for the default initial format in Plain \TeX.
Expand Down Expand Up @@ -1208,6 +1236,9 @@ \subsection{Flags}
\macroname{\textbackslash ifgre@showhyphenafterthissyllable}{}{gregoriotex-syllable.tex}
Boolean used by \verb=\GreSyllable= to decide if a hyphen should be shown after the syllable.
\macroname{\textbackslash ifgre@thirdlineadjustmentnecessary}{}{gregoriotex-syllable.tex}
Boolean which indicates that a third-line adjustment to staff line width is necessary.
\macroname{\textbackslash ifgre@scale@stafflinefactor}{}{gregoriotex-spaces.tex}
Boolean indicating whether the stafflinefactor should scale with changes of \texttt{grefactor}, or not.
Expand Down
2 changes: 1 addition & 1 deletion doc/GregorioRef.tex
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@

\vspace{1cm}

\large Version \textbf{4.0.0-rc2}, 5 November 2015 %% PARSE_VERSION_DATE
\large Version \textbf{4.0.0}, 8 December 2015 %% PARSE_VERSION_DATE

\vspace{1.5cm}
\end{center}
Expand Down
65 changes: 64 additions & 1 deletion fonts/squarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
5: 'Five',
}

GREGORIO_VERSION = '4.0.0-rc2'
GREGORIO_VERSION = '4.0.0'

# The unicode character at which we start our numbering:
# U+E000 is the start of the BMP Private Use Area
Expand Down Expand Up @@ -173,6 +173,7 @@ def main():
scandicus(font_width)
ancus(font_width)
salicus(font_width)
salicus_flexus(font_width)
torculus(font_width)
torculus_liquescens(font_width)
porrectus(font_width)
Expand Down Expand Up @@ -394,6 +395,7 @@ def get_width(widths, glyphName):
S_VIRGA_STRATA = 'VirgaStrata'
S_SALICUS = 'Salicus'
S_SALICUS_LONGQUEUE = 'SalicusLongqueue'
S_SALICUS_FLEXUS = 'SalicusFlexus'
S_TORCULUS_LIQUESCENS = 'TorculusLiquescens'
S_TORCULUS_LIQUESCENS_QUILISMA = 'TorculusLiquescensQuilisma'
S_FLEXUS_ORISCUS_SCAPUS = 'FlexusOriscusScapus'
Expand Down Expand Up @@ -833,6 +835,11 @@ def write_salicus(widths, i, j, last_glyph, shape, lique=L_NOTHING):
glyph_name = '%s%s%s%s' % (shape, AMBITUS[i], AMBITUS[j], lique)
if copy_existing_glyph(glyph_name):
return
length = draw_salicus(widths, i, j, last_glyph)
set_width(length)
end_glyph(glyph_name)

def draw_salicus(widths, i, j, last_glyph):
not_deminutus = last_glyph != 'rdeminutus'
if j == 1 and not_deminutus:
if last_glyph == 'rvsbase':
Expand Down Expand Up @@ -878,13 +885,69 @@ def write_salicus(widths, i, j, last_glyph, shape, lique=L_NOTHING):
last_glyph = 'Virga'
elif last_glyph == 'rvlbase':
last_glyph = 'VirgaLongqueue'
elif last_glyph == 'PunctumLineBLBR':
last_glyph = 'PunctumLineBR'
elif last_glyph == 'PunctumLineBL':
last_glyph = 'Punctum'
if not_deminutus:
paste_and_move(last_glyph, length, (i+j)*BASE_HEIGHT)
length = length + get_width(widths, last_glyph)
else:
length = length+get_width(widths, 'line2')
paste_and_move(last_glyph, (length-get_width(widths, last_glyph)),
(i+j)*BASE_HEIGHT)
return length

def salicus_flexus(widths):
"Creates the salicus flexus."
message("salicus")
for i in range(1, MAX_INTERVAL+1):
for j in range(1, MAX_INTERVAL+1):
for k in range(1, MAX_INTERVAL+1):
write_salicus_flexus(widths, i, j, k, "PunctumLineTL")
for i in range(1, MAX_INTERVAL+1):
for j in range(1, MAX_INTERVAL+1):
for k in range(1, MAX_INTERVAL+1):
write_salicus_flexus(widths, i, j, k, "deminutus", L_DEMINUTUS)
for i in range(1, MAX_INTERVAL+1):
for j in range(1, MAX_INTERVAL+1):
for k in range(1, MAX_INTERVAL+1):
write_salicus_flexus(widths, i, j, k, "auctusa1", L_ASCENDENS)
for i in range(1, MAX_INTERVAL+1):
for j in range(1, MAX_INTERVAL+1):
for k in range(1, MAX_INTERVAL+1):
write_salicus_flexus(widths, i, j, k, "auctusd1", L_DESCENDENS)

def write_salicus_flexus(widths, i, j, k, last_glyph, lique=L_NOTHING):
"Writes the salicus glyphs."
new_glyph()
glyph_name = '%s%s%s%s%s' % (S_SALICUS_FLEXUS, AMBITUS[i], AMBITUS[j],
AMBITUS[k], lique)
if copy_existing_glyph(glyph_name):
return
is_deminutus = last_glyph == 'deminutus'
if k == 1 and not is_deminutus:
penult_glyph = 'PunctumLineBL'
else:
penult_glyph = 'PunctumLineBLBR'
length = draw_salicus(widths, i, j, penult_glyph)
if k == 1 and not is_deminutus:
length = length-0.01
if last_glyph == 'PunctumLineTL':
last_glyph = 'Punctum'
elif last_glyph == 'auctusa1':
last_glyph = 'PunctumAscendens'
elif last_glyph == 'auctusd1':
last_glyph = 'PunctumDescendens'
if k != 1:
length = length - get_width(widths, 'line2')
write_line(k, length, (1+i+j-k)*BASE_HEIGHT)
if is_deminutus:
length = length - get_width(widths, last_glyph)
if k != 1:
length = length + get_width(widths, 'line2')
paste_and_move(last_glyph, length, (i+j-k)*BASE_HEIGHT)
length = length + get_width(widths, last_glyph)
set_width(length)
end_glyph(glyph_name)

Expand Down
Loading

0 comments on commit fd9d61e

Please sign in to comment.