Skip to content

Commit

Permalink
Added the ability to set the minimum number of notes to keep together…
Browse files Browse the repository at this point in the history
… at the

start and end of a syllable.
Fixed broken document compliation, including missing gabc for new shapes.
Fixes gregorio-project#1044.
  • Loading branch information
henryso committed Mar 21, 2016
1 parent f156a74 commit f9b00de
Show file tree
Hide file tree
Showing 11 changed files with 219 additions and 59 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
*.out
*.toc
*.gaux
*.glog
*.idx
*.ilg
*.ind
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- It is now possible to invert the oriscus orientation on pes quassus and oriscus flexus shapes. Use `o0` or `o1` to force the oriscus into the orientation you desire. It is also possible to fuse the oriscus from either direction in either orientation. See [#898](https://github.com/gregorio-project/gregorio/issues/898) and [#972](https://github.com/gregorio-project/gregorio/issues/972).
- Formerly missing torculus figures starting with an oriscus are now rendered using neume fusion (see [#1013](https://github.com/gregorio-project/gregorio/issues/1013)).
- Gregorio will keep together (prevent line breaks between) a user-configurable number of notes (by default, 4) at the start and end of the syllable. Further, Gregorio will prevent line breaks in a syllable with fewer than a user-configurable number of notes (by default, 10). These values may be changed by using the `\gresetunbreakablesyllablenotes` command. See GregorioRef for details (for the change request, see [#1044](https://github.com/gregorio-project/gregorio/issues/1044)).

### Changed
- The stemmed oriscus flexus `(gOe)` is now consistent with the unstemmed oriscus flexus `(goe)` in that the oriscus points downward at the note that follows. If you prefer to have the oriscus point upward, use `(gO1e)` for force upward orientation.
Expand Down
15 changes: 15 additions & 0 deletions doc/Command_Index_User.tex
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,21 @@ \subsubsection{End of Line Behavior}
& \texttt{ragged} & Set the last line ragged (default)
\end{argtable}

\macroname{\textbackslash gresetunbreakablesyllablenote}{\{\#1\}\{\#2\}\{\#3\}}{gregoriotex-syllable.tex}
Configures how notes should be kept together on line breaks.

\begin{argtable}
\#1 & integer & The minimum number of notes in the syllable before the
syllable may be broken across lines. Defaults to
\getgrecount{unbreakabletotalnotes}.\\
\#2 & integer & The minimum number of notes at the start of a syllable that
must be kept together when the syllable is broken across
lines. Defaults to \getgrecount{unbreakableinitialnotes}.\\
\#3 & integer & The minimum number of notes at the end of a syllable that
must be kept together when the syllable is broken across
lines. Defaults to \getgrecount{unbreakablefinalnotes}.\\
\end{argtable}


\subsubsection{Bar spacing}

Expand Down
13 changes: 11 additions & 2 deletions doc/Command_Index_gregorio.tex
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ \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 GreAdHocSpaceEndOfElement}{\#1\#2}{gregoriotex-main.tex}
\macroname{\textbackslash GreAdHocSpaceEndOfElement}{\#1\#2\#3}{gregoriotex-main.tex}
Macro to end an element with an ad-hoc space.

\begin{argtable}
\#1 & float & The factor to scale the default space for use as an ad-hoc space.\\
\#2 & \texttt{0} & Space is breakable.\\
& \texttt{1} & Space is unbreakable.\\
\#3 & integer & The number of notes in the syllable prior to this macro.\\
\end{argtable}

\macroname{\textbackslash GreAugmentumDuplex}{\#1\#2\#3}{gregoriotex-signs.tex}
Expand Down Expand Up @@ -273,7 +274,7 @@ \section{Gregorio Controls}
& \texttt{3} & before bar
\end{argtable}

\macroname{\textbackslash GreEndOfElement}{\#1\#2}{gregoriotex-main.tex}
\macroname{\textbackslash GreEndOfElement}{\#1\#2\#3}{gregoriotex-main.tex}
Macro to end elements.

\begin{argtable}
Expand All @@ -284,6 +285,7 @@ \section{Gregorio Controls}
& \texttt{4} & Ad-hoc space.\\
\#2 & \texttt{0} & Space is breakable.\\
& \texttt{1} & Space is unbreakable.\\
\#3 & integer & The number of notes in the syllable prior to this macro.\\
\end{argtable}

\macroname{\textbackslash GreEndNLBArea}{\#1\#2}{gregoriotex-main.tex}
Expand Down Expand Up @@ -963,6 +965,13 @@ \section{Gregorio Controls}
\#9 & Gregorio\TeX\ glyphs & all the notes
\end{argtable}

\macroname{\textbackslash GreSyllableNoteCount}{\#1}{gregoriotex-syllable.tex}
Indicates the number of notes in the current syllable.

\begin{argtable}
\#1 & integer & The number of notes in the current syllable.\\
\end{argtable}

\macroname{\textbackslash GreTranslationCenterEnd}{}{gregoriotex-main.tex}
Macro to end the centering of the translation text.

Expand Down
17 changes: 17 additions & 0 deletions doc/Command_Index_internal.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,23 @@ \subsection{Flags}
\macroname{\textbackslash ifgre@nextforcedcentering}{}{gregoriotex-syllable.tex}
Boolean indicating that the next syllable had a forced center in the gabc which is to be respected.
\macroname{\textbackslash ifgre@unbreakableendofelement}{}{gregoriotex-main.tex}
Boolean used by \verb=\GreEndOfElement= to store whether the line may be broken at that point.
\macroname{\textbackslash gre@count@syllablenotes}{}{gregoriotex-syllable.tex}
Count containing the number of notes in the syllable.
\macroname{\textbackslash gre@count@unbreakabletotalnotes}{}{gregoriotex-syllable.tex}
Count containing the minimum number of notes in the syllable before the syllable
may be broken across lines.
\macroname{\textbackslash gre@count@unbreakableinitialnotes}{}{gregoriotex-syllable.tex}
Count containing the minimum number of notes at the start of a syllable that
must be kept together when the syllable is broken across lines.
\macroname{\textbackslash gre@count@unbreakablefinalnotes}{}{gregoriotex-syllable.tex}
Count containing the minimum number of notes at the end of a syllable that must
be kept together when the syllable is broken across lines.
\subsection{Boxes}
Expand Down
100 changes: 65 additions & 35 deletions doc/GregorioRef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ local EXCLUDE = {
['.notdef'] = true,
['.null'] = true,
nonmarkingreturn = true,
AscendensOriscusLineBLTR = true,
AscendensOriscusLineTR = true,
PunctumAuctusLineBL = true,
PunctumLineBLBR = true,
PunctumLineBR = true,
PunctumLineTR = true,
PunctumSmall = true,
FlexusLineBL = true,
FlexusAmOneLineBL = true,
OriscusLineTR = true,
DescendensOriscusLineTR = true,
DescendensOriscusLineBLTR = true,
QuilismaLineTR = true,
VirgaLineBR = true,
SalicusOriscus = true,
Expand All @@ -58,6 +61,14 @@ local GABC = {
AccentusReversus = [[\excluded{g}r2]],
Ancus = [[gec]],
AncusLongqueue = [[hfd]],
AscendensOriscusCavum = [[go1r]],
AscendensOriscusCavumHole = [[\excluded{gor}]],
AscendensOriscus = [[go1]],
AscendensOriscusLineBL = [[\excluded{e}@go1]],
AscendensOriscusLineTL = [[\excluded{i}@go1]],
AscendensOriscusScapus = [[gO1]],
AscendensOriscusScapusLongqueue = [[hO1]],
AscendensOriscusScapusOpenqueue = [[aO1]],
AuctumMora = [[\excluded{g}.]],
BarBrace = [[\excluded{,}\_]],
CClef = [[c3]],
Expand All @@ -70,84 +81,84 @@ local GABC = {
CustosUpLong = [[f+]],
CustosUpMedium = [[a+]],
CustosUpShort = [[g+]],
DescendensOriscusCavum = [[go0r]],
DescendensOriscusCavumHole = [[\excluded{go0r}]],
DescendensOriscus = [[go0]],
DescendensOriscusLineBL = [[\excluded{e}@go0]],
DescendensOriscusLineTL = [[\excluded{i}@go0]],
DescendensOriscusScapus = [[gO0]],
DescendensOriscusScapusLongqueue = [[hO0]],
DescendensOriscusScapusOpenqueue = [[aO0]],
DivisioDominican = [[,3]],
DivisioDominicanAlt = [[,4]],
DivisioMaior = [[:]],
DivisioMinima = [[,]],
DivisioMinor = [[;]],
FClef = [[f3]],
FClefChange = [[f3]],
FClef = [[f3]],
Flat = [[gx]],
FlatHole = [[\excluded{gx}]],
Flexus = [[ge]],
FlexusLongqueue = [[hf]],
FlexusNobar = [[@hf]],
FlexusOriscus = [[goe]],
FlexusOriscusInusitatus = [[go1e]],
FlexusOriscusScapus = [[gOe]],
FlexusOriscusScapusInusitatus = [[gO1e]],
FlexusOriscusScapusInusitatusLongqueue = [[hO1f]],
FlexusOriscusScapusLongqueue = [[hOf]],
LeadingOriscus = [[go\excluded{igig}]],
LeadingPunctum = [[g\excluded{igig}]],
LeadingQuilisma = [[gw\excluded{igig}]],
Linea = [[g=]],
LineaPunctum = [[gR]],
LineaPunctumCavum = [[gr0]],
LineaPunctumCavumHole = [[\excluded{gr0}]],
LineaPunctum = [[gR]],
Natural = [[gy]],
NaturalHole = [[\excluded{gy}]],
Oriscus = [[go1]],
OriscusCavum = [[go1r]],
OriscusCavumDeminutus = [[gor\~{}]],
Oriscus = [[go]], -- for Deminutus
OriscusCavum = [[gor]], -- for Deminutus
OriscusCavumDeminutusHole = [[\excluded{gor\~{}}]],
OriscusCavumHole = [[\excluded{gor}]],
OriscusCavumReversus = [[go0r]],
OriscusCavumReversusHole = [[\excluded{go0r}]],
OriscusLineBL = [[\excluded{e}@go]],
OriscusReversus = [[go0]],
OriscusReversusLineTL = [[\excluded{i}@go]],
OriscusScapus = [[gO1]],
OriscusScapusLongqueue = [[hO1]],
OriscusScapusOpenqueue = [[aO1]],
OriscusScapusReversus = [[gO0]],
OriscusScapusReversusLongqueue = [[hO0]],
OriscusScapusReversusOpenqueue = [[aO0]],
Pes = [[gi]],
PesQuadratum = [[gqi]],
PesQuadratumLongqueue = [[hqj]],
PesQuassus = [[goi]],
PesQuassusInusitatus = [[go0i]],
PesQuassusInusitatusLongqueue = [[ho0j]],
PesQuassusLongqueue = [[hoj]],
PesQuilisma = [[gwi]],
PesQuilismaQuadratum = [[gWi]],
PesQuilismaQuadratumLongqueue = [[hWj]],
Porrectus = [[geg]],
PorrectusFlexus = [[gege]],
PorrectusFlexusNobar = [[\excluded{e}gege]],
Porrectus = [[geg]],
PorrectusLongqueue = [[hfh]],
PorrectusNobar = [[@geg]],
Punctum = [[g]],
PunctumCavum = [[gr]],
PunctumCavumHole = [[\excluded{gr}]],
PunctumCavumInclinatum = [[Gr]],
PunctumCavumInclinatumAuctus = [[Gr>]],
PunctumCavumInclinatumAuctusHole = [[\excluded{Gr>}]],
PunctumCavumInclinatum = [[Gr]],
PunctumCavumInclinatumHole = [[\excluded{Gr}]],
PunctumInclinatum = [[G]],
Punctum = [[g]],
PunctumInclinatumAuctus = [[G>]],
PunctumInclinatum = [[G]],
PunctumLineBL = [[\excluded{e}@g]],
PunctumLineTL = [[\excluded{i}@g]],
Quilisma = [[gw]],
RoundBrace = '[ob:1;6mm]',
RoundBraceDown = '[ub:1;6mm]',
Salicus = [[giOk]],
RoundBrace = '[ob:1;6mm]',
SalicusFlexus = [[giOki]],
Salicus = [[giOk]],
SalicusLongqueue = [[hjOl]],
Scandicus = [[gik]],
Semicirculus = [[\excluded{g}r4]],
SemicirculusReversus = [[\excluded{g}r5]],
Sharp = [[g\#{}]],
SharpHole = [[\excluded{g\#{}}]],
Stropha = [[gs]],
StrophaAucta = [[gs>]],
StrophaAuctaLongtail = [[hs>]],
Stropha = [[gs]],
Torculus = [[gig]],
TorculusLiquescens = [[gige]],
TorculusLiquescensQuilisma = [[gwige]],
Expand Down Expand Up @@ -179,41 +190,60 @@ local GABC_AMBITUS_ONE = {
local GABC_FUSE = {
Upper = {
Punctum = [[\excluded{e}@]],
Oriscus = [[\excluded{e}@]],
AscendensOriscus = [[\excluded{e}@]],
DescendensOriscus = [[\excluded{e}@]],
Pes = [[\excluded{e}@]],
PesQuadratum = [[\excluded{e}@]],
PesQuadratumLongqueue = [[\excluded{f}@]],
PesQuadratumOpenqueue = { [[\excluded{a}@]], [[bq[ll:0]c]] },
PesQuassus = [[\excluded{e}@]],
PesQuassusInusitatus = [[\excluded{e}@]],
PesQuassusInusitatusLongqueue = [[\excluded{f}@]],
PesQuassusInusitatusOpenqueue = { [[\excluded{a}@]], [[bo0[ll:0]c]] },
PesQuassusLongqueue = [[\excluded{f}@]],
PesQuassusOpenqueue = { [[\excluded{a}@]], [[bo[ll:0]c]] },
Flexus = [[\excluded{e}@]],
FlexusOriscus = [[\excluded{e}@]],
FlexusOriscusInusitatus = [[\excluded{e}@]],
},
Lower = {
Punctum = [[\excluded{i}@]],
Oriscus = [[\excluded{i}@]],
AscendensOriscus = [[\excluded{i}@]],
DescendensOriscus = [[\excluded{i}@]],
Pes = [[\excluded{i}@]],
PesQuadratum = [[\excluded{i}@]],
PesQuadratumLongqueue = [[\excluded{j}@]],
PesQuadratumOpenqueue = [[\excluded{b}@]],
PesQuassus = [[\excluded{i}@]],
PesQuassusInusitatus = [[\excluded{i}@]],
PesQuassusInusitatusLongqueue = [[\excluded{j}@]],
PesQuassusInusitatusOpenqueue = [[\excluded{b}@]],
PesQuassusLongqueue = [[\excluded{j}@]],
PesQuassusOpenqueue = [[\excluded{b}@]],
Flexus = [[\excluded{i}@]],
FlexusOriscus = [[\excluded{i}@]],
FlexusOriscusInusitatus = [[\excluded{i}@]],
},
Up = {
Punctum = [[\excluded{@ij}]],
Oriscus = [[\excluded{@ij}]],
OriscusScapus = [[\excluded{@ij}]],
OriscusScapusLongqueue = [[\excluded{@jk}]],
AscendensOriscus = [[\excluded{@ij}]],
AscendensOriscusScapus = [[\excluded{@ij}]],
AscendensOriscusScapusLongqueue = [[\excluded{@jk}]],
DescendensOriscus = [[\excluded{@ij}]],
DescendensOriscusScapus = [[\excluded{@ij}]],
DescendensOriscusScapusLongqueue = [[\excluded{@jk}]],
Quilisma = [[\excluded{@ij}]],
Flexus = [[\excluded{@gi}]],
FlexusNobar = [[\excluded{@hj}]],
},
Down = {
Punctum = [[\excluded{@eg}]],
Oriscus = [[\excluded{@eg}]],
OriscusScapus = [[\excluded{@eg}]],
OriscusScapusLongqueue = [[\excluded{@eg}]],
AscendensOriscus = [[\excluded{@eg}]],
AscendensOriscusScapus = [[\excluded{@eg}]],
AscendensOriscusScapusLongqueue = [[\excluded{@eg}]],
DescendensOriscus = [[\excluded{@eg}]],
DescendensOriscusScapus = [[\excluded{@eg}]],
DescendensOriscusScapusLongqueue = [[\excluded{@eg}]],
VirgaReversa = [[\excluded{@eg}]],
VirgaReversaLongqueue = [[\excluded{@fg}]],
},
Expand Down Expand Up @@ -336,8 +366,8 @@ function GregorioRef.emit_score_glyphs(cs_greciliae, cs_gregorio, cs_parmesan)
local post_word_liquescentia = P'Nothing' + P'Deminutus' + P'Ascendens' +
P'Descendens'
local liquescentia = post_word_liquescentia + P'Up' + P'Down'
local word = (majuscule * minuscule^0) - fusion - ambitus - debilis -
post_word_liquescentia
local word = ((majuscule * minuscule^0) - fusion - ambitus - debilis -
post_word_liquescentia) + ((P'Ascendens' + P'Descendens') * P'Oriscus')
local liquescence = debilis^-1 * liquescentia^-1
local pattern = C(fusion^-1) * C(word^1) * C(ambitus^0) * C(debilis^-1) *
C(liquescentia^-1) * -1
Expand Down
4 changes: 4 additions & 0 deletions doc/GregorioRef.tex
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
\gre@style@modemodifier #2\endgre@style@modemodifier %
\gre@style@modedifferentia #3\endgre@style@modedifferentia %
}

\newcommand{\getgrecount}[1]{%
\the\csname gre@count@#1\endcsname%
}
\makeatother

\setlength{\parindent}{0mm} % Default is 15pt
Expand Down
Loading

0 comments on commit f9b00de

Please sign in to comment.