# How to search a documentation about an tex-function in command-line way on linux?

How can I search things about some functions in LaTeX on Linux in the command-line?

Tried texdoc, but texdoc cite, for example, don't works.

I would like a tool to search about LaTeX functions in terminal like pydoc if to search about if statement of python.

-
What's packages I need to install to enable \$TEMF enviroment variable? My ubuntu didnt have it. –  GarouDan Oct 16 '11 at 20:28

I guess there’s no way to search all package documentations for a single command. With texdoc you can access only the full package documentation, e.g. texdoc biblatex.

If I need information about a special command and I don’t know in which package it is I try to google it ;-)

If you like more about the latex implematation have a look at source2e (or texdoc source2e)

-

Genrally speaking, you can't. There is not such a document that contains all macros in TeX.

You can, however, search the macro in some books and documents. And there are many books and documents for different levels.

• For user level LaTeX commands and environments, you need a good book, e.g. A Guide to LaTeX. You can find a command in the index. For quick reference, you may have a look at latex2e-help-texinfo, tex-refs and some other electronic documents. Try

texdoc latex2e-help-texinfo

These are not comprehensive documents, but indeed useful.

You can find \cite command in these books/documents, of course.

• For any macros in a LaTeX package, most of the time you must read the package document --- it is the only source to get the information. If you want to know in which package it is, Google is the best way as I know.

For example, you search keywords "LaTeX \citep" in Google and you'll know that \citep is a command provided by natbib package. Then you can read the document of natbib for datails.

• For some special purpose, there may be special documents. Almost all LaTeX symbols can be found in The Comprehensive LaTeX Symbol List (texdoc symbols), for example. Other documents includes: epslatex (only French version in TeX Live), mathmode, tamethebeast (for bibliography), etc.

• You can find all macros in LaTeX2e kernel and standard classes in the documented source of LaTeX2e: source2e and classes documents. But you can't find any macro defined in a package in these documents. Note that documented source code is more suitable for package writers. Before reading them, try other user level documents.

• For Plain TeX and TeX primitives, you may read Knuth's TeXbook. Also TeX for the Impatient (texdoc impatient) and TeX by Topic (texdoc texbytopic) are very convenience.

-
I think the commmunity (us) should start a open-source project trying to document all TeX commands in one place, in a searchable document... –  GarouDan Oct 10 '11 at 21:34