Skip to content

Commit

Permalink
Added quarter bar (as divisio minimis).
Browse files Browse the repository at this point in the history
  • Loading branch information
henryso committed Aug 11, 2018
1 parent e49fd3c commit 1c8b2f4
Show file tree
Hide file tree
Showing 20 changed files with 491 additions and 38 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- Added support for two and three letter language codes for supported languages. [This list of codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (and language names) was used for this support. No new languages are supported as a result of this change, just different ways of specifying the existing names.
- A non-rotated diamond-shaped variant of the punctum inclinatum. Append a `2` in gabc to the capitalized note pitch letter to force gregorio to use this shape. Otherwise, gregorio will try to use it when a string of these notes is at the unison within a syllable. See [#1425](https://github.com/gregorio-project/gregorio/issues/1425).
- Support for an eighth bar (nicknamed divisio "minimis") by using `^` in gabc (see [#1424](https://github.com/gregorio-project/gregorio/issues/1424)).


## [Unreleased][CTAN]
Expand Down
2 changes: 1 addition & 1 deletion contrib/gabc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ syn match gabcFuseEnd "\]" contained
syn match gabcBar ":?\?" contained
syn match gabcBar ";[1-8]\?" contained
syn match gabcBar ",[0-8]\?" contained
syn match gabcBar "`0\?" contained
syn match gabcBar "[`^]0\?" contained
syn match gabcSpace "[! ]" contained
syn match gabcSpace "/0\?" contained
syn match gabcSpace "z[-+0]\?" contained
Expand Down
28 changes: 25 additions & 3 deletions doc/Command_Index_User.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1844,16 +1844,26 @@ \subsubsection{Bar distances}
This space is added before the final divisio final of a score (old bar spacing algorithm only).
\end{gdimension}

Spaces around bars when they are typeset inside a syllable. The \verb=@short= suffix for virgula
and divisio minima indicates the space used when the notes surrounding the bar are strictly lower
than \texttt{g} (in a four-line score).
Spaces around bars when they are typeset inside a syllable. The \verb=@short=
suffix for virgula and divisio minima indicates the space used when the notes
surrounding the bar are strictly lower than \texttt{g} (in a four-line score).
For divisio minimis, the \verb=@short= suffix is for notes lower than
\texttt{h}. When applied to ``high'' positions (on the ledger line above
the staff), the \verb=@short= distances will be used for up to two pitches
higher.

\begin{gdimension}{bar@virgula}
\end{gdimension}

\begin{gdimension}{bar@virgula@short}
\end{gdimension}

\begin{gdimension}{bar@minimis}
\end{gdimension}

\begin{gdimension}{bar@minimis@short}
\end{gdimension}

\begin{gdimension}{bar@minima}
\end{gdimension}

Expand All @@ -1880,6 +1890,12 @@ \subsubsection{Bar distances}
\begin{gdimension}{bar@virgula@standalone@text@short}
\end{gdimension}

\begin{gdimension}{bar@minimis@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@minimis@standalone@text@short}
\end{gdimension}

\begin{gdimension}{bar@minima@standalone@text}
\end{gdimension}

Expand Down Expand Up @@ -1909,6 +1925,12 @@ \subsubsection{Bar distances}
\begin{gdimension}{bar@virgula@standalone@notext@short}
\end{gdimension}

\begin{gdimension}{bar@minimis@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@minimis@standalone@notext@short}
\end{gdimension}

\begin{gdimension}{bar@minima@standalone@notext}
\end{gdimension}

Expand Down
22 changes: 22 additions & 0 deletions doc/Command_Index_gregorio.tex
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,28 @@ \section{Gregorio Controls}
& \texttt{1} & The notes around the bar are far, \verb=@short= versions of spaces will be used.\\
\end{argtable}

\macroname{\textbackslash GreDivisioMinimis}{\#1\#2\#3}{gregoriotex-signs.tex}
Macro to typeset a divisio ``minimis'' (eighth bar).

\begin{argtable}
\#1 & \texttt{0} & There is no text under the bar.\\
& \texttt{1} & There is text under the bar.\\
\#2 & \TeX\ code & Macros which may happen before the skip but after the divisio ``minimis'' (typically \verb=\grevepisema=).\\
\#3 & \texttt{0} & The notes around the bar are vertically close to the bar.\\
& \texttt{1} & The notes around the bar are far, \verb=@short= versions of spaces will be used.\\
\end{argtable}

\macroname{\textbackslash GreDivisioMinimaHigh}{\#1\#2\#3}{gregoriotex-signs.tex}
Macro to typeset a divisio ``minimis'' (eighth bar) on the ledger line above the staff.

\begin{argtable}
\#1 & \texttt{0} & There is no text under the bar.\\
& \texttt{1} & There is text under the bar.\\
\#2 & \TeX\ code & Macros which may happen before the skip but after the divisio ``minimis'' (typically \verb=\grevepisema=).\\
\#3 & \texttt{0} & The notes around the bar are vertically close to the bar.\\
& \texttt{1} & The notes around the bar are far, \verb=@short= versions of spaces will be used.\\
\end{argtable}

\macroname{\textbackslash GreDivisioMinor}{\#1\#2}{gregoriotex-signs.tex}
Macro to typeset a divisio minor.

Expand Down
30 changes: 21 additions & 9 deletions doc/Command_Index_internal.tex
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ \section{Gregorio\TeX{} Controls}
\macroname{\textbackslash gre@hepisorline}{\#1\#2\#3\#4\#5\#6\#7}{gregoriotex-signs.tex}
Macro to typeset a horizontal line (either an additional staff line or an episema).
{\small
\begin{argtable}
\#1 & character & The letter of the height of the episema (not the height of the note it corresponds to).\\
\#2 & \texttt{0} & go back to the beginning of the previous glyph; this starts the episema at the beginning of the previous glyph\\
Expand All @@ -690,6 +691,7 @@ \section{Gregorio\TeX{} Controls}
& \texttt{4} & for horizontal episema cases, position low within the space as if the episema is over the note\\
& \texttt{5} & for horizontal episema cases, position high within the space as if the episema is under the note\\
\end{argtable}
}
\macroname{\textbackslash gre@hepisorlineaux}{\#1\#2\#3\#4}{gregoriotex-signs.tex}
Macro that will help in the typesetting of a horizontal episema and additional lines.
Expand Down Expand Up @@ -841,6 +843,8 @@ \section{Gregorio\TeX{} Controls}
& \texttt{14} & virgula on ledger line above the staff\\
& \texttt{15} & minima on ledger line above the staff\\
& \texttt{16} & dotted major\\
& \texttt{17} & minimis (eighth bar)\\
& \texttt{18} & minimis (eighth bar) on ledger line above the staff\\
\#2 & \texttt{0} & in a syllable containing only this bar\\
& \texttt{1} & in a syllable containing other notes\\
\#3 & \texttt{0} & if there is no text underneath the bar\\
Expand Down Expand Up @@ -1073,14 +1077,14 @@ \section{Gregorio\TeX{} Controls}
A macro which applies formatting that needs to apply to the whole syllable (rather than the parts individually) for the current syllable. Necessary to preserve ligatures across parts within a syllable.
\begin{argtable}
\#1 & string & The syllable (usually built as \verb=\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart=\\
\#1 & string & The syllable (usually built as \texttt{\small\pmac{gre@firstsyllablepart}\linebreak[1]\pmac{gre@middlesyllablepart}\linebreak[1]\pmac{gre@endsyllablepart}})\\
\end{argtable}
\macroname{\textbackslash gre@fixednexttextformat}{\#1}{gregoriotex-syllable.tex}
A macro which applies formatting that needs to apply to the whole syllable (rather than the parts individually) for the next syllable. Necessary to preserve ligatures across parts within a syllable.
\begin{argtable}
\#1 & string & The syllable (usually built as \verb=\gre@nextfirstsyllablepart\gre@nextmiddlesyllablepart\gre@nextendsyllablepart=\\
\#1 & string & The syllable (usually built as \texttt{\small\pmac{gre@nextfirstsyllablepart}\linebreak[1]\pmac{gre@nextmiddlesyllablepart}\linebreak[1]\pmac{gre@nextendsyllablepart}})\\
\end{argtable}
\macroname{\textbackslash gre@if@rewritesyllable}{\#1\#2}{gregoriotex-syllable.tex}
Expand Down Expand Up @@ -1251,7 +1255,7 @@ \section{Gregorio\TeX{} Controls}
\end{argtable}
\macroname{\textbackslash gre@syllable@end}{\#1\#2\#3}{gregoriotex-syllable.tex}
Macro to make a few checks and call the right macros between \verb=\endbeforebar, \endofword, \endofsyllable=.
Macro to make a few checks and call the right macros between \verb=\endbeforebar=, \verb=\endofword=, \verb=\endofsyllable=.
\begin{argtable}
\#1 & & next syllable type (\#7 of \verb=\GreSyllable=)\\
Expand Down Expand Up @@ -1326,11 +1330,11 @@ \section{Gregorio\TeX{} Controls}
\begin{argtable}
\#1 & \texttt{0} & emits nothing\\
& \texttt{1} emits \verb=@standalone=\\
& \texttt{1} & emits \verb=@standalone=\\
\#2 & \texttt{0} & emits \verb=@notext= (only if standalone)\\
& \texttt{1} emits \verb=@text= (only if standalone)\\
& \texttt{1} & emits \verb=@text= (only if standalone)\\
\#3 & \texttt{0} & emits nothing\\
& \texttt{1} emits \verb=@short=\\
& \texttt{1} & emits \verb=@short=\\
\end{argtable}
\macroname{\textbackslash gre@drawadditionalline}{\#1\#2\#3\#4\#5\#6}{gregoriotex-signs.tex}
Expand Down Expand Up @@ -1610,6 +1614,14 @@ \subsection{Character Reference Aliases}
Alias that will hold the character for the high virgula for the current number
of lines for the staff.
\macroname{\textbackslash gre@char@bar@divisiominimis}{}{gregoriotex-main.tex}
Alias that will hold the character for the divisio ``minimis'' (eighth bar) for
the current number of lines for the staff.
\macroname{\textbackslash gre@char@bar@divisiominimishigh}{}{gregoriotex-main.tex}
Alias that will hold the character for the high divisio ``minimis'' (eighth bar)
for the current number of lines for the staff.
\macroname{\textbackslash gre@char@bar@divisiominima}{}{gregoriotex-main.tex}
Alias that will hold the character for the divisio minima for the current
number of lines for the staff.
Expand Down Expand Up @@ -2086,7 +2098,7 @@ \subsection{Distances}
\macroname{\textbackslash gre@dimen@enddifference}{}{gregoriotex-spaces.tex}
Distance from the end of the notes to the end of the text for the previous syllable. Positive values when notes go further than text, negative in the other case. This means that \verb=\kern\gre@dimen@enddifference= will take you from the end of the text to the end of the notes.
For regular syllables and bar syllables using the old bar spacing algorithm this is calculated using \verb=\gre@calculate@enddifference=. For bar syllables using the new bar spacing algorithm the calculation is \verb=-\wd\gre@box@syllabletext - \gre@dimen@begindifference + \wd\gre@box@syllablenotes=
For regular syllables and bar syllables using the old bar spacing algorithm this is calculated using \verb=\gre@calculate@enddifference=. For bar syllables using the new bar spacing algorithm the calculation is \texttt{\small-\pmac{wd}\pmac{gre@box@syllabletext} - \pmac{gre@dimen@begindifference} + \pmac{wd}\pmac{gre@box@syllablenotes}}
\macroname{\textbackslash gre@dimen@previousenddifference}{}{gregoriotex-spaces.tex}
Stored value of enddifference prior to the current one.
Expand All @@ -2103,7 +2115,7 @@ \subsection{Distances}
\macroname{\textbackslash gre@dimen@begindifference}{}{gregoriotex-spaces.tex}
The difference between the start of the notes and the start of the text for the current syllable. Positive when when text begins first, negative in other case. This means that \verb=\kern\gre@dimen@begindifference= will take you from the start of the notes to the start of the text.
For regular syllables and bar syllables using the old bar spacing algorithm this is calculated as \verb=\gre@dimen@notesaligncenter - \gre@dimen@textaligncenter=. For bar syllables using the new bar spacing algorithm the calculation is \verb= -\wd\gre@box@syllablenotes/2 - \gre@dimen@bar@shift - \gre@skip@bar@allocation - \gre@dimen@adjustedpreviousenddifference + \gre@skip@text@allocation + \gre@dimen@text@shift -\wd\gre@box@syllabletext/2=.
For regular syllables and bar syllables using the old bar spacing algorithm this is calculated as \texttt{\small\pmac{gre@dimen@notesaligncenter} - \pmac{gre@dimen@textaligncenter}}. For bar syllables using the new bar spacing algorithm the calculation is \linebreak\texttt{\small-\pmac{wd}\pmac{gre@box@syllablenotes}/2 - \pmac{gre@dimen@bar@shift} - \pmac{gre@skip@bar@allocation} - \pmac{gre@dimen@adjustedpreviousenddifference} + \pmac{gre@skip@text@allocation} + \pmac{gre@dimen@text@shift} - \pmac{wd}\pmac{gre@box@syllabletext}/2}.
\macroname{\textbackslash gre@dimen@lastglyphwidth}{}{gregoriotex-spaces.tex}
The width of the last glyph.
Expand Down Expand Up @@ -2339,7 +2351,7 @@ \subsection{Note Alignment Type}\label{notesalign}
\texttt{8} & flexus with an ambitus of one\\
\texttt{9} & flexus deminutus\\
\texttt{10} & virgula\\
\texttt{11} & divisio minima\\
\texttt{11} & divisio minima/minimis\\
\texttt{12} & divisio minor\\
\texttt{13} & divisio maior\\
\texttt{14} & dominican bar\\
Expand Down
2 changes: 2 additions & 0 deletions doc/Gabc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,8 @@ \subsubsection{Separation Bars}
\hline
\texttt{`} & virgula \\
\texttt{`0} & virgula on the ledger line above the staff \\
\texttt{\textasciicircum} & divisio ``minimis'' (eighth bar) \\
\texttt{\textasciicircum0} & divisio ``minimis'' (eighth bar) \\
\texttt{,} & divisio minima (quarter bar) \\
\texttt{,0} & divisio minima on the ledger line above the staff \\
\texttt{;} & divisio minor (half bar) \\
Expand Down
16 changes: 12 additions & 4 deletions doc/GregorioRef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ local EXCLUDE = {
['VirgulaThree'] = true,
['VirgulaFive'] = true,
['VirgulaSix'] = true,
['DivisioMinimisTwo'] = true,
['DivisioMinimisThree'] = true,
['DivisioMinimisFive'] = true,
['DivisioMinimisSix'] = true,
['DivisioMinimaTwo'] = true,
['DivisioMinimaThree'] = true,
['DivisioMinimaFive'] = true,
Expand Down Expand Up @@ -155,7 +159,7 @@ local GABC = {
AscendensOriscusScapus = [[g&&&O1]],
AscendensOriscusScapusLongqueue = [[h&&&O1]],
AscendensOriscusScapusOpenqueue = [[a&&&O1]],
AscendensPunctumInclinatum = [[G&&&1]],
AscendensPunctumInclinatum = [[G1&&&]],
AuctumMora = [[\excluded{g}.]],
BarBrace = [[\excluded{,}\_]],
BracketLeft = [=[[[\excluded{ce]]}]=],
Expand All @@ -180,13 +184,14 @@ local GABC = {
DescendensOriscusScapus = [[g&&&O0]],
DescendensOriscusScapusLongqueue = [[h&&&O0]],
DescendensOriscusScapusOpenqueue = [[a&&&O0]],
DescendensPunctumInclinatum = [[G&&&0]],
DescendensPunctumInclinatum = [[G0&&&]],
DivisioDominican = [[,3]],
DivisioDominicanAlt = [[,4]],
DivisioMaiorFour = [[:]],
DivisioMaiorDottedFour = [[:?]],
DivisioMaiorDottedBackingFour = [[\excluded{:?}]],
DivisioMinimaFour = [[,]],
DivisioMinimisFour = [[\textasciicircum{}]],
DivisioMinorFour = [[;]],
FClefChange = [[f3]],
FClef = [[f3]],
Expand Down Expand Up @@ -250,6 +255,7 @@ local GABC = {
SemicirculusReversus = [[\excluded{g}r5]],
Sharp = [[g\#{}]],
SharpHole = [[\excluded{g\#{}}]],
StansPunctumInclinatum = [[G2&&&]],
StrophaAucta = [[g&&&s>]],
StrophaAuctaLongtail = [[h&&&s>]],
Stropha = [[g&&&s]],
Expand Down Expand Up @@ -454,8 +460,10 @@ function GregorioRef.emit_score_glyphs(cs_normal, cs_hollow)
tex.sprint([[\nopagebreak&&&]])
else
tex.sprint(string.format(
[[{\scriptsize %s{\bfseries %s}{\itshape %s}%s%s}&{\ttfamily\small %s}&{\%s\char%d}&]],
fusion, shape, ambitus, debilis, liquescence, gabc and gabc:gsub('&&&', '') or '', cs_normal, char
[[{%s\scriptsize %s{\bfseries %s}{\itshape %s}%s%s}&{\ttfamily\small %s}&{\%s\char%d}&]],
gabc and [[]] or [[\color{red}]],
fusion, shape, ambitus, debilis, liquescence,
gabc and gabc:gsub('&&&', '') or '', cs_normal, char
))
end
variant = sorted_normal[i]
Expand Down
1 change: 1 addition & 0 deletions doc/GregorioRef.tex
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
\newcommand*{\nb}{n.b.\@\xspace}
\newcommand*{\ie}{i.e.\@\xspace}
\newcommand*{\etc}{etc.\@\xspace}
\newcommand{\pmac}[1]{\textbackslash{}#1}

\newif\ifbreakable
\let\oldsubsection\subsection
Expand Down
Loading

0 comments on commit 1c8b2f4

Please sign in to comment.