Usage of central documentation system for TeXLive distribution (texdoc)
something is wrong with your installation:
texdoc longtable
is supposed to open the longtable
package and
texdoc
on its own is supposed to echo some usage help that starts out like
$ texdoc
Usage: texdoc [OPTION]... NAME...
or: texdoc ACTION
Try to find appropriate TeX documentation for the specified NAME(s).
Alternatively, perform the given ACTION and exit.
Current settings: --view, --interact (default).
Options:
-w, --view Use view mode: start a viewer. (default)
-m, --mixed Use mixed mode (view or list).
However google suggests that error has been seen before.
This thread ends with a happy ending, perhaps your problem is similar:
http://tug.org/pipermail/texdoc/2011q3/000281.html
I followed David Carlisle's advice and navigated to the link he provided. I am posting my solution as a separate answer to have it "on-site" and not only as a link.
It turns there were a couple of things wrong with my installation of TeX Live:
I hadn't installed the
perl-tk
package on my Unix-based system, which is apparently a good thing to have when you work with a manual TeX Live installation; most importantly it enables the GUI for thetlmgr
or "TeX Live Manager". On Debian-derived systems (all *buntus), this is quickly fixed by runningsudo apt-get install perl-tk
in a terminal.
I still had an old preinstalled version of
luatex
roaming around in my system. This is relevant, sincetexdoc
is a Lua script or uses a Lua script in some way (Lua is a programming language, refer to the link in David Carlisle's answer and read the complete email exchange to read more about this). Since my PATH variable was set up asPATH="...:/usr/bin/:....:/usr/local/texlive/2012/bin/i386-linux"
when I executed
texdoc
my system first found the old version ofluatex
which wasn't finding the necessary files since it lived in another directory than my actual TeX Live installation. This was fixed by two easy steps:- Removing all traces of the old TeX Live distribution preinstalled on my system (by running
sudo apt-get remove texlive-*
on Debian-based systems) - Correcting the PATH environment variable so that my TeX Live installation directory precedes any other directory where there may be TeX-related binaries. This is done by changing either the file
.pam_environment
(for the current user session) or by editing `/etc/environment" with sudo privileges (for all users).
- Removing all traces of the old TeX Live distribution preinstalled on my system (by running
After completing these steps, everything worked as expected: texdoc
tried to find the documentation for the package you tell it to... it just couldn't find anything. This was because I had originally installed the medium
scheme and this included no documentation. A reinstall of TexLive, using the scheme complete
, resolved this issue.
For what it's worth --- and for those who do not have a TeX Live installation --- there is also an online version developed and maintained by frequent contributors to this site. Like texdoc
itself, a very useful resource that should not be overlooked.
The interface is so simple that it needs no explanation, but the basic principle is that the URL http://texdoc.net/pkg/<packagename>
should link you to the package's (main) documentation. Thus,
http://texdoc.net/pkg/geometry
offers me the chance to download the geometry
documentation. (I assume if you have your browser set up with a pdf plug-in, it will just display the PDF.)