diff options
author | Karl Berry <karl@freefriends.org> | 2018-04-30 22:56:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-04-30 22:56:48 +0000 |
commit | b87cc8c3e732db08ec5267565ee635f7d3718e13 (patch) | |
tree | b864f480bb8fe6e6df27001d70617d81c293322f /Master/texmf-dist/tex/lualatex | |
parent | 4ff1cb0c4febf9e026254486aa2c719ce5262d2a (diff) |
lua-check-hyphen (19apr18)
git-svn-id: svn://tug.org/texlive/trunk@47527 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.lua | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.sty | 5 |
2 files changed, 29 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.lua b/Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.lua index e3ba21a906a..b21a39bcde0 100644 --- a/Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.lua +++ b/Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.lua @@ -2,7 +2,7 @@ -- Public repository: https://github.com/pgundlach/lua-check-hyphen -- Licensed under the MIT license. See the file 'mit-license.txt' for exact terms. --- Version: 0.6 +-- Version: 0.7a -- for debugging purpuse: @@ -167,13 +167,37 @@ local function pairsByKeys (t) return iter end +local function getUhyFilename (tex_jobname) + local unknown_hyphenation_filename = tex_jobname .. ".uhy" + local i = 1 + local FLAG = '-output-directory' + while (arg[i] ~= nil) do + local argument = arg[i] + if (string.sub(argument, 2, 2) == '-' ) then + argument = string.sub(argument, 2) + end + if (string.sub(argument, 1, string.len(FLAG)) == FLAG) then + local prefix = nil + if (string.sub(argument, string.len(FLAG)+1, string.len(FLAG)+1) == '=') then + prefix = string.sub(argument, string.len(FLAG)+2) + else + prefix = arg[i+1] + end + unknown_hyphenation_filename = prefix .. "/" .. unknown_hyphenation_filename + break + end + i = i + 1 + end + return unknown_hyphenation_filename +end + luacheckhyphen.listhyphenatedwords = function() if luacheckhyphen.final == "true" then return end -- don't write if the use has turned that off! if not luacheckhyphen.nofile then - local unknown_hyphenation_filename = tex.jobname .. ".uhy" + local unknown_hyphenation_filename = getUhyFilename(tex.jobname) local unknown_hyphenation_file = io.open(unknown_hyphenation_filename,"w") for k,v in pairsByKeys(luacheckhyphen.all_hyphenatedwords) do if luachekchyphen.compact == "true" or luachekchyphen.compact == nil then diff --git a/Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.sty b/Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.sty index 32cf57603ef..933694871af 100644 --- a/Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.sty +++ b/Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.sty @@ -2,8 +2,9 @@ % Public repository: https://github.com/pgundlach/lua-check-hyphen % Licensed under the MIT license. See the file 'mit-license.txt' for exact terms. -\def\luachekchyphenpkgdate{2018/02/07} -\def\luachekchyphenversion{0.6} +% Don't change these two lines, they are updated automatically +\def\luachekchyphenpkgdate{2018/04/19} +\def\luachekchyphenversion{0.7a} \RequirePackage{ifluatex} |