diff options
author | Karl Berry <karl@freefriends.org> | 2017-08-01 21:39:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-08-01 21:39:19 +0000 |
commit | 455c5841ac6087e5addbd8ef224a53aec1dee955 (patch) | |
tree | 8ca5be4eebe3b2acd6b6edafcb0782ff44240558 /Master/texmf-dist/tex | |
parent | 569c59914fed1f743994ef0b27bd15402aa6f603 (diff) |
lua-check-hyphen (1aug17)
git-svn-id: svn://tug.org/texlive/trunk@44936 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.lua | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/lua-check-hyphen/lua-check-hyphen.sty | 6 |
2 files changed, 12 insertions, 8 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 148699382d3..ee8cf4b43ec 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 @@ -1,8 +1,8 @@ --- Copyright 2012-2016 Patrick Gundlach (patrick@gundla.ch) +-- Copyright 2012-2017 Patrick Gundlach (patrick@gundla.ch) -- 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.4 +-- Version: 0.5 -- for debugging purpuse: @@ -129,12 +129,12 @@ luacheckhyphen.check_discs = function (head,parent) elseif head.id == a_disc_node and head.next and head.next.id == a_glue_node and head.next.subtype == subtype_rightskip or head.id == a_disc_node and head.next and head.next.next and head.next.id == a_whatsit_node and head.next.next.id == a_glue_node and head.next.next.subtype == subtype_rightskip then c = node.has_attribute(head,hyphenattr) - word = luacheckhyphen.hyphenwords[c] + word = sln.lower(luacheckhyphen.hyphenwords[c]) if luacheckhyphen.word_whitelist[word] then -- word found, but OK (whitelisted) else if luachekchyphen.compact == nil or luachekchyphen.compact == "true" then - local word_without_hyphen = sln.lower(removedash(word)) + local word_without_hyphen = removedash(word) local tmp = luacheckhyphen.all_hyphenatedwords[word_without_hyphen] or {} tmp[word] = true luacheckhyphen.all_hyphenatedwords[word_without_hyphen] = tmp @@ -220,7 +220,11 @@ luacheckhyphen.enable = function() for i,v in ipairs(string.explode(luacheckhyphen.whitelist,",")) do whitelistfile,err = io.open(v) if not whitelistfile then - texio.write_nl(err) + if err then + texio.write_nl(err) + else + texio.write_nl(string.format("White list %q not found, ignored.",tostring(v))) + end else filecontents = whitelistfile:read("*a") for _,entry in ipairs(explode(filecontents,"[^%s]+")) do 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 d38ebeab8cb..2cad15bb7d2 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 @@ -1,9 +1,9 @@ -% Copyright 2012 Patrick Gundlach (patrick@gundla.ch) +% Copyright 2012–2017 Patrick Gundlach (patrick@gundla.ch) % 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{2016/04/02} -\def\luachekchyphenversion{0.4} +\def\luachekchyphenpkgdate{2017/07/31} +\def\luachekchyphenversion{0.5} \RequirePackage{ifluatex} |