diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-01-05 19:31:07 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-01-05 19:31:07 +0000 |
commit | 15dac3ed537b65be8dcc04511e63e8c7517e74f5 (patch) | |
tree | 279b20a434999e6ed97bb066679fe156d7e895eb /Master | |
parent | 70a04e55d9bcb2ced6c19414122f5d92123ecbcb (diff) |
New texdoc with easier zip support activation.
git-svn-id: svn://tug.org/texlive/trunk@16604 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf/doc/man/man1/texdoc.1 | 4 | ||||
-rw-r--r-- | Master/texmf/doc/man/man1/texdoc.man1.pdf | bin | 5497 -> 5495 bytes | |||
-rw-r--r-- | Master/texmf/doc/texdoc/texdoc.pdf | bin | 192095 -> 207918 bytes | |||
-rw-r--r-- | Master/texmf/doc/texdoc/texdoc.tex | 41 | ||||
-rw-r--r-- | Master/texmf/scripts/texdoc/config.tlu | 14 | ||||
-rw-r--r-- | Master/texmf/scripts/texdoc/constants.tlu | 18 | ||||
-rw-r--r-- | Master/texmf/scripts/texdoc/functions.tlu | 16 | ||||
-rw-r--r-- | Master/texmf/texdoc/texdoc.cnf | 34 |
8 files changed, 80 insertions, 47 deletions
diff --git a/Master/texmf/doc/man/man1/texdoc.1 b/Master/texmf/doc/man/man1/texdoc.1 index 51c4d740ce4..70313fdbe1d 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" "December 2009" "texdoc 0.61" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. +.TH TEXDOC "1" "January 2010" "texdoc 0.62" "User Commands" .SH NAME texdoc \- find & view documentation in TeX Live .SH SYNOPSIS diff --git a/Master/texmf/doc/man/man1/texdoc.man1.pdf b/Master/texmf/doc/man/man1/texdoc.man1.pdf Binary files differindex 176ea80016b..a9a0c765cc7 100644 --- a/Master/texmf/doc/man/man1/texdoc.man1.pdf +++ b/Master/texmf/doc/man/man1/texdoc.man1.pdf diff --git a/Master/texmf/doc/texdoc/texdoc.pdf b/Master/texmf/doc/texdoc/texdoc.pdf Binary files differindex 815f4bd0b47..59f4e68c18a 100644 --- a/Master/texmf/doc/texdoc/texdoc.pdf +++ b/Master/texmf/doc/texdoc/texdoc.pdf diff --git a/Master/texmf/doc/texdoc/texdoc.tex b/Master/texmf/doc/texdoc/texdoc.tex index 9d4a4677f39..bc6b474a01a 100644 --- a/Master/texmf/doc/texdoc/texdoc.tex +++ b/Master/texmf/doc/texdoc/texdoc.tex @@ -163,7 +163,7 @@ \subtitle{Find \& view documentation in \TeX\ Live} \author{\url{http://tug.org/texdoc/}\\ Manuel Pégourié-Gonnard} -\date{v0.60 2009-11-24} +\date{v0.62 2010-01-05} \begin{document} \VerbatimFootnotes @@ -696,6 +696,41 @@ printed on stdout, except if a internal error occurs (in which case exit code will be 1). In the future, more tab-separated fields may be added at the end of the line, but the first 3 fields will remain unchanged. +\begin{cmdsubsub}{zipext_list}{cf-zipext_list} + zipext_list = «list» +\end{cmdsubsub} + +List of supported extension for zipped files (default: empty). Allows +compressed files with names like ©foobar.«zip»©, with ©«zip»© in the given +©«list»©, to be found and unzipped before the viewer is launched (the +temporary file will be destroyed right after). + +\textbf{Warning.} Support for zipped documentation is not meant to work on +windows, a Unix shell is assumed! If you add anything to this list, please +make sure that you also set a corresponding ©unzip=«ext»© value for each +©«ext»© in the list. Also make sure you are using blocking (i.e. not returning +immediately) viewers. + +\textit{Remark.} \TeX\ Live doesn't ship compressed documentation files, so +this option is mainly useful with re-packaged version of \TeX\ Live that do, +for example in Linux distributions. + +\begin{cmdsubsub}{unzip_*}{cf-unzip_star} + unzip_«zipext» = «command» +\end{cmdsubsub} + +The unzipping command for zipped files with extension ©«zipext»© (default: no +default). Define one for each item in ©zipext_list©. The command must print +the result on stdout, like ©gzip -d -c© does. + +\begin{cmdsubsub}{rm_file, rm_dir}{cf-rm_star} + rm_file = «command» + rm_dir = «command» +\end{cmdsubsub} + +Commands for removing files (resp. directories) on your system (defaults: +©rm -f© and ©rmdir©). Only useful for zipped documents (see ©zipext_list©). + \begin{cmdsubsub}{lastfile_switch}{cf-lastfile_switch} lastfile_switch = «true, false» \end{cmdsubsub} @@ -703,7 +738,7 @@ of the line, but the first 3 fields will remain unchanged. If set to true, prevents \texdoc from reading any other configuration file after this one (they will be reported as ``disabled'' by ©texdoc -f©). Mainly useful for installing a newer version of \texdoc in your home and preventing -the default configuration file from older versions to be used(see the +the default configuration file from older versions to be used (see the \href{http://tug.org/texdoc/}{web site} for instructions on how to do so). \subsection{Exit codes}\label{ss-exit} @@ -715,8 +750,6 @@ The current exit codes are: \item Usage error. \end{enumerate} -\clearpage - \section{Licence}\label{s-licence} The current \texdoc program and its documentation are copyright 2008, 2009 diff --git a/Master/texmf/scripts/texdoc/config.tlu b/Master/texmf/scripts/texdoc/config.tlu index dac13ef49a4..3ff14178f8c 100644 --- a/Master/texmf/scripts/texdoc/config.tlu +++ b/Master/texmf/scripts/texdoc/config.tlu @@ -483,15 +483,11 @@ function setup_config_from_defaults() -- must be set after mode! set_config_elt ('alias_switch', alias_from_mode(config.mode)) -- zip-related options - if C.support_zipped then - set_config_ls { - zipext_list = 'gz, bz2', - unzip_gz = 'gzip -d -c', - unzip_bz2 = 'bzip -d -c', - rm_file = 'rm -f', - rm_dir = 'rmdir' - } - end + set_config_ls { + zipext_list = '', + rm_file = 'rm -f', + rm_dir = 'rmdir', + } end -- the default value of config.alias_switch depends on the mode as follows diff --git a/Master/texmf/scripts/texdoc/constants.tlu b/Master/texmf/scripts/texdoc/constants.tlu index 2cbc99579df..b3c57b7be8c 100644 --- a/Master/texmf/scripts/texdoc/constants.tlu +++ b/Master/texmf/scripts/texdoc/constants.tlu @@ -15,7 +15,7 @@ load_env(L, { -- progname and version fullname = arg[0] progname = 'texdoc' -version = '0.61' +version = '0.62' -- make sure to update setup_config_from_cl() accordingly -- and set a default value in setup_config_from_defaults() if relevant @@ -88,22 +88,6 @@ known_debugs = { place_holder = '%%s' -- used for viewer commands --- zip/gz support --- --- optionally, texdoc can support compressed documentation, but this is --- system-dependant (commands for unzipping, temporary files, etc). --- Since TeX Live doesn't ship compressed documentation, and I'm too lazy to --- make zip support work reliably on all platforms, I don't turn into an --- official option. However, it should work on Unix platforms. --- --- If you enable zip support here, please check the configuration in config.tlu --- (look for support_zipped). The zip command should write the unzipped file to --- STDOUT. Check carefully that everything works as expected, since it got far --- less testing than the rest of texdoc. --- --- See also comments in texdoc.cnf about viewer settings. -support_zipped = false - -- make C a proxy to the local environment assert(next(C) == nil, 'Internal error: table of constants should be empty at this point') diff --git a/Master/texmf/scripts/texdoc/functions.tlu b/Master/texmf/scripts/texdoc/functions.tlu index 4db39c2482f..cff6e2aaeec 100644 --- a/Master/texmf/scripts/texdoc/functions.tlu +++ b/Master/texmf/scripts/texdoc/functions.tlu @@ -78,16 +78,14 @@ end end -- scope of active_debugs --- if zip is support and file is base..'.'..zip with zip in zipext_list, --- return base, zip -- otherwise, returns file, nil +-- if file is base..'.'..zip with zip in zipext_list, return: base, zip +-- otherwise, return: file, nil function parse_zip(file) - if C.support_zipped then - local zip - for _, zip in ipairs(config.zipext_list) do - local l = #zip + 1 - if string.sub(file, -l, -1) == '.'..zip then - return string.sub(file, 1, -l - 1), zip - end + local zip + for _, zip in ipairs(config.zipext_list) do + local l = #zip + 1 + if string.sub(file, -l, -1) == '.'..zip then + return string.sub(file, 1, -l - 1), zip end end return file, nil diff --git a/Master/texmf/texdoc/texdoc.cnf b/Master/texmf/texdoc/texdoc.cnf index cac422d2f4a..655ec8ef843 100644 --- a/Master/texmf/texdoc/texdoc.cnf +++ b/Master/texmf/texdoc/texdoc.cnf @@ -25,25 +25,47 @@ ### Viewer settings ### -# Defaults are directly in texdoc.tlu. Here are some examples. +# Defaults depend on what is available on you system, as well as you desktop +# environement. Here are a few examples. +# # %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: +# If you want to enable support for zipped documentation (see below), +# 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 your command line: (xpdf %s -option) will not work. +# +# WARNING: for zip support your viewer needs to be blocking, i.e. it must not +# return immediately: otherwise the file will be delete too early. + +### Zipped documentation support ### + +# WARNING: support for zipped documents works only on Unix. Make sure that the +# values of the associated options are adapted to your system. Read the above +# warning concerning viewers. + +# Built-in defaults (for reference): +# +# zipext_list = # (empty list) +# rm_file = rm -f +# rm_dir = rmdir +# +# For each "ext" in zipext_list, you must define a "unzip_ext" unzipper. +# The unzipped data must be printed on stdout. Example: +# +# zipext_list = gz +# unzip_gz = gzip -d -c ### Other settings ### -# Here are the defaults settings as they are in texdoc.tlu -# recalled here as example and reference +# Built-in defaults (for reference): # # mode = view # interact_switch = true |