[OS X TeX] MacTeX installer and man pages

Charilaos Skiadas cskiadas at iwu.edu
Sat Jul 22 16:17:33 CEST 2006


Robert's explanation is spot on, as demonstrated by the explanation  
from man man (emphasis mine):
	If you don't specify an explicit path list  with  -M  or  MANPATH,  man
        develops  its  own path list based on the contents of the  
configuration
        file /usr/share/misc/man.conf.  **The MANPATH statements in  
the  configu-
        ration  file  identify  particular directories to include in  
the search
        path.**

        Furthermore, the MANPATH_MAP statements add to the search  
path  depend-
        ing  on your command search path (i.e. your PATH environment  
variable).
        **For each directory that may be in  the  command  search   
path,  a  MAN-
        PATH_MAP  statement  specifies  a directory that should be  
added to the
        search path for manual page files.**  man looks at the PATH  
variable  and
        adds the corresponding directories to the manual page file  
search path.
        Thus, with the proper use of MANPATH_MAP, when you  issue   
the  command
        man  xyz,  you  get a manual page for the program that would  
run if you
        issued the command xyz.

        In addition, for each directory in the command search path  
(we'll  call
        it  a  "command  directory")  for  which  you do not have a  
MANPATH_MAP
        statement, man automatically looks for a manual page  
directory "nearby"
        namely as a subdirectory in the command directory itself or  
in the par-
        ent directory of the command directory.

        You can disable the automatic "nearby" searches by   
including  a  NOAU-
        TOPATH statement in /usr/share/misc/man.conf.


Though admittedly the above does not explain what happens  if there  
are multiple MANPATH_MAP instructions for the same directory.

The last two paragraphs are pretty interesting too, especially with  
respect to the "nearby" behavior.

This has been a very educational thread.
Haris
On Jul 22, 2006, at 9:01 AM, Robert Bruner wrote:

> Curmudgeon-At-Large Justin C. Walker wrote:
>
>> Wouldn't it be better to add
>> MANPATH_MAP     /usr/local/bin          /usr/local/man
>>
>> to your conf file?  Packages have used both locations in "/usr/local"
>> for man pages, so the conf file seems like the best bet to keep
>> things working.  I have mine configured this way, and it does work.
>
> No, you just want to add
>
>      MANPATH /usr/local/man
>
> Justin, I am guessing that you don't have anything in /usr/local/ 
> share/man/
> or if you do, your MANPATH_MAP line is working for other reasons, of
> which several are possible.  Evidence as follows.
>
> My experiments show that only one MANPATH_MAP entry per executable
> directory is actually used.  So if you have
>
>      MANPATH_MAP     /usr/local/bin          /usr/local/man
>      MANPATH_MAP     /usr/local/bin          /usr/local/share/man
>
> then (if /usr/local/bin is in your path) /usr/local/man will be  
> searched for
> man pages, but /usr/local/share/man will not, whereas if you have  
> them in
> the opposite order,
>
>      MANPATH_MAP     /usr/local/bin          /usr/local/share/man
>      MANPATH_MAP     /usr/local/bin          /usr/local/man
>
> then the reverse happens.  Use the -d option of man to observe this  
> in action.
> Here's what "man -d gv" shows (gv.1 is the unique file in my /usr/ 
> local/man/man1).
> My system has no /usr/local/share/man directory, and the effect of  
> this is shown
> below.  When my man.conf has the first pair above, man -d shows
>
>      ....... omitting irrelevant lines ........
>      found manpath map /usr/local/bin --> /usr/local/man
>      found manpath map /usr/local/bin --> /usr/local/share/man
>      ....... omitting irrelevant lines ........
>
>      path directory /usr/local/bin is in the config file
>      adding /usr/local/man to manpath
>      ....... omitting irrelevant lines ........
>
> so the first MANPATH_MAP line has had an effect, but the second is
> ignored. One might conjecture that this is because the directory is  
> absent,
> but reversing the order gets you
>
>      ....... omitting irrelevant lines ........
>      found manpath map /usr/local/bin --> /usr/local/share/man
>      found manpath map /usr/local/bin --> /usr/local/man
>      ....... omitting irrelevant lines ........
>
>      path directory /usr/local/bin is in the config file
>
>      ....... omitting irrelevant lines ........
>
> showing that the line referring to the nonexistent tree has taken
> effect, but does nothing to MANPATH since the directory does not  
> exist,
> and that the second line, referring to the existing tree, was not  
> used.
>
> Thanks to all of you who so kindly answer questions all and sundry,  
> and
> who have written such handy tools for TeX on Mac OS X,
>
> Bob Bruner
>
>
> ------------------------------|--------------------------------
> Robert R. Bruner, Professor    (313)-577-3179 (office)         |
> Department of Mathematics      (313)-577-2479 (department)     |
> Wayne State University         (313)-577-7596 (fax, shared)    |
> Detroit, Michigan  48202       rrb at math.wayne.edu              |
> USA                            http://www.math.wayne.edu/~rrb  |
> ------------------------------|--------------------------------

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list