diff options
author | Karl Berry <karl@freefriends.org> | 2019-06-27 21:00:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-06-27 21:00:23 +0000 |
commit | 144303ebd5af8db374ad8c0dfb144ef433b4f981 (patch) | |
tree | d1c36565681ca51635cc19852986247fbddd76a7 /Master/texmf-dist/doc/latex/songs/songidx | |
parent | dbd07e83962ec5d087fbbd857823d36e0e3dd4d9 (diff) |
songs (27jun19)
git-svn-id: svn://tug.org/texlive/trunk@51494 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/songs/songidx')
6 files changed, 17 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/latex/songs/songidx/bible.can b/Master/texmf-dist/doc/latex/songs/songidx/bible.can index e88b292e8c4..eda272fcd3f 100644 --- a/Master/texmf-dist/doc/latex/songs/songidx/bible.can +++ b/Master/texmf-dist/doc/latex/songs/songidx/bible.can @@ -1,4 +1,4 @@ -# Copyright (C) 2017 Kevin W. Hamlen +# Copyright (C) 2018 Kevin W. Hamlen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/Master/texmf-dist/doc/latex/songs/songidx/catholic.can b/Master/texmf-dist/doc/latex/songs/songidx/catholic.can index d39988b5d3b..0fef3b3c8b0 100644 --- a/Master/texmf-dist/doc/latex/songs/songidx/catholic.can +++ b/Master/texmf-dist/doc/latex/songs/songidx/catholic.can @@ -1,4 +1,4 @@ -# Copyright (C) 2017 Kevin W. Hamlen +# Copyright (C) 2018 Kevin W. Hamlen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/Master/texmf-dist/doc/latex/songs/songidx/greek.can b/Master/texmf-dist/doc/latex/songs/songidx/greek.can index 93b85c4146b..a807cc6b2c9 100644 --- a/Master/texmf-dist/doc/latex/songs/songidx/greek.can +++ b/Master/texmf-dist/doc/latex/songs/songidx/greek.can @@ -1,4 +1,4 @@ -# Copyright (C) 2017 Kevin W. Hamlen +# Copyright (C) 2018 Kevin W. Hamlen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/Master/texmf-dist/doc/latex/songs/songidx/protestant.can b/Master/texmf-dist/doc/latex/songs/songidx/protestant.can index f86cce40e4c..fd7da82bdde 100644 --- a/Master/texmf-dist/doc/latex/songs/songidx/protestant.can +++ b/Master/texmf-dist/doc/latex/songs/songidx/protestant.can @@ -1,4 +1,4 @@ -# Copyright (C) 2017 Kevin W. Hamlen +# Copyright (C) 2018 Kevin W. Hamlen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/Master/texmf-dist/doc/latex/songs/songidx/songidx.lua b/Master/texmf-dist/doc/latex/songs/songidx/songidx.lua index bc50b597c45..6ac12c24116 100644 --- a/Master/texmf-dist/doc/latex/songs/songidx/songidx.lua +++ b/Master/texmf-dist/doc/latex/songs/songidx/songidx.lua @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Kevin W. Hamlen +-- Copyright (C) 2018 Kevin W. Hamlen -- -- This program is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License @@ -19,7 +19,7 @@ -- http://songs.sourceforge.net. -VERSION = "3.0" +VERSION = "3.1" BIBLEDEFAULT = "bible.can" -- fileopen(<filename>) @@ -203,23 +203,23 @@ function setstartchars(songs) end end -prelist = { A=true, THE=true } +wt_prefix = { A=true, THE=true } wt_and = { AND=true } wt_by = { BY=true } wt_unknown = { UNKNOWN=true } -- rotate(<title>) --- If the first word of <title> is any word in prelist, then shift that word +-- If the first word of <title> is any word in wt_prefix, then shift that word -- to the end of the string, preceded by a comma and a space. So for example, --- if prelist contains "The", then rotate("The title") returns "Title, The". --- Words in prelist are matched case-insensitively, and the new first word +-- if wt_prefix contains "The", then rotate("The title") returns "Title, The". +-- Words in wt_prefix are matched case-insensitively, and the new first word -- becomes capitalized. If <title> begins with the marker character '*', -- that character is ignored and left unchanged. function rotate(s) local t = unicode.utf8.upper(s) local n = 0 if s:sub(1,1) == "*" then n = 1 end - for pre in pairs(prelist) do + for pre in pairs(wt_prefix) do if t:sub(1+n,n+#pre) == pre and unicode.utf8.find(t, "^%s+%S", n+#pre+1) then local len = unicode.utf8.len(pre) @@ -402,7 +402,10 @@ function genindex(fs,outname,authorindex) buf:match("^%%p()refix ") or buf:match("^%%ig()nore ") if j then - if not seen[j] then wt[j], seen[j] = {}, true end + if not seen[j] then + for w in pairs(wt[j]) do wt[j][w] = nil end + seen[j] = true + end wt[j][unicode.utf8.upper(buf:sub(buf:find(" ")+1))] = true end else @@ -938,7 +941,7 @@ function main() while arg[i] do if arg[i] == "-v" or arg[i] == "--version" then io.write("songidx ", VERSION, "\n", - "Copyright (C) 2017 Kevin W. Hamlen\n", + "Copyright (C) 2018 Kevin W. Hamlen\n", "License GPLv2: GNU GPL version 2 or later", " <http://gnu.org/licenses/gpl.html>\n", "This is free software: you are free to change and redistribute it.\n", diff --git a/Master/texmf-dist/doc/latex/songs/songidx/tanakh.can b/Master/texmf-dist/doc/latex/songs/songidx/tanakh.can index 4e941a1fe1a..3f67d2076e2 100644 --- a/Master/texmf-dist/doc/latex/songs/songidx/tanakh.can +++ b/Master/texmf-dist/doc/latex/songs/songidx/tanakh.can @@ -1,4 +1,4 @@ -# Copyright (C) 2017 Kevin W. Hamlen +# Copyright (C) 2018 Kevin W. Hamlen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License |