| 1 |
%GregorioTeX file. |
| 2 |
% |
| 3 |
% Copyright (C) 2008-2025 The Gregorio Project (see CONTRIBUTORS.md) |
| 4 |
% |
| 5 |
% This file is part of Gregorio. |
| 6 |
% |
| 7 |
% Gregorio is free software: you can redistribute it and/or modify |
| 8 |
% it under the terms of the GNU General Public License as published by |
| 9 |
% the Free Software Foundation, either version 3 of the License, or |
| 10 |
% (at your option) any later version. |
| 11 |
% |
| 12 |
% Gregorio is distributed in the hope that it will be useful, |
| 13 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
% GNU General Public License for more details. |
| 16 |
% |
| 17 |
% You should have received a copy of the GNU General Public License |
| 18 |
% along with Gregorio. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
\NeedsTeXFormat{LaTeX2e} |
| 21 |
\ProvidesPackage{gregoriosyms} |
| 22 |
[2025/02/28 v6.1.0 GregorioTeX symbols only.]% PARSE_VERSION_DATE_LTX |
| 23 |
|
| 24 |
\RequirePackage{iftex}% |
| 25 |
\RequireLuaTeX |
| 26 |
|
| 27 |
% If gregoriotex has been loaded, then we need to abort the loading process of this package here in order to avoid some conflicts. |
| 28 |
\ifcsname gregoriotex@symbols@loaded\endcsname\endinput\fi% |
| 29 |
|
| 30 |
\RequirePackage{kvoptions}% |
| 31 |
\RequirePackage{luatexbase}% |
| 32 |
\RequirePackage{luaotfload} |
| 33 |
\RequirePackage{luamplib}% |
| 34 |
\RequirePackage{xstring}% |
| 35 |
\RequirePackage{xcolor}% |
| 36 |
|
| 37 |
\newluatexcatcodetable\gre@atletter % |
| 38 |
\setluatexcatcodetable\gre@atletter{% |
| 39 |
\catcode`\@=11 % |
| 40 |
}% |
| 41 |
|
| 42 |
% The version of gregorio. All gregoriotex*.tex files must have the same. |
| 43 |
% All gtex files must also have the same version. |
| 44 |
\xdef\gre@gregoriotexversion{6.1.0}% GREGORIO_VERSION - VersionManager.py |
| 45 |
|
| 46 |
\providecommand{\gre@declarefileversion}[2]{\relax} |
| 47 |
|
| 48 |
\def\gre@error#1{\PackageError{GregorioTeX}{#1}{}}% |
| 49 |
\def\gre@warning#1{\PackageWarning{GregorioTeX}{#1}}% |
| 50 |
\def\gre@bug#1{\PackageError{GregorioTeX}{#1 !! This is a bug in Gregorio. Please report it at https://github.com/gregorio-project/gregorio/issues}{}}% |
| 51 |
\def\gre@typeout{\typeout} |
| 52 |
|
| 53 |
\SetupKeyvalOptions{prefix=gre@} |
| 54 |
\DeclareStringOption{debug}[all] |
| 55 |
|
| 56 |
% This option allows the user to transform all deprecation messages |
| 57 |
% into errors. Allowing one to determine if the TeX file is compliant |
| 58 |
% with future versions of gregoriotex. To enable, use gregoriotex with |
| 59 |
% this option: allowdeprecated=false |
| 60 |
\DeclareBoolOption[true]{allowdeprecated} |
| 61 |
|
| 62 |
\ProcessKeyvalOptions* |
| 63 |
|
| 64 |
\input gregoriotex-common.tex |
| 65 |
|
| 66 |
|
| 67 |
\long\def\gre@iflatex#1{#1} |
| 68 |
\long\def\gre@ifnotlatex#1{} |
| 69 |
\input gregoriotex-symbols.tex |
| 70 |
|
| 71 |
\xdef\gre@gregoriotexluaversion{\directlua{tex.write(gregoriotex.get_gregoriotexluaversion())}}% |
| 72 |
|
| 73 |
% Test to make sure that gregoriotex.lua is of the same version. |
| 74 |
\IfStrEq*{\gre@gregoriotexluaversion}{\gre@gregoriotexversion}{}{%else |
| 75 |
\gre@error{uncoherent file versions: gregoriosyms.sty is in version \number\gre@gregoriotexversion \space\space while gregoriotex.lua is in version \gre@gregoriotexluaversion}}% |
| 76 |
|
| 77 |
%%%%%%%%% |
| 78 |
%% Color definitions |
| 79 |
%%%%%%%%% |
| 80 |
|
| 81 |
\definecolor{grebackgroundcolor}{RGB}{255,255,255}% |
| 82 |
\definecolor{gregoriocolor}{RGB}{229,53,44}% |