summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-07-04 10:31:49 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-07-04 10:31:49 +0000
commit59f13ca2dd619ba2bd21fa31a4d96122083cf7c5 (patch)
treec320fe0b65b8ab95b5a963fffc8350d3797bfed1 /Master/texmf
parent4be0d4241d5381827769af8cbc85905902ae672f (diff)
Texdoc 0.43 with zipped doc support available.
git-svn-id: svn://tug.org/texlive/trunk@14095 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rw-r--r--Master/texmf/doc/man/man1/texdoc.12
-rw-r--r--Master/texmf/doc/man/man1/texdoc.pdfbin5275 -> 5288 bytes
-rw-r--r--Master/texmf/doc/texdoc/texdoc.pdfbin189970 -> 254450 bytes
-rw-r--r--Master/texmf/doc/texdoc/texdoc.tex11
-rwxr-xr-xMaster/texmf/scripts/texdoc/texdoc.tlu150
-rw-r--r--Master/texmf/texdoc/texdoc.cnf49
6 files changed, 121 insertions, 91 deletions
diff --git a/Master/texmf/doc/man/man1/texdoc.1 b/Master/texmf/doc/man/man1/texdoc.1
index 96ab325f496..d683fa13835 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" "April 2009" "texdoc 0.42" "User Commands"
+.TH TEXDOC "1" "July 2009" "texdoc 0.43+ svn r61" "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
index 996ff813ef8..666189cd985 100644
--- a/Master/texmf/doc/man/man1/texdoc.pdf
+++ b/Master/texmf/doc/man/man1/texdoc.pdf
Binary files differ
diff --git a/Master/texmf/doc/texdoc/texdoc.pdf b/Master/texmf/doc/texdoc/texdoc.pdf
index 60543cbda06..e81b4e41ef1 100644
--- a/Master/texmf/doc/texdoc/texdoc.pdf
+++ b/Master/texmf/doc/texdoc/texdoc.pdf
Binary files differ
diff --git a/Master/texmf/doc/texdoc/texdoc.tex b/Master/texmf/doc/texdoc/texdoc.tex
index ed521cf88ba..011294ef9b2 100644
--- a/Master/texmf/doc/texdoc/texdoc.tex
+++ b/Master/texmf/doc/texdoc/texdoc.tex
@@ -158,7 +158,7 @@
}
\author{\url{http://tug.org/texdoc/}\\
Manuel Pégourié-Gonnard}
-\date{v0.42---2009/04/09}
+\date{v0.43}
\begin{document}
\VerbatimFootnotes
@@ -712,11 +712,10 @@ moreover we won't ship compressed documentation in \texlive. However, the
code has not been totally removed and should be easy to activate again. If you
want to use this feature, please:
\begin{enumerate}
- \item Look in \texdoc's code for instructions.
- \item Be aware that the corresponding part of the code has not been well
- tested, and that you are responsible of the unzipping command anyway.
- \item Inform us either at the usual address or \mailto{tldistro@tug.org} if
- you are a Linux, BSD, or whatever, distributor.
+ \item Look in \texdoc's code for instructions (look for the ©support_zipped©
+ variable and change it to true).
+ \item Check that the zip commands in texdoc's default match whatever command
+ is available on your system.
\end{enumerate}
Finally, \texdoc is also missing a GUI version (texdoctk has never been the
diff --git a/Master/texmf/scripts/texdoc/texdoc.tlu b/Master/texmf/scripts/texdoc/texdoc.tlu
index 2f5969af8ed..f0252dbf40f 100755
--- a/Master/texmf/scripts/texdoc/texdoc.tlu
+++ b/Master/texmf/scripts/texdoc/texdoc.tlu
@@ -29,9 +29,9 @@ Previous work in the public domain:
-- progname and version
progname = 'texdoc'
-version = '0.42'
+version = '0.43'
if string.sub(version, -1) == '+' then
- local svnrev = string.match('$Rev: 44 $', '%$Rev:%s*(%d*)%s*%$');
+ local svnrev = string.match('$Rev: 61 $', '%$Rev:%s*(%d*)%s*%$');
version = version..' svn r'..svnrev
end
@@ -74,6 +74,10 @@ known_options = {
'ext_list',
'verbosity_level',
'lastfile_switch',
+ 'rm_dir',
+ 'rm_file',
+ 'unzip_bz2',
+ 'unzip_gz',
}
err_priority = {
@@ -137,36 +141,76 @@ end
------------------ exploring trees (kpse-style functions) ------------------
-- global variables:
--- texdocs: a Lua table version of $TEXDOCS
--- do_recurse: do_recurse[i] = 1 iff texdocs[i] ends with // in $TEXDOCS
--- must_have_lsr: must_have_lsr[i] = 1 iff texdocs[i] starts with !! in $TEXDOCS
-- exact_docfiles: list of "exact matches"
-- rel_docfiles: list of "non-exact matches"
--- set texdocs, do_recurse and must_have_lsr lists from kpse's $TEXDOCS
+do -- begin scope of doc_roots, a lua version of kpse's TEXDOCS
+local doc_roots
+
+-- structure of the doc_roots variable:
+-- doc_roots[i] = {
+-- path = <path>,
+-- index_mandatory = <does path begin with !! in TEXDOCS?>
+-- recursion_allowed = <does path ends with // in TEXDOCS?>,
+-- }
+
+-- set the doc_roots list from kpse's $TEXDOCS
function get_texdocs ()
+ doc_roots = {}
local sep = (os.type == 'windows') and ';' or ':'
- texdocs = kpse.expand_var ("$TEXDOCS")
+ local kpse_texdocs = kpse.expand_var("$TEXDOCS")
-- expand the path and turn it into a lua list
- texdocs = string.explode (kpse.expand_braces (texdocs), sep)
- do_recurse, must_have_lsr = {}, {} -- global
+ local raw_doc_roots = string.explode(kpse.expand_braces(kpse_texdocs), sep)
err_print('Search paths:', 'debug3')
- for i, dir in ipairs (texdocs) do
+ for i, dir in ipairs(raw_doc_roots) do
+ doc_roots[i] = {}
local n
dir, n = string.gsub (dir, '//$', '')
- do_recurse[i] = (n == 1)
- texdocs[i], n = string.gsub (dir, '^!!', '')
- must_have_lsr[i] = (n == 1)
- err_print(string.format('%s (do_recurse=%s, must_have_lsr=%s)',
- texdocs[i],
- do_recurse[i] and 'true' or 'false',
- must_have_lsr[i] and 'true' or 'false'), 'debug3')
+ doc_roots[i].recursion_allowed = (n == 1)
+ doc_roots[i].path, n = string.gsub (dir, '^!!', '')
+ doc_roots[i].index_mandatory = (n == 1)
+ err_print(string.format('%s (index_mandatory=%s, recursion_allowed=%s)',
+ doc_roots[i].path,
+ doc_roots[i].index_mandatory and 'true' or 'false',
+ doc_roots[i].recursion_allowed and 'true' or 'false'),
+ 'debug3')
end
end
--- once get_texdocs() is done, roots are represented by their index in texdocs
--- usefull to avoid fake matches and also for the sort routine
--- the next two functions do the conversions
+-- once get_texdocs() is done, roots are represented by their index in doc_roots
+-- this is usefull to avoid fake matches and also for the sort routine
+-- conversions are done by real_path() below and code_path() later
+
+-- decode a path as given in *_docfiles into a real path
+function real_path(fake)
+ local code, file = string.match(fake, '^(.-):(.*)$')
+ code = tonumber(code)
+ return win32_hook(doc_roots[code].path..'/'..file)
+end
+
+-- find docfiles "matching" pattern
+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)
+ 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)
+ end
+ end
+ assert(lfs.chdir(curr_dir))
+ exact_docfiles = rmdirs (exact_docfiles)
+ rel_docfiles = rmdirs (rel_docfiles)
+end
+
+end -- scope of doc_roots
-- encode the base path on two digits and concatenate with filename
function code_path (code, file)
@@ -174,13 +218,6 @@ function code_path (code, file)
return padding..code..':'..file
end
--- decode a path as given in *_docfiles into a real path
-function real_path (fake)
- local code, file = string.match (fake, '^(.-):(.*)$')
- code = tonumber (code)
- return win32_hook (texdocs[code]..'/'..file)
-end
-
-- merge two components of a path, taking care of empty components
function merge_path (a, b)
return ((a == '') or (b == '')) and a..b or a..'/'..b
@@ -254,28 +291,6 @@ function rmdirs (files)
return res
end
--- find docfiles "matching" pattern
-function populate_docfiles (pattern)
- pattern = normalize_pattern(pattern)
- if not texdocs then get_texdocs() end
- 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, docdir in ipairs (texdocs) do
- root, shift = lsr_root (docdir)
- if root and shift and do_recurse[code] then
- assert(lfs.chdir(root))
- scan_lsr(code, shift, pattern)
- elseif (not must_have_lsr[code]) and lfs.isdir(docdir) then
- assert(lfs.chdir(docdir))
- scan_tree(code, '.', pattern, do_recurse[code])
- end
- end
- assert(lfs.chdir(curr_dir))
- exact_docfiles = rmdirs (exact_docfiles)
- rel_docfiles = rmdirs (rel_docfiles)
-end
-
-- like populate_docfiles, but rel replaces exact if exact is empty
function mixed_populate_docfiles (pattern)
populate_docfiles (pattern)
@@ -405,7 +420,7 @@ end
-- a helper function for warning messages in the above
function config_warn (key, value, context)
local begin = value and 'Illegal value "'..value..'" for option "'..key..'"'
- or 'Unkown option "'..key..'"'
+ or 'Unknown option "'..key..'"'
local ending = '. Skipping.'
err_print (begin..'\n '..context_to_string(context)..ending, 'warning')
end
@@ -744,18 +759,19 @@ end
--------------------------------- viewing ----------------------------------
--- prepare for viewing: set viewer_replacement and viewer_ext
--- may uncompress if support_zipped is set (giving the complete filename on the
--- command line is unsupported for compressed files by the way)
+-- prepare for viewing: returns <viewer command> and <viewer replacement>
+-- <viewer replacement> is either:
+-- 1. the filename, quoted with "
+-- 2. the filename, quoted with " followed by some rm commands
+-- The second case happens when the doc was zipped. In the case, this function
+-- unzips it in a tempdir so that the viewer command can use the unzipped file.
function how_to_view (filename)
filename = real_path(filename) -- TODO: if not filename then ...
if support_zipped then
- ext = string.match(filename,'.*%.(.*)$')
- zipext = string.match(ext,'^.*%.(.*)')
- if zipext then
+ viewext,zipext = string.match(filename, '.*%.([^.]*)%.([^.]*)$')
+ if viewext and zipext then
unzip_command = config['unzip_'..zipext]
- viewext = string.match(ext,'^(.*)%..*$')
- basename_pattern = '.*/(.*%.' .. viewext .. ')'
+ local basename_pattern = '.*/(.*%.' .. viewext .. ')'
basename = string.match(filename,basename_pattern)
tmpdir = os.tmpdir("/tmp/texdoc.XXXXXX")
unzip_commandline = unzip_command .. filename .. " > "
@@ -765,11 +781,14 @@ function how_to_view (filename)
else
print("Error executing \n" .. unzip_commandline)
end
- viewer_replacement = filename .. ';' .. config.rm_file
- .. filename .. ';' .. config.rm_dir .. tmpdir
+ viewer_replacement = '"' .. filename .. '"; '
+ .. config.rm_file .. ' ' .. filename .. '; '
+ .. config.rm_dir .. ' ' .. tmpdir
end
- else
- viewer_replacement = filename
+ end
+ -- if viewext wasn't set zipped way, then try the normal way
+ if not viewext then
+ viewer_replacement = '"' .. filename .. '"'
-- files without extension are assumed to be text
viewext = string.match(filename,'.*%.(.*)$') or 'txt'
if not config['viewer_'..viewext] then
@@ -793,9 +812,9 @@ function try_viewing (view_command, viewer_replacement)
else
if string.match (view_command, place_holder) then
view_command = string.gsub(
- view_command, place_holder, '"'..viewer_replacement..'"')
+ view_command, place_holder, viewer_replacement)
else
- view_command = view_command..' "'..viewer_replacement..'"'
+ view_command = view_command..' '..viewer_replacement
end
err_print(view_command, 'debug1')
view_result = os.execute(view_command)
@@ -905,8 +924,9 @@ setup_config_from_env ()
setup_config_from_files ()
setup_config_from_defaults ()
--- now that verbosity_level is known...
+-- now that config.verbosity_level is known...
show_config_files(function(s) err_print(s, 'debug1') end)
+get_texdocs()
------------------------ looping over the arguments ------------------------
diff --git a/Master/texmf/texdoc/texdoc.cnf b/Master/texmf/texdoc/texdoc.cnf
index 87815e8cfc7..ffdcbcf9f41 100644
--- a/Master/texmf/texdoc/texdoc.cnf
+++ b/Master/texmf/texdoc/texdoc.cnf
@@ -1,11 +1,14 @@
# texdoc.cnf
#
-# Do not edit this file! Use one of the following files for you settings:
-# TEXMFHOME/texdoc/texdoc-<arch>.cnf
-# TEXMFHOME/texdoc/texdoc.cnf
-# TEXMFLOCAL/texdoc/texdoc-<arch>.cnf
-# TEXMFLOCAL/texdoc/texdoc.cnf
-# where <arch> stands for your achitecture (eg, win32, i386-linux,
+# DO NOT edit this file!
+#
+# For your personal or local setting, use one of the following files:
+# (the star points to the recommended file for a user's personal settings)
+# TEXMFHOME/texdoc/texdoc-<arch>.cnf
+# (*) TEXMFHOME/texdoc/texdoc.cnf
+# TEXMFLOCAL/texdoc/texdoc-<arch>.cnf
+# TEXMFLOCAL/texdoc/texdoc.cnf
+# where <arch> stands for your architecture (eg, win32, i386-linux,
# powerpc-darwin). You can get this list with variables expanded by typing
# texdoc -f
# Those are read by texdoc in this order, and former values
@@ -23,11 +26,20 @@
### Viewer settings ###
# Defaults are directly in texdoc.tlu. Here are some examples.
-# %s stands for the filename.
+# %s is optional and stands for the filename.
#
# viewer_pdf = xpdf # works
# viewer_pdf = xpdf %s & # works even better
+# If you want to enable support for zipped documentation (see comments in
+# texdoc.tlu), you may want to adapt viewer_* so that it starts a subshell:
+#
+# viewer_pdf = (xpdf %s )&
+#
+# Otherwise, the & will have no effect since the viewing command is followed by
+# some cleanup-commands for temporary files. For the same reason, %s must be the
+# last thing on you command line: (xpdf %s -option) will not work.
+
### Other settings ###
# Here are the defaults settings as they are in texdoc.tlu
@@ -66,7 +78,6 @@ alias lshort-fr = flshort-3.20 # french
alias lshort-de = l2kurz # german
alias lshort-it = itlshort # italian
alias lshort-ja = jlshort # japanese
-alias lshort-mn = bogino.pdf # mongolian
alias lshort-pl = polish/lshort2e # polish
alias lshort-pt = ptlshort # portuguese
alias lshort-ru = lshortru # russian
@@ -135,6 +146,14 @@ alias tugboat-plain = tubguide
alias ltugboat = ltubguid
alias ltugproc = ltubguid
+# easy* bundle
+alias easyeqn = easy/doceqn
+alias easymat = easy/docmat
+alias easybmat = easy/docbmat
+alias easyvector = easy/docvector
+alias easybib = easy/docbib
+alias easytable = easy/doctable
+
# misc
alias fontinst = fontinstallationguide
alias psfrag = pfgguide
@@ -147,9 +166,10 @@ alias pstricks = pstricks-doc
alias extramarks = fancyhdr/fancyhdr
alias fonttable = fonttable/fonttable
alias biocon = biocon/manual.
-alias makeindex = base/makeindex
+alias makeindex = makeindex/makeindex
alias makeidx = makeindx
alias ltablex = ltablex.sty
+alias comment = comment.sty
## a few easy patterns
@@ -257,7 +277,6 @@ alias xyling = xyli-doc
alias texguide = usrguide
alias lehman = fontinstallationguide
alias uktugfaq = newfaq
-alias ttf = ttf-tetex
alias datenumber = datenumber/doc.
alias datenumber-de = datenumber/docgerman
alias index = ind
@@ -280,8 +299,7 @@ alias mfpic1 = mfpguide
alias dutch = rapdoc
alias montex = mlsquick
alias MeX = base/mex.html
-alias gentlpl = gentl-pl
-alias lshortpl = lshort-polish/lshort2e
+# alias gentlpl = gentl-pl # temporarily rm'ed from TL (sources needed)
alias akademia = tex-virtual-academy-pl/index.html
alias cyrillic = cyrillic/00readme.txt
alias otibet = otibet/unidoc
@@ -300,7 +318,6 @@ alias pgf = pgfmanual
alias tikz = pgfmanual
alias treetex = tree_doc
alias PSfrag = pfgguide
-alias rst = rst-package
alias xypic1 = xyguide
alias xypic2 = xyrefer
alias pbdiagram = pb-manual
@@ -310,22 +327,16 @@ alias prosper1 = prosper-tour
alias beamer = beameruserguide
alias ifmslide = ifmman
alias arydshln = arydshln-man
-alias easytable = easy/doc.dvi/doctable
alias multirow = multirow/README
alias titletoc = titlesec
alias custom-bib = custom-bib/makebst
alias ascelike = ascexmpl
-alias easybib = easy/doc.dvi/docbib
alias natbib2 = natnotes
alias adrconv = adrguide
alias AMSlatex = amsldoc
alias amslatex2 = technote
-alias easyvector = easy/doc.dvi/docvector
alias tangles = t-angles/t-manual
alias mathenv = mdwtab
-alias easyeqn = easy/doc.dvi/doceqn
-alias easymat = easy/doc.dvi/docmat
-alias easybmat = easy/doc.dvi/docbmat
alias nath = nathguide
alias gauss = gauss-doc
alias gnlogic = gn-logic14