%GregorioTeX file. % % Copyright (C) 2008-2016 The Gregorio Project (see CONTRIBUTORS.md) % % This file is part of Gregorio. % % Gregorio is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or % (at your option) any later version. % % Gregorio is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with Gregorio. If not, see . \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{gregoriosyms} [2016/08/18 v4.1.5 GregorioTeX symbols only.]% PARSE_VERSION_DATE_LTX % If gregoriotex has been loaded, then we need to abort the loading process of this package here in order to avoid some conflicts. \ifcsname gregoriotex@symbols@loaded\endcsname\endinput\fi% \RequirePackage{kvoptions}% \RequirePackage{ifluatex}% \RequirePackage{luatexbase}% \RequirePackage{luaotfload} \RequirePackage{luamplib}% \RequirePackage{xstring}% \newluatexcatcodetable\gre@atletter % \setluatexcatcodetable\gre@atletter{% \catcode`\@=11 % }% % The version of gregorio. All gregoriotex*.tex files must have the same. % All gtex files must also have the same version. \xdef\gre@gregorioversion{4.1.5}% GREGORIO_VERSION - VersionManager.py \providecommand{\gre@declarefileversion}[2]{\relax} \def\gre@error#1{\PackageError{GregorioTeX}{#1}{}}% \def\gre@warning#1{\PackageWarning{GregorioTeX}{#1}}% \def\gre@bug#1{\PackageError{GregorioTeX}{#1 !! This is a bug in Gregorio. Please report it at https://github.com/gregorio-project/gregorio/issues}{}}% \def\gre@typeout{\typeout} \SetupKeyvalOptions{prefix=gre@} \DeclareStringOption{debug}[all] % This option allows the user to transform all deprecation messages % into errors. Allowing one to determine if the TeX file is compliant % with future versions of gregoriotex. To enable, use gregoriotex with % this option: allowdeprecated=false \DeclareBoolOption[true]{allowdeprecated} \ProcessKeyvalOptions* \def\gre@debugmsg#1#2{% \IfStrEq{\gre@debug}{}{}% %false {\IfStrEq{#1}{all}% %true {\gre@error{Debug error: ‘all’ is not a permitted keyword}}% %false {\IfStrEq{\gre@debug}{all}% %true {\gre@typeout{GregorioTeX debug: (#1) #2}}% %false {\IfSubStr{\gre@debug}{#1}% %true {\gre@typeout{GregorioTeX debug: (#1) #2}}% %false {\relax}% }% }% }% }% % Macro to handle deprecated macros. % #1 - the deprecated macro % #2 - the correct macro to use \def\gre@deprecated#1#2{% \ifgre@allowdeprecated% \gre@warning{#1\space is deprecated.\MessageBreak Use #2\space instead}% \else% \gre@error{#1\space is deprecated.\MessageBreak Use #2\space instead}% \fi% \relax% }% \def\gre@obsolete#1#2{% \gre@error{#1\space is obsolete.\MessageBreak Use #2\space instead}% \relax% }% \AtBeginDocument{\IfStrEq{\gre@debug}{}{}{\typeout{GregorioTeX is in debug mode}\typeout{\gre@debug\space messages will be printed to the log.}}}% \long\def\gre@iflatex#1{#1} \input gregoriotex-symbols.tex \xdef\gre@gregoriotexluaversion{\directlua{tex.write(gregoriotex.get_gregorioversion())}}% % Test to make sure that gregoriotex.lua is of the same version. \IfStrEq*{\gre@gregoriotexluaversion}{\gre@gregorioversion}{}{%else \gre@error{uncoherent file versions: gregoriosyms.sty is in version \number\gre@gregorioversion \space\space while gregoriotex.lua is in version \gre@gregoriotexluaversion}}%