summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf/doc/man/man1/texdoc.162
-rwxr-xr-xMaster/texmf/scripts/texdoc/texdoc.tlu25
2 files changed, 70 insertions, 17 deletions
diff --git a/Master/texmf/doc/man/man1/texdoc.1 b/Master/texmf/doc/man/man1/texdoc.1
index 178db3c9b67..acd1ba06054 100644
--- a/Master/texmf/doc/man/man1/texdoc.1
+++ b/Master/texmf/doc/man/man1/texdoc.1
@@ -1,6 +1,62 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
-.TH TEXDOC.TLU:35: "1" "August 2009" "texdoc.tlu:35: attempt to concatenate local 'svnrev' (a nil value)" "User Commands"
+.TH TEXDOC "1" "October 2009" "texdoc 0.46+" "User Commands"
.SH NAME
-texdoc.tlu:35: \- finding & viewing TeX documentation
+texdoc \- finding & viewing TeX documentation
+.SH SYNOPSIS
+.B texdoc
+[\fIOPTIONS\fR]... [\fINAME\fR]...
.SH DESCRIPTION
-\&../texdoc.tlu:35: attempt to concatenate local 'svnrev' (a nil value)
+texdoc tries to find appropriate TeX documentation for the specified NAME(s).
+With no NAME, it can print configuration information (\fB\-f\fR, \fB\-\-files\fR);
+the usual \fB\-\-help\fR and \fB\-\-version\fR options are also accepted.
+.TP
+\fB\-f\fR, \fB\-\-files\fR
+Print the name of the config files being used.
+.TP
+\fB\-e\fR, \fB\-\-extensions\fR=\fIL\fR
+Require file extensions to be in the list L.
+.TP
+\fB\-w\fR, \fB\-\-view\fR
+Use view mode: start a viewer.
+.TP
+\fB\-m\fR, \fB\-\-mixed\fR
+Use mixed mode (view or list).
+.TP
+\fB\-l\fR, \fB\-\-list\fR
+Use list mode: don't start a viewer.
+.TP
+\fB\-s\fR, \fB\-\-search\fR
+Search for name as a substring.
+.TP
+\fB\-r\fR, \fB\-\-regex\fR
+Search for name as a lua regex.
+.TP
+\fB\-a\fR, \fB\-\-alias\fR
+Use the alias table.
+.TP
+\fB\-A\fR, \fB\-\-noalias\fR
+Don't use the alias table.
+.TP
+\fB\-i\fR, \fB\-\-interact\fR
+Use interactive menus.
+.TP
+\fB\-I\fR, \fB\-\-nointeract\fR
+Use plain lists, no interaction required.
+.TP
+\fB\-v\fR, \fB\-\-verbosity\fR=\fIN\fR
+Set verbosity level to N.
+.TP
+\fB\-d\fR, \fB\-\-debug\fR
+Set verbosity level to maximum.
+.SS "Environment:"
+.IP
+PAGER, BROWSER, PDFVIEWER, PSVIEWER, DVIVIEWER.
+.SS "Files:"
+.IP
+<texmf>/texdoc/texdoc.cnf files, see the \fB\-f\fR option.
+.SS "Homepage:"
+.IP
+http://tug.org/texdoc/
+.SS "Manual:"
+.IP
+displayed by `texdoc texdoc'.
diff --git a/Master/texmf/scripts/texdoc/texdoc.tlu b/Master/texmf/scripts/texdoc/texdoc.tlu
index 7672f3ce8fd..bef7fbbb281 100755
--- a/Master/texmf/scripts/texdoc/texdoc.tlu
+++ b/Master/texmf/scripts/texdoc/texdoc.tlu
@@ -29,7 +29,7 @@ Previous work in the public domain:
-- progname and version
progname = 'texdoc'
-version = '0.45'
+version = '0.46'
if string.sub(version, -1) == '+' then
local svnrev = string.match('$Rev$', '%$Rev:%s*(%d*)%s*%$');
version = version..' svn r'..svnrev
@@ -193,19 +193,16 @@ function populate_docfiles (pattern)
pattern = normalize_pattern(pattern)
rel_docfiles, exact_docfiles = {}, {} -- global
is_dir = {} -- global; is_dir[path] = true iff path is a dir, see scan_lsr
- local curr_dir = lfs.currentdir()
for code, doc_root in ipairs (doc_roots) do
root, shift = lsr_root (doc_root.path)
if root and shift and doc_root.recursion_allowed then
- assert(lfs.chdir(root))
- scan_lsr(code, shift, pattern)
+ scan_lsr(root, code, shift, pattern)
elseif (not doc_root.index_mandatory)
and lfs.isdir(doc_root.path) then
- assert(lfs.chdir(doc_root.path))
- scan_tree(code, '.', pattern, doc_root.recursion_allowed)
+ scan_tree(code, doc_root.path, '',
+ pattern, doc_root.recursion_allowed)
end
end
- assert(lfs.chdir(curr_dir))
exact_docfiles = rmdirs (exact_docfiles)
rel_docfiles = rmdirs (rel_docfiles)
end
@@ -224,12 +221,12 @@ function merge_path (a, b)
end
-- scan a tree without ls-R file
-function scan_tree (code, path, pattern, recurse)
- for file in lfs.dir(path) do
+function scan_tree (code, base, cwd, pattern, recurse)
+ for file in lfs.dir(base..'/'..cwd) do
if file ~= '.' and file ~= '..' then
- local f = (path == '.') and file or path..'/'..file
- if lfs.isdir(f) then
- if recurse then scan_tree(code, f, pattern, recurse) end
+ local f = (cwd == '') and file or cwd..'/'..file
+ if lfs.isdir(base..'/'..f) then
+ if recurse then scan_tree(code, base, f, pattern, recurse) end
else
process_file(file, f, code, pattern, true)
end
@@ -254,11 +251,11 @@ function lsr_root (path)
end
-- scan a ls-R file
-function scan_lsr (code, shift, pattern)
+function scan_lsr (cwd, code, shift, pattern)
local isdoc = false
local current_dir
local l = #shift
- local lsr = assert(io.open('ls-R', 'r'))
+ local lsr = assert(io.open(cwd..'/ls-R', 'r'))
local _ = lsr:read('*line') -- throw away first line (comment)
local maybe_dir = true -- next line may be a directory
while true do