summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex')
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex36
1 files changed, 27 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex
index 6c4934b9ef4..cd1a66f2821 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex
@@ -1,6 +1,6 @@
%GregorioTeX file.
%
-% Copyright (C) 2014-2015 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2014-2017 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -19,8 +19,7 @@
% this file contains macros for St. Gall ancient neume support
-\gre@debugmsg{general}{Loading gregoriotex-nabc.tex}%
-\gre@declarefileversion{gregoriotex-nabc.tex}{4.1.5}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-nabc.tex}{5.0.1}% GREGORIO_VERSION
\xdef\gre@nabcfontname{gregall}%
@@ -37,21 +36,40 @@
\gre@nabcfontloadedtrue%
}
-\def\grenabccharno#1#2#3{{\directlua{
- gregoriotex.print_nabc(gregoriotex.parse_nabc("#1", "\luatexluaescapestring{#2}", #3))
-}}}
+\def\gre@nabccharno#1#2#3{%
+ \gre@trace{gre@nabccharno{#1}{#2}{#3}}%
+ {\directlua{gregoriotex.print_nabc(gregoriotex.parse_nabc("#1", "\luatexluaescapestring{#2}", #3))}}%
+ \gre@trace@end%
+}
\def\GreNABCChar#1{{%
%\catcode`\~=12{}%
%\catcode`\@=11{}%
\gre@font@nabc %
\gre@style@nabc %
- \grenabccharno{#1}{\gre@nabcfontname}{1}%
+ \gre@nabccharno{#1}{\gre@nabcfontname}{1}%
\endgre@style@nabc%
}}
-\def\GreNABCNeumes#1#2{%
- \GreSetTextAboveLines{\GreNABCChar{#2}}%
+\newif\ifgre@nabcvoice@i@visible
+\gre@nabcvoice@i@visibletrue
+% define more of these when more voices are supported
+
+\def\gresetnabc#1#2{%
+ \IfStrEqCase{#2}{%
+ {visible}%
+ {\csname gre@nabcvoice@\romannumeral#1@visibletrue\endcsname}%
+ {invisible}%
+ {\csname gre@nabcvoice@\romannumeral#1@visiblefalse\endcsname}%
+ }[% all other cases
+ \gre@error{Unrecognized option "#2" for \protect\gresetnabc\MessageBreak Possible options are: 'visible' and 'invisible'}%
+ ]%
+}
+
+\def\GreNABCNeumes#1#2#3#4{%
+ \csname ifgre@nabcvoice@\romannumeral#1@visible\endcsname %
+ \GreSetNabcAboveLines{\GreNABCChar{#2}}%
+ \fi %
}
\newif\ifgre@nabcfontloaded%