Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for dotted barlines. #1387

Merged
merged 3 commits into from
Nov 26, 2017
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased][unreleased]
- Added support for virgula (gabc: `` `0``) and divisio minima (gabc: `,0`) on the ledger line above the staff (see [#1370](https://github.com/gregorio-project/gregorio/issues/1370)).
- Added support for a dotted bar (gabc: `:?`) (See [#1360](https://github.com/gregorio-project/gregorio/issues/1360) and [#1387](https://github.com/gregorio-project/gregorio/issues/1387))
- 10 new St. Gall neume glyphs have been added to the `gregall` font (see [#1328](https://github.com/gregorio-project/gregorio/issues/1328), [#1330](https://github.com/gregorio-project/gregorio/issues/1330), [#1337](https://github.com/gregorio-project/gregorio/issues/1337), [#1340](https://github.com/gregorio-project/gregorio/issues/1340), [#1341](https://github.com/gregorio-project/gregorio/issues/1341), [#1342](https://github.com/gregorio-project/gregorio/issues/1342), [#1343](https://github.com/gregorio-project/gregorio/issues/1343), [#1345](https://github.com/gregorio-project/gregorio/issues/1345)).
- 4 new Laon neume glyphs have been added to the `grelaon` font.

Expand Down
2 changes: 1 addition & 1 deletion contrib/gabc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ syn match gabcTextOrNoteMarkup "</\?nlba>" contained
syn match gabcTextCenter "[{}]" contained
syn match gabcFuse "@" contained
syn match gabcFuseEnd "\]" contained
syn match gabcBar ":" contained
syn match gabcBar ":?\?" contained
syn match gabcBar ";[1-8]\?" contained
syn match gabcBar ",[0-8]\?" contained
syn match gabcBar "`0\?" contained
Expand Down
27 changes: 23 additions & 4 deletions doc/Command_Index_User.tex
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,14 @@ \subsubsection{Staff Lines}
& \texttt{invisible} & The staff lines behind an alteration should not be printed (\LaTeX\ default)
\end{argtable}

\macroname{\textbackslash gresetlinesbehinddottedbar}{\{\#1\}}{gregoriotex-signs.tex}
Macro for setting whether the staff lines behind a dotted bar should be shown or not.

\begin{argtable}
\#1 & \texttt{visible} & The staff lines behind a dotted bar should be printed\\
& \texttt{invisible} & The staff lines behind a dotted bar should not be printed (default)
\end{argtable}


\subsubsection{Score Font}
Gregorio\TeX\ currently supports 3 different fonts for the glyphs in a score (neumes, clefs, alterations, \etc): Greciliae (a customized version of Caeciliae by Fr.\ Matthew Spencer, OSJ), Gregorio, and Grana Padano (née Parmesan, developed for Lilypond by Juergen Reuter).
Expand Down Expand Up @@ -482,10 +490,9 @@ \subsubsection{Glyph Alteration}
& string & (any other string) The name of the glyph to use.
\end{argtable}

\medskip If \texttt{\#1} has a wildcard (a \texttt{*}) in it, then
\texttt{\#3} must start with a dot and all glyphs matching \texttt{\#1}
will be replaced with corresponding glyphs whose names have \texttt{\#3}
appended.
\medskip If \texttt{\#1} has a wildcard (a \texttt{*}) in it, then \texttt{\#3}
must be empty or start with a dot, and all glyphs matching \texttt{\#1} will be
replaced with corresponding glyphs whose names have \texttt{\#3} appended.

\medskip If \texttt{\#2} is \texttt{*}, then the substitution is assumed
to be available in all score fonts.
Expand All @@ -503,6 +510,18 @@ \subsubsection{Glyph Alteration}
\grechangeglyph{TorculusResupinus*}{*}{.alt}
\end{latexcode}

\textbf{Nota Bene:} Because the bar glyphs vary based on number of score lines,
substituting them is more complicated. To cover all numbers of score lines,
you will need to substitute all of the glyphs for the same (like
\texttt{VirgulaTwo} through \texttt{VirgulaSix} for all available virgula
glyphs). For example:

\medskip To replace all "dotted divisio maior" glyphs with their same-named
variants from the \texttt{gregorio} font, use the following:\par\medskip
\begin{latexcode}
\grechangeglyph{DivisioMaiorDotted*}{gregorio}{}
\end{latexcode}

\macroname{\textbackslash greresetglyph}{\{\#1\}}{gregoriotex-main.tex}
Removes a Gregorio\TeX\ score glyph substitution, restoring it back to
its original form.
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 @@ -260,6 +260,15 @@ \section{Gregorio Controls}
\#2 & \TeX\ code & Macros which may happen before the skip but after the divisio maior (typically \verb=\grevepisema=).\\
\end{argtable}

\macroname{\textbackslash GreDivisioMaiorDotted}{\#1\#2}{gregoriotex-signs.tex}
Macro to typeset a dotted divisio maior.

\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 maior (typically \verb=\grevepisema=).\\
\end{argtable}

\macroname{\textbackslash GreDivisioMinima}{\#1\#2\#3}{gregoriotex-signs.tex}
Macro to typeset a divisio minima.

Expand Down Expand Up @@ -602,6 +611,9 @@ \section{Gregorio Controls}
\macroname{\textbackslash GreInDivisioMaior}{\#1\#2}{gregoriotex-signs.tex}
Same as \verb=\GreDivisioMaior= except inside a syllable.

\macroname{\textbackslash GreInDivisioMaiorDotted}{\#1\#2}{gregoriotex-signs.tex}
Same as \verb=\GreDivisioMaiorDotted= except inside a syllable.

\macroname{\textbackslash GreInDivisioMinima}{\#1\#2\#3}{gregoriotex-signs.tex}
Same as \verb=\GreDivisioMinima= except inside a syllable.

Expand Down
36 changes: 36 additions & 0 deletions doc/Command_Index_internal.tex
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ \section{Gregorio\TeX{} Controls}
& \texttt{6}--\texttt{13} & Dominican bars\\
& \texttt{14} & virgula on ledger line above the staff\\
& \texttt{15} & minima on ledger line above the staff\\
& \texttt{16} & dotted major\\
\#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 @@ -1601,6 +1602,38 @@ \subsection{Character Reference Aliases}
\macroname{\textbackslash gre@char@he@...}{\#1}{gregoriotex-chars.tex}
A class of macros for the horizontal episema which populates the \verb=\gre@box@hep= box.

\macroname{\textbackslash gre@char@bar@virgula}{}{gregoriotex-main.tex}
Alias that will hold the character for the virgula for the current number of
lines for the staff.

\macroname{\textbackslash gre@char@bar@virgulahigh}{}{gregoriotex-main.tex}
Alias that will hold the character for the high virgula 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.

\macroname{\textbackslash gre@char@bar@divisiominimahigh}{}{gregoriotex-main.tex}
Alias that will hold the character for the high divisio minima for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiominor}{}{gregoriotex-main.tex}
Alias that will hold the character for the divisio minor for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiomaior}{}{gregoriotex-main.tex}
Alias that will hold the character for the divisio maior for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiomaiordotted}{}{gregoriotex-main.tex}
Alias that will hold the character for the dotted divisio maior for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiomaiordottedbacking}{}{gregoriotex-main.tex}
Alias that will hold the character for the dotted divisio maior backing for the
current number of lines for the staff.

\macroname{\textbackslash gre@nabccharno}{\#1\#2\#3}{gregoriotex-nabc.tex}
Prints the nabc glyphs for the given nabc string.

Expand Down Expand Up @@ -1652,6 +1685,9 @@ \subsection{Flags}
\macroname{\textbackslash ifgre@hidealtlines}{}{gregoriotex-signs.tex}
Boolean used to specify whether the staff lines behind an alteration should be hidden.

\macroname{\textbackslash ifgre@hidedottedbarlines}{}{gregoriotex-signs.tex}
Boolean used to specify whether the staff lines behind a dotted bar should be hidden.

\macroname{\textbackslash ifgre@hepisemabridge}{}{gregoriotex-signs.tex}
Boolean used to specify whether adjacent horizontal episemata should be joined together.

Expand Down
58 changes: 36 additions & 22 deletions doc/GregorioRef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,27 @@ local EXCLUDE = {
QuilismaLineTR = true,
VirgaLineBR = true,
SalicusOriscus = true,
['Virgula.2'] = true,
['Virgula.3'] = true,
['Virgula.5'] = true,
['Virgula.6'] = true,
['DivisioMinima.2'] = true,
['DivisioMinima.3'] = true,
['DivisioMinima.5'] = true,
['DivisioMinima.6'] = true,
['DivisioMinor.2'] = true,
['DivisioMinor.3'] = true,
['DivisioMinor.5'] = true,
['DivisioMaior.2'] = true,
['DivisioMaior.3'] = true,
['DivisioMaior.5'] = true,
VirgaBaseLineBL = true,
['VirgulaTwo'] = true,
['VirgulaThree'] = true,
['VirgulaFive'] = true,
['VirgulaSix'] = true,
['DivisioMinimaTwo'] = true,
['DivisioMinimaThree'] = true,
['DivisioMinimaFive'] = true,
['DivisioMinimaSix'] = true,
['DivisioMinorTwo'] = true,
['DivisioMinorThree'] = true,
['DivisioMinorFive'] = true,
['DivisioMaiorTwo'] = true,
['DivisioMaiorThree'] = true,
['DivisioMaiorFive'] = true,
['DivisioMaiorDottedTwo'] = true,
['DivisioMaiorDottedThree'] = true,
['DivisioMaiorDottedFive'] = true,
['DivisioMaiorDottedBackingTwo'] = true,
['DivisioMaiorDottedBackingThree'] = true,
['DivisioMaiorDottedBackingFive'] = true,
}

-- &&& in the following two tables is a placeholder for the cavum shape 'r'
Expand Down Expand Up @@ -177,9 +183,11 @@ local GABC = {
DescendensPunctumInclinatum = [[G&&&0]],
DivisioDominican = [[,3]],
DivisioDominicanAlt = [[,4]],
DivisioMaior = [[:]],
DivisioMinima = [[,]],
DivisioMinor = [[;]],
DivisioMaiorFour = [[:]],
DivisioMaiorDottedFour = [[:?]],
DivisioMaiorDottedBackingFour = [[\excluded{:?}]],
DivisioMinimaFour = [[,]],
DivisioMinorFour = [[;]],
FClefChange = [[f3]],
FClef = [[f3]],
Flat = [[gx]],
Expand Down Expand Up @@ -258,7 +266,7 @@ local GABC = {
VirgaReversa = [[g&&&V]],
VirgaReversaLongqueue = [[h&&&V]],
VirgaReversaOpenqueue = [[a&&&V]],
Virgula = [[^^^^0060]],
VirgulaFour = [[^^^^0060]],
}

local GABC_AMBITUS_ONE = {
Expand Down Expand Up @@ -524,15 +532,21 @@ function GregorioRef.emit_score_glyphs(cs_normal, cs_hollow)
local first = true
local i, name
for i, name in ipairs(glyph_names) do
if not EXCLUDE[name[2]] then
if (name[3] == '' and name[5] == '') or name[3] == '' or only_twos:match(name[3])
or (GABC_AMBITUS_ONE[name[2]] and ambitus_one:match(name[3])) then
local shape = name[2]
local ambitus = name[3]
if shape:match('^Virgula') or shape:match('^Divisio') then
shape = shape..ambitus
ambitus = ''
end
if not EXCLUDE[shape] then
if (ambitus == '' and name[5] == '') or ambitus == '' or only_twos:match(ambitus)
or (GABC_AMBITUS_ONE[shape] and ambitus_one:match(ambitus)) then
if first then
first = false
else
tex.print([[\hline]])
end
emit_score_glyph(name[1], name[2], name[3], name[4], name[5])
emit_score_glyph(name[1], shape, ambitus, name[4], name[5])
end
end
end
Expand Down
Loading