diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-06 21:52:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-06 21:52:09 +0000 |
commit | f9a711de58ce886e55f254d2a876714624dcdfb4 (patch) | |
tree | c34c1c9b66fdbd28cad33cc1b62db4d9dce862ce /Master/texmf-dist/tex | |
parent | dde58105c75cd4e37c7c73306951f8ed8eadb473 (diff) |
gregoriotex (25may17)
git-svn-id: svn://tug.org/texlive/trunk@44502 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
15 files changed, 66 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/lualatex/gregoriotex/gregoriosyms.sty b/Master/texmf-dist/tex/lualatex/gregoriotex/gregoriosyms.sty index e36ed7e8c9a..2ecd7d3d0d7 100644 --- a/Master/texmf-dist/tex/lualatex/gregoriotex/gregoriosyms.sty +++ b/Master/texmf-dist/tex/lualatex/gregoriotex/gregoriosyms.sty @@ -19,7 +19,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{gregoriosyms} - [2017/04/16 v5.0.1 GregorioTeX symbols only.]% PARSE_VERSION_DATE_LTX + [2017/05/24 v5.0.2 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% @@ -39,7 +39,7 @@ % The version of gregorio. All gregoriotex*.tex files must have the same. % All gtex files must also have the same version. -\xdef\gre@gregoriotexversion{5.0.1}% GREGORIO_VERSION - VersionManager.py +\xdef\gre@gregoriotexversion{5.0.2}% GREGORIO_VERSION - VersionManager.py \providecommand{\gre@declarefileversion}[2]{\relax} diff --git a/Master/texmf-dist/tex/lualatex/gregoriotex/gregoriotex.sty b/Master/texmf-dist/tex/lualatex/gregoriotex/gregoriotex.sty index 48369c84acf..16542223c48 100644 --- a/Master/texmf-dist/tex/lualatex/gregoriotex/gregoriotex.sty +++ b/Master/texmf-dist/tex/lualatex/gregoriotex/gregoriotex.sty @@ -19,7 +19,7 @@ \NeedsTeXFormat{LaTeX2e}% \ProvidesPackage{gregoriotex}% - [2017/04/16 v5.0.1 GregorioTeX system.]% PARSE_VERSION_DATE_LTX + [2017/05/24 v5.0.2 GregorioTeX system.]% PARSE_VERSION_DATE_LTX % If gregoriosyms has been loaded then there are going to be some conflicts in the definitions made in that package and this one. In order to provide for a more informative error message, we check for that conflict right away \ifcsname gregoriotex@symbols@loaded\endcsname\gre@error{Loading gregoriotex after\MessageBreak gregoriosyms is not supported. Please remove the\MessageBreak loading of gregoriosyms (its contents are loaded\MessageBreak by gregoriotex)}\fi% diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-chars.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-chars.tex index 35563162d76..24f52e401d8 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-chars.tex +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-chars.tex @@ -17,7 +17,7 @@ % You should have received a copy of the GNU General Public License % along with Gregorio. If not, see <http://www.gnu.org/licenses/>. -\gre@declarefileversion{gregoriotex-chars.tex}{5.0.1}% GREGORIO_VERSION +\gre@declarefileversion{gregoriotex-chars.tex}{5.0.2}% GREGORIO_VERSION \def\gre@char@fuse@punctum@one{\GreFuseTwo{\GreCPLeadingPunctumOne}{\GreCPPunctum}}% \def\gre@char@fuse@quilisma@one{\GreFuseTwo{\GreCPLeadingQuilismaOne}{\GreCPPunctum}}% diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-common.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-common.tex index 70760e53d88..e10e347c7d0 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-common.tex +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-common.tex @@ -17,7 +17,7 @@ % You should have received a copy of the GNU General Public License % along with Gregorio. If not, see <http://www.gnu.org/licenses/>. -\gre@declarefileversion{gregoriotex-commonx.tex}{5.0.1}% GREGORIO_VERSION +\gre@declarefileversion{gregoriotex-commonx.tex}{5.0.2}% GREGORIO_VERSION %%%%%%%%% diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-main.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-main.tex index a9e7492452c..543d8fd52e0 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-main.tex +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-main.tex @@ -21,7 +21,7 @@ % The version of gregorio. All gregoriotex*.tex files must have the same. % All gtex files must also have the same version. -\xdef\gre@gregoriotexversion{5.0.1}% GREGORIO_VERSION - VersionManager.py +\xdef\gre@gregoriotexversion{5.0.2}% GREGORIO_VERSION - VersionManager.py \ifluatex% \ifnum\luatexversion<76% diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.lua b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.lua index 108bdc6f185..a296e53f682 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.lua +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.lua @@ -20,7 +20,7 @@ -- this file contains lua functions used by GregorioTeX St. Gall ancient -- neume support when called with LuaTeX. --- GREGORIO_VERSION 5.0.1 +-- GREGORIO_VERSION 5.0.2 local catcode_at_letter = luatexbase.catcodetables['gre@atletter'] diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex index cd1a66f2821..6d0cae8d7d6 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex @@ -19,7 +19,7 @@ % this file contains macros for St. Gall ancient neume support -\gre@declarefileversion{gregoriotex-nabc.tex}{5.0.1}% GREGORIO_VERSION +\gre@declarefileversion{gregoriotex-nabc.tex}{5.0.2}% GREGORIO_VERSION \xdef\gre@nabcfontname{gregall}% diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.lua b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.lua index c0cea8782c4..807d306f279 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.lua +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.lua @@ -19,7 +19,7 @@ -- this file contains lua functions to support signs used by GregorioTeX. --- GREGORIO_VERSION 5.0.1 +-- GREGORIO_VERSION 5.0.2 local err = gregoriotex.module.err local warn = gregoriotex.module.warn diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex index f75dc7af463..cdefa4477e0 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex @@ -22,7 +22,7 @@ \def\grebarbracewidth{.58879}% -\gre@declarefileversion{gregoriotex-signs.tex}{5.0.1}% GREGORIO_VERSION +\gre@declarefileversion{gregoriotex-signs.tex}{5.0.2}% GREGORIO_VERSION \def\gre@usestylecommon{% \gre@trace{gre@usestylecommon}% diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-spaces.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-spaces.tex index 2fdcf1b864a..d9ebdf7b0cc 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-spaces.tex +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-spaces.tex @@ -19,7 +19,7 @@ % this file contains definitions of spaces -\gre@declarefileversion{gregoriotex-spaces.tex}{5.0.1}% GREGORIO_VERSION +\gre@declarefileversion{gregoriotex-spaces.tex}{5.0.2}% GREGORIO_VERSION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% macros for tuning penalties diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-syllable.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-syllable.tex index 22c5dea2e24..72dda80d495 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-syllable.tex +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-syllable.tex @@ -19,7 +19,7 @@ % this file contains definitions of the glyphs and the syllables -\gre@declarefileversion{gregoriotex-syllable.tex}{5.0.1}% GREGORIO_VERSION +\gre@declarefileversion{gregoriotex-syllable.tex}{5.0.2}% GREGORIO_VERSION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% macros for the typesetting of the different glyphs diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.lua b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.lua index 574babd4414..6041cd113d7 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.lua +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.lua @@ -19,7 +19,7 @@ -- this file contains lua functions to support signs used by GregorioTeX. --- GREGORIO_VERSION 5.0.1 +-- GREGORIO_VERSION 5.0.2 local err = gregoriotex.module.err local warn = gregoriotex.module.warn diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.tex index 5112d2b23e6..e7fda265431 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.tex +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.tex @@ -22,7 +22,7 @@ \ifcsname gregoriotex@symbols@loaded\endcsname\endinput\fi% \def\gregoriotex@symbols@loaded{}% -\gre@declarefileversion{gregoriotex-symbols.tex}{5.0.1}% GREGORIO_VERSION +\gre@declarefileversion{gregoriotex-symbols.tex}{5.0.2}% GREGORIO_VERSION \RequireLuaModule{gregoriotex}% diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua index e87bbc553e0..abb26638701 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua @@ -24,13 +24,13 @@ local hpack, traverse, traverse_id, has_attribute, count, remove, insert_after, gregoriotex = gregoriotex or {} local gregoriotex = gregoriotex -local internalversion = '5.0.1' -- GREGORIO_VERSION (comment used by VersionManager.py) +local internalversion = '5.0.2' -- GREGORIO_VERSION (comment used by VersionManager.py) local err, warn, info, log = luatexbase.provides_module({ name = "gregoriotex", - version = '5.0.1', -- GREGORIO_VERSION + version = '5.0.2', -- GREGORIO_VERSION greinternalversion = internalversion, - date = "2017/04/16", -- GREGORIO_DATE_LTX + date = "2017/05/24", -- GREGORIO_DATE_LTX description = "GregorioTeX module.", author = "The Gregorio Project (see CONTRIBUTORS.md)", copyright = "2008-2017 - The Gregorio Project", @@ -84,6 +84,8 @@ local new_score_last_syllables = nil local state_hashes = nil local new_state_hashes = nil local auxname = nil +local tmpname = nil +local test_snippet_filename = nil local snippet_filename = nil local snippet_logname = nil @@ -120,33 +122,53 @@ local translation_mark = 1 local abovelinestext_mark = 2 log("marker whatsit id is %d", marker_whatsit_id) +local function get_prog_output(cmd, fmt) + cmd = string.format(cmd, tmpname) + local rc = os.execute(cmd) + local content = nil + if rc == 0 then + local f = io.open(tmpname, 'r'); + if f then + content = f:read(fmt) + f:close() + end + end + os.remove(tmpname) + return content +end + local function gregorio_exe() if real_gregorio_exe == nil then + local tmp_gabcfile = io.open(test_snippet_filename, 'w') + tmp_gabcfile:write("name:test;\n%%\n(c4)(g)\n") + tmp_gabcfile:close() + local exe_version -- first look for one with the exact version - real_gregorio_exe = 'gregorio-5_0_1' -- FILENAME_VERSION - exe_version = io.popen(real_gregorio_exe..' --version', 'r') - if exe_version then - exe_version = exe_version:read("*line") - end + real_gregorio_exe = 'gregorio-5_0_2' -- FILENAME_VERSION + local cmd = string.format("%s -o %%s %s", real_gregorio_exe, + test_snippet_filename) + exe_version = get_prog_output(cmd, '*line') if not exe_version then -- look for suffix-less executable real_gregorio_exe = 'gregorio' - exe_version = io.popen(real_gregorio_exe..' --version', 'r') - exe_version = exe_version:read("*line") - if not exe_version or string.match(exe_version,"%d+%.%d+%.") - ~= string.match(internalversion,"%d+%.%d+%.") then - real_gregorio_exe = nil - err("Unable to find gregorio executable.\n".. - "shell-escape mode may not be activated. Try\n\n".. - "%s --shell-escape %s.tex\n\n".. - "See the documentation of Gregorio or your TeX\n".. - "distribution to automatize it.", - tex.formatname, tex.jobname) - end + cmd = string.format("%s -o %%s %s", real_gregorio_exe, + test_snippet_filename) + exe_version = get_prog_output(cmd, '*line') + end + if not exe_version or string.match(exe_version,"%d+%.%d+%.") + ~= string.match(internalversion,"%d+%.%d+%.") then + real_gregorio_exe = nil + err("Unable to find gregorio executable.\n".. + "shell-escape mode may not be activated. Try\n\n".. + "%s --shell-escape %s.tex\n\n".. + "See the documentation of Gregorio or your TeX\n".. + "distribution to automatize it.", + tex.formatname, tex.jobname) end + os.remove(test_snippet_filename) log("will use %s", real_gregorio_exe) end @@ -334,10 +356,14 @@ local function init(arg, enable_height_computation) end if outputdir and lfs.isdir(outputdir) then auxname = outputdir..'/'..tex.jobname..'.gaux' + tmpname = outputdir..'/'..tex.jobname..'.gtmp' + test_snippet_filename = outputdir..'/'..tex.jobname..'.test.gsnippet' snippet_filename = outputdir..'/'..tex.jobname..'.gsnippet' snippet_logname = outputdir..'/'..tex.jobname..'.gsniplog' else auxname = tex.jobname..'.gaux' + tmpname = tex.jobname..'.gtmp' + test_snippet_filename = tex.jobname..'.test.gsnippet' snippet_filename = tex.jobname..'.gsnippet' snippet_logname = tex.jobname..'.gsniplog' end @@ -904,18 +930,17 @@ local function direct_gabc(gabc, header, allow_deprecated) gabc = gabc:match('^()%s*$') and '' or gabc:match('^%s*(.*%S)') f:write('name:direct-gabc;\n'..(header or '')..'\n%%\n'..gabc:gsub('\\par ', '\n')) f:close() - local cmd = string.format('%s -W %s-S -l %s %s', gregorio_exe(), deprecated, - snippet_logname, snippet_filename) - local p = io.popen(cmd, 'r') - if p == nil then + local cmd = string.format('%s -W %s-o %%s -l %s %s', gregorio_exe(), + deprecated, snippet_logname, snippet_filename) + local content = get_prog_output(cmd, '*a') + if content == nil then err("\nSomething went wrong when executing\n %s\n" .."shell-escape mode may not be activated. Try\n\n" .."%s --shell-escape %s.tex\n\n" .."See the documentation of Gregorio or your TeX\n" .."distribution to automatize it.", cmd, tex.formatname, tex.jobname) else - tex.print(p:read("*a"):explode('\n')) - p:close() + tex.print(content:explode('\n')) end local glog = io.open(snippet_logname, 'a+') if glog == nil then diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.tex index 43d1cc7b9a0..9da3b585607 100644 --- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.tex +++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.tex @@ -21,7 +21,7 @@ % This file needs to be marked with the version number. For now I've done this with the following comment, but we should check to see if PlainTeX has something similar to the version declaration of LaTeX and use that if it does. -% [2017/04/16 v5.0.1 GregorioTeX system.]% PARSE_VERSION_DATE_LTX +% [2017/05/24 v5.0.2 GregorioTeX system.]% PARSE_VERSION_DATE_LTX \edef\greoldcatcode{\the\catcode`@} |