diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2009-10-08 12:57:15 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2009-10-08 12:57:15 +0000 |
commit | 327ceeab8a33a93f5cc7c7a575dc0a7f398c3929 (patch) | |
tree | 4775a4896b10c5bbb4398bd060f81900af308e96 /Master | |
parent | b4ec7b8efbde2a4db34c31c10c77a625c1bc5e11 (diff) |
texdoc 0.47 with support for manpages named .1.pdf and .5.pdf.
git-svn-id: svn://tug.org/texlive/trunk@15682 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf/doc/man/man1/texdoc.1 | 2 | ||||
-rw-r--r-- | Master/texmf/doc/man/man1/texdoc.pdf | bin | 5278 -> 5277 bytes | |||
-rwxr-xr-x | Master/texmf/scripts/texdoc/texdoc.tlu | 51 | ||||
-rw-r--r-- | Master/texmf/texdoc/texdoc.cnf | 4 |
4 files changed, 33 insertions, 24 deletions
diff --git a/Master/texmf/doc/man/man1/texdoc.1 b/Master/texmf/doc/man/man1/texdoc.1 index acd1ba06054..5d86dcc9efa 100644 --- a/Master/texmf/doc/man/man1/texdoc.1 +++ b/Master/texmf/doc/man/man1/texdoc.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. -.TH TEXDOC "1" "October 2009" "texdoc 0.46+" "User Commands" +.TH TEXDOC "1" "October 2009" "texdoc 0.47" "User Commands" .SH NAME texdoc \- finding & viewing TeX documentation .SH SYNOPSIS diff --git a/Master/texmf/doc/man/man1/texdoc.pdf b/Master/texmf/doc/man/man1/texdoc.pdf Binary files differindex dba7312d979..6f4f10b6a70 100644 --- a/Master/texmf/doc/man/man1/texdoc.pdf +++ b/Master/texmf/doc/man/man1/texdoc.pdf diff --git a/Master/texmf/scripts/texdoc/texdoc.tlu b/Master/texmf/scripts/texdoc/texdoc.tlu index bef7fbbb281..e4e88c92782 100755 --- a/Master/texmf/scripts/texdoc/texdoc.tlu +++ b/Master/texmf/scripts/texdoc/texdoc.tlu @@ -29,10 +29,10 @@ Previous work in the public domain: -- progname and version progname = 'texdoc' -version = '0.46' +version = '0.47' if string.sub(version, -1) == '+' then local svnrev = string.match('$Rev$', '%$Rev:%s*(%d*)%s*%$'); - version = version..' svn r'..svnrev + version = svnrev and version..' svn r'..svnrev or version..' git' end -- make sure to update setup_config_from_cl() accordingly @@ -101,7 +101,7 @@ place_holder = '%%s' -- used for viewer commands -- everything works for them (look for support_zipped in the code). -- If you use this feature, please let us know: if nobody uses it, -- we'll drop it at some point. -support_zipped = false +support_zipped = true -------------------------- general-use functions --------------------------- @@ -308,29 +308,37 @@ end ---------------------------- selecting results ----------------------------- --- says if ext is 'good' according to ext_list -function is_good_ext (ext) - for e in list (config.ext_list) do +-- says if file has a 'good' extenstion according to ext_list +function check_ext(file, pattern) + local good_ext, exact_match = false, false + local l, pat = string.len(pattern) + 1, pattern..'.' + for e in list(config.ext_list) do if e == '*' then - return true - elseif (e == '') and (not ext) then - return true - elseif ext == e then - return true + good_ext = true + if string.sub(file, 1, l) == pat then exact_match = true end + elseif (e == '') then + if not string.find(file, '.', 1, true) then good_ext = true end + if file == pattern then exact_match = true end + else + if string.sub(file, -string.len(e)) == e then good_ext = true end + if file == pattern..'.'..e then exact_match = true end end end - return false + return good_ext, exact_match end -- include a file in the *_docfiles lists if it "matches" function process_file (file, pathfile, code, pattern) - local base, ext = string.match(string.lower(file), '^(.*)%.(.*)$') - if string.find(string.lower(pathfile), pattern, 1, no_regex) - and is_good_ext (ext) then - if (base == pattern) or (file == pattern) then - table.insert(exact_docfiles, code_path (code, pathfile)) - else - table.insert(rel_docfiles, code_path (code, pathfile)) + file = string.lower(file) + local base, ext = string.match(file, '^(.*)%.(.*)$') + if string.find(string.lower(pathfile), pattern, 1, no_regex) then + local good_ext, exact_match = check_ext(file, pattern) + if good_ext then + if exact_match then + table.insert(exact_docfiles, code_path (code, pathfile)) + else + table.insert(rel_docfiles, code_path (code, pathfile)) + end end end end @@ -761,7 +769,8 @@ function setup_config_from_defaults() if support_zipped then set_config_elt('ext_list', 'pdf,pdf.gz,pdf.bz2, html,html.gz,html.bz2, txt,txt.gz,txt.bz2,'.. - 'dvi,dvi.gz,dvi.bz2, ps,ps.gz,ps.bz2, ,gz,bz2') + '1.pdf, 5.pdf'.. + 'ps,ps.gz,ps.bz2, dvi,dvi.gz,dvi.bz2, ,gz,bz2') set_config_ls { unzip_gz = 'gzip -d -c ', unzip_bz2 = 'bzip -d -c ', @@ -769,7 +778,7 @@ function setup_config_from_defaults() rm_dir = 'rmdir' } else - set_config_elt('ext_list', 'pdf, html, txt, dvi, ps, ') + set_config_elt('ext_list', 'pdf, html, txt, 1.pdf, 5.pdf, ps, dvi, ') end end diff --git a/Master/texmf/texdoc/texdoc.cnf b/Master/texmf/texdoc/texdoc.cnf index a713f516e80..b54c727d41f 100644 --- a/Master/texmf/texdoc/texdoc.cnf +++ b/Master/texmf/texdoc/texdoc.cnf @@ -47,8 +47,8 @@ # # mode = view # interact_switch = true -# alias_switch = true # but false if mode is 'regex' -# ext_list = pdf, html, txt, ps , # note the empty string at end +# alias_switch = true # but false if mode is 'regex' +# ext_list = pdf, html, txt, 1.pdf, 5.pdf, ps, dvi, # empty string at end # verbosity_level = 3 ### Aliases ### |