Skip to content

Commit

Permalink
Added support for square brackets around notes.
Browse files Browse the repository at this point in the history
Part of the implementation for gregorio-project#844.
  • Loading branch information
henryso committed Jul 4, 2016
1 parent 394a23c commit bd6733d
Show file tree
Hide file tree
Showing 20 changed files with 1,255 additions and 641 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
[Unreleased][unreleased]
### Added
- More cavum shapes are now available. To use them, simply add `r` in gabc to any note in a glyph. See [#844](https://github.com/gregorio-project/gregorio/issues/844).
- Square brackets can be placed around notes by using `[[` and `]]` to surround said notes in gabc (see [#844](https://github.com/gregorio-project/gregorio/issues/844)).

### Removed
- The gregorio and granapadano fonts are no longer distributed with the Gregorio distribution archive. They will now be available for download separately (along with optional Dominican "-op" variants). ***If there are other logistics, put them here or delete this statement before release.*** See [UPGRADE.md](UPGRADE.md) and [#844](https://github.com/gregorio-project/gregorio/issues/844) for details.
Expand Down
6 changes: 5 additions & 1 deletion contrib/gabc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ syn match gabcSpace "z[-+0]\?" contained
syn match gabcSpace "Z[-+]\?" contained
syn match gabcSpace "/\[[^\]]*\]" contained extend
syn match gabcCommand "@\@<!\[[^\]]*\]" contained extend
syn match gabcCommand "[{}]" contained extend
syn match gabcBracket "\[\[" contained
syn match gabcBracket "\]\]" contained

syn region gabcComment start="%" end="$" keepend extend
syn region gabcAlt matchgroup=gabcTextMarkup start="<alt>" end="</alt>"
Expand All @@ -48,7 +51,7 @@ syn region gabcVerbatim matchgroup=gabcTextMarkup start="<v>" end="</v>"
syn region gabcNabc matchgroup=gabcNabcCut start="|" end="[|)]" keepend
syn cluster gabcFusible contains=gabcBasicNote,gabcAlteration,gabcBar,gabcSpace,
\gabcComment,gabcCommand,gabcNoteError,gabcFuse,
\gabcTextOrNoteMarkup,gabcClef,gabcNabc
\gabcTextOrNoteMarkup,gabcClef,gabcNabc,gabcBracket
syn region gabcFuseGroup matchGroup=gabcFuseGroup start="@\[" end="\]"
\ contains=@gabcFusible,gabcFuseEnd contained keepend
syn region gabcNotes matchgroup=gabcNote start="(" end=")"
Expand Down Expand Up @@ -79,6 +82,7 @@ hi def link gabcCommand Type
hi def link gabcBar Special
hi def link gabcSpace Special
hi def link gabcNabcCut Delimiter
hi def link gabcBracket Delimiter
hi def link gabcFuse Constant
hi def link gabcFuseGroup Constant
hi def link gabcFuseEnd Constant
Expand Down
12 changes: 12 additions & 0 deletions doc/Command_Index_gregorio.tex
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,18 @@ \section{Gregorio Controls}
\#1 & string & Text to be typeset in bold.\\
\end{argtable}

\macroname{\textbackslash GreBracket}{\#1\#2\#3\#4}{gregoriotex-signs.tex}
Typesets a bracket.

\begin{argtable}
\#1 & \texttt{0} & Typeset a left bracket.\\
& \texttt{1} & Typeset a right bracket.\\
\#2 & integer & The height of the lowest note within the brackets.\\
\#3 & integer & The ambitus of the notes within the brackets.\\
\#4 & string & the line, byte offset, and column address for textedit
links when point-and-click is enabled.\\
\end{argtable}

\macroname{\textbackslash GreChangeClef}{\#1\#2\#3\#4\#5\#6\#7}{gregoriotex-signs.tex}
Macro called when key changes

Expand Down
22 changes: 22 additions & 0 deletions doc/GregorioRef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ local EXCLUDE = {
nonmarkingreturn = true,
AscendensOriscusLineBLTR = true,
AscendensOriscusLineTR = true,
BracketLeftZero = true,
BracketLeftSix = true,
BracketLeftSeven = true,
BracketLeftEight = true,
BracketLeftNine = true,
BracketLeftTen = true,
BracketLeftEleven = true,
BracketLeftTwelve = true,
BracketLeftThirteen = true,
BracketLeftFourteen = true,
BracketRightZero = true,
BracketRightSix = true,
BracketRightSeven = true,
BracketRightEight = true,
BracketRightNine = true,
BracketRightTen = true,
BracketRightEleven = true,
BracketRightTwelve = true,
BracketRightThirteen = true,
BracketRightFourteen = true,
PunctumAuctusLineBL = true,
PunctumLineBLBR = true,
PunctumLineBR = true,
Expand Down Expand Up @@ -72,6 +92,8 @@ local GABC = {
AscendensPunctumInclinatum = [[G&&&1]],
AuctumMora = [[\excluded{g}.]],
BarBrace = [[\excluded{,}\_]],
BracketLeft = [=[[[\excluded{gh]]}]=],
BracketRight = [=[\excluded{[[gh}]]]=],
CClef = [[c3]],
CClefChange = [[c3]],
Circulus = [[\excluded{g}r3]],
Expand Down
Loading

0 comments on commit bd6733d

Please sign in to comment.