Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I had evince, installed TexLive 2010 pretest (ubuntu lucid linx, fresh install). texdoc was using evince. Then I installed kubuntu ontop, and texdoc switched to okular. Now I've installed acroread and texdoc is using it now.

I want to globally set it to use evince. How do I do that? (tried all the environmental variables mentioned in the man page and no luck so far)

share|improve this question
1  
Just to check, you tried setting PDFVIEWER_texdoc, right? –  David Z Jul 27 '10 at 3:08
1  
Muahaha =) PDFVIEWER_texdoc did the trick. I have used PDFVIEWER instead. –  Dima Jul 27 '10 at 3:26
    
Oh, well okay! I'm surprised that PDFVIEWER didn't work for you, since if I'm reading the documentation right, it should be the second thing that texdoc checks after PDFVIEWER_texdoc. But anyway, glad you got it working. –  David Z Jul 27 '10 at 3:28
add comment

2 Answers 2

up vote 13 down vote accepted

If it hasn't changed since TeXLive 2009, you can set

viewer_pdf=evince

in the configuration file. To find out which file to put that in, run

texdoc -f

and you will see some output like this:

texdoc 0.61
Configuration files are:
    absent      /home/username/texmf/texdoc/texdoc-bin.cnf
(*) absent      /home/username/texmf/texdoc/texdoc.cnf
    absent      /home/username/texmf/texdoc/texdoc-dist.cnf
    absent      /usr/local/share/texmf/texdoc/texdoc-bin.cnf
    absent      /usr/local/share/texmf/texdoc/texdoc.cnf
    active      /usr/share/texmf/texdoc/texdoc.cnf
(*) This is the recommended configuration file for your personal preferences.

Put the line in the filename marked by the (*), creating it if necessary.

EDIT: To add to the above explanation: according to the documentation (and again, this is for TeXlive 2009), texdoc gets its configuration information from 5 sources.

  1. Command-line options (irrelevant for this question, since there's no CL option to set the viewer app)
  2. Environment variables ending with _texdoc. PDFVIEWER_texdoc is the one that controls the PDF viewer.
  3. Other environment variables. For the PDF viewer app, these are

    • PDFVIEWER
    • TEXDOCVIEW_pdf
    • TEXDOC_VIEWER_PDF

    The documentation isn't clear on which order they're checked in but PDFVIEWER is the preferred alternative so I'd expect it to take precedence over the others.

  4. Values from configuration files, read in the order given by texdoc -f
  5. Hard-coded defaults (system-dependent)

Again, this is all explained in the documentation, which can be accessed by running

texdoc texdoc
share|improve this answer
    
(*) active /home/tdlk/texmf/texdoc/texdoc.cnf $ cat ~/texmf/texdoc/texdoc.cnf viewer_pdf=evince Still launches acroread..... =( –  Dima Jul 27 '10 at 2:50
    
Weird... in that case I have no idea. I tried it out and it works for me. –  David Z Jul 27 '10 at 3:05
    
Just makesure that PDFVIEWER and PDFVIEWER_texdoc are not set, then it works like a charm. Thanks a lot. –  Dima Jul 27 '10 at 3:29
    
Yeah, sorry, I probably should have included the info about environment variables in the first place. –  David Z Jul 27 '10 at 3:35
    
Oddly enough, the precedence of environement variables is: PDFVIEWER_texdoc, TEXDOCVIEW_pdf, TEXDOC_VIEWER_PDF, PDFVIEWER. The goal is to be consistent with the variables for html: BROWSER_texdoc, TEXDOCVIEW_html, TEXDOC_VIEWER_HTML, BROWSER where TEXDOC_VIEWER_HTML is more specific than BROWSER so clearly should have precedence. Anyway, using the configuration files is the prefered way to handle these settings. –  mpg Oct 21 '10 at 16:02
add comment

When you get confused about what is set where, try texdoc --debug=config. It helps you find which environment variable you forgot, etc.

The variable PDFVIEWER should definitly work if no other variable is set for PDF.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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