Say I want to open the PdfTeX manual in PDF-format for reading on my screen. Or maybe get information about nicefrac. I don't want to locate xxx in the terminal ... What is the quickest way to open the pdf-manual for a given tex function or program?

  • 2
    texdoc nicefrac? If you know the name of the package, it will be a successful try to use texdoc packagename in about 99 % of all cases. – user31729 Sep 25 '15 at 17:24
  • Oh, and by the way. The thing you want to know about nicefrac is that you want to use xfrac instead – MaxNoe Sep 25 '15 at 21:42

I mostly use texdoc <package name>, but if this fail, my second option is go to https://www.ctan.org/pkg/<package name>, for example https://www.ctan.org/pkg/nicefrac, and then go to the "Documentation" item.

Sometimes texdoc fails to find some related results even if the package exists (e.g. texdoc outliner), so this method can be safer than texdoc, mainly if you are unsure of exactly what you are looking for.

Sometimes there are more than one useful PDF (or plain text file) with the documentation for a package (for example, the package documentation and some examples of use for human beings, or several manual translations) but texdoc by default show only one. To list all search hits use texdoc -l <package name>. See also man texdoc.

On the other hand, https://www.ctan.org/pkg and https://www.ctan.org/topics/cloud are two useful pages if you are just "fishing" information, but you do not have a keyword to begin your search.

| improve this answer | |
  • texdoc is not limited to PDFs! – cfr Sep 25 '15 at 21:01
  • @cfr I know, I know ...some times the doc is just plain text. I often use texdoc xxx.sty to investigate macro definitions, but the idea is that just "texdocing" could pass unnoticed some information of you hard disk or CTAN. – Fran Sep 25 '15 at 21:11
  • But your answer implies that texdoc is unsafe because there might be a README rather than PDF. But it will open the README if so. Also, if I say texdoc flowfram, the first sentence of the PDF which opens is This is the documented source code for the flowfram package. For a user manual, see ffuserguide.pdf (or do texdoc ffuserguide). This includes a direct link to the user guide. So the user really does not need to guess in this case at all.... (But I think it would make a whole lot more sense to have the user guide open by default with a link to the other one.) – cfr Sep 25 '15 at 22:16
  • @cfr Upss, really was not a good example, I missed that sentence. :) What about texdoc outliner ? This do not open the nonexistent PDF, nor outliner.sty, nor outline_test.tex that is in your hard disk. Then, you must search locally with locate or online with CTAN, as the own texdoc suggest when it fails. – Fran Sep 26 '15 at 0:56

If you prefer to use a web browser (as opposed to the command line), visit http://texdoc.net and type in the search box.

| improve this answer | |

If you have TexLive, you have texdoc:

Open a terminal and type: texdoc <search string>

Where <search string> can be a package or class name or something else.

The default behaviour is something like google's "I'm feeling lucky", it opens the best fit in your default pdf viewer. You can also list all hits with texdoc -l <search string>

| improve this answer | |
  • In fact I wrote the answer before the comment and as the question mentioned terminal, I assumed program name and posix patter would be sufficient – MaxNoe Sep 25 '15 at 21:28
  • Alt+F2 et al. are often faster than opening a terminal, if you have a system that has such. – Raphael Sep 28 '15 at 21:58
  • @Raphael Why would you have to open a terminal? What a strange idea! ;) What is that combination meant to do, anyway? – cfr Sep 28 '15 at 22:23
  • @cfr I don't know, that's what MaxNoe said! To the point: on many GNU/Linux desktop environments, Alt+F2 opens a prompt you can type command names into. Similar to Start->Run... on (older?) Windows, I guess, but quicker to access and often more powerful (depends on the implementation). – Raphael Sep 28 '15 at 22:37
  • Yeah, something like dmenu, for ecample – MaxNoe Sep 28 '15 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.