xref: /freebsd/usr.bin/man/man.conf.5 (revision cd89fe3923e92ab090cbdff7eb215c2d85b51718)
1c535eb59SGordon Tetlow.\"-
2c535eb59SGordon Tetlow.\"  Copyright (c) 2010 Gordon Tetlow
3c535eb59SGordon Tetlow.\"  All rights reserved.
4c535eb59SGordon Tetlow.\"
5c535eb59SGordon Tetlow.\"  Redistribution and use in source and binary forms, with or without
6c535eb59SGordon Tetlow.\"  modification, are permitted provided that the following conditions
7c535eb59SGordon Tetlow.\"  are met:
8c535eb59SGordon Tetlow.\"  1. Redistributions of source code must retain the above copyright
9c535eb59SGordon Tetlow.\"     notice, this list of conditions and the following disclaimer.
10c535eb59SGordon Tetlow.\"  2. Redistributions in binary form must reproduce the above copyright
11c535eb59SGordon Tetlow.\"     notice, this list of conditions and the following disclaimer in the
12c535eb59SGordon Tetlow.\"     documentation and/or other materials provided with the distribution.
13c535eb59SGordon Tetlow.\"
14c535eb59SGordon Tetlow.\"  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15c535eb59SGordon Tetlow.\"  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16c535eb59SGordon Tetlow.\"  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17c535eb59SGordon Tetlow.\"  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18c535eb59SGordon Tetlow.\"  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19c535eb59SGordon Tetlow.\"  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20c535eb59SGordon Tetlow.\"  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21c535eb59SGordon Tetlow.\"  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22c535eb59SGordon Tetlow.\"  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23c535eb59SGordon Tetlow.\"  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24c535eb59SGordon Tetlow.\"  SUCH DAMAGE.
25c535eb59SGordon Tetlow.\"
26b70e2025SRuslan Ermilov.Dd June 3, 2011
27c535eb59SGordon Tetlow.Dt MAN.CONF 5
28bea977e7SJoel Dahl.Os
29c535eb59SGordon Tetlow.Sh NAME
30c535eb59SGordon Tetlow.Nm man.conf
31c535eb59SGordon Tetlow.Nd
32c535eb59SGordon Tetlow.Xr man 1
33c535eb59SGordon Tetlowand
34c535eb59SGordon Tetlow.Xr manpath 1
35c535eb59SGordon Tetlowconfiguration files
36c535eb59SGordon Tetlow.Sh DESCRIPTION
37c535eb59SGordon TetlowThe
38c535eb59SGordon Tetlow.Nm
39c535eb59SGordon Tetlowfile is used to configure the manual search path, locales, and utility set for
40c535eb59SGordon Tetlow.Xr man 1
41c535eb59SGordon Tetlowand its related utilities.
42c535eb59SGordon TetlowDuring initialization,
43c535eb59SGordon Tetlow.Xr man 1
44c535eb59SGordon Tetlowreads the configuration files located at
45c535eb59SGordon Tetlow.Pa /usr/local/etc/man.d/*.conf
46c535eb59SGordon Tetlowand
47c535eb59SGordon Tetlow.Pa /etc/man.conf .
48c535eb59SGordon Tetlow.Pp
49c535eb59SGordon TetlowThe files contained in
50c535eb59SGordon Tetlow.Pa /usr/local/etc/man.d/*.conf
51c535eb59SGordon Tetloware intended to be used by the
52c535eb59SGordon Tetlow.Xr ports 7
53c535eb59SGordon Tetlowsystem for extending the manual set to support additional paths and locales.
54c535eb59SGordon Tetlow.Pa /etc/man.conf
55c535eb59SGordon Tetlowis intended to be used by the local administrator to set additional policy.
56c535eb59SGordon Tetlow.Pp
57c535eb59SGordon TetlowCurrently supported configuration variables include:
588cc9f126SJoel Dahl.Bl -tag -width 12n -offset indent
59c535eb59SGordon Tetlow.It MANCONFIG
60c535eb59SGordon TetlowOverrides the default location to import additional manual configuration files.
61c535eb59SGordon TetlowDefaults to
62c535eb59SGordon Tetlow.Pa /usr/local/etc/man.d/*.conf .
63c535eb59SGordon Tetlow.It MANPATH
64c535eb59SGordon TetlowAdds the specified directory to the manual search path.
65c535eb59SGordon Tetlow.It MANLOCALE
66c535eb59SGordon TetlowIndicates support is available for the given locale.
67c535eb59SGordon Tetlow.El
68c535eb59SGordon Tetlow.Pp
69c535eb59SGordon TetlowFor pages in a given language, overriding the default toolset for
70c535eb59SGordon Tetlowdisplay is supported via the following definitions:
718cc9f126SJoel Dahl.Pp
728cc9f126SJoel Dahl.Bl -tag -width 12n -offset indent -compact
73c535eb59SGordon Tetlow.It EQN Ns _ Ns Va LANG
74c535eb59SGordon Tetlow.It NROFF Ns _ Ns Va LANG
75c535eb59SGordon Tetlow.It PIC Ns _ Ns Va LANG
76c535eb59SGordon Tetlow.It TBL Ns _ Ns Va LANG
77c535eb59SGordon Tetlow.It TROFF Ns _ Ns Va LANG
78c535eb59SGordon Tetlow.It REFER Ns _ Ns Va LANG
79c535eb59SGordon Tetlow.It VGRIND Ns _ Ns Va LANG
80c535eb59SGordon Tetlow.El
81c535eb59SGordon Tetlow.Pp
82c535eb59SGordon TetlowSee the
83c535eb59SGordon Tetlow.Sx EXAMPLES
84c535eb59SGordon Tetlowsection for how to use these variables.
85c535eb59SGordon Tetlow.Sh IMPLEMENTATION NOTES
86c535eb59SGordon TetlowThe parser used for this utility is very basic and only supports comment
87c535eb59SGordon Tetlowcharacters (#) at the beginning of a line.
88c535eb59SGordon Tetlow.Sh FILES
898cc9f126SJoel Dahl.Bl -tag -width "Pa /usr/local/etc/man.d/*.conf" -compact
90c535eb59SGordon Tetlow.It Pa /etc/man.conf
91c535eb59SGordon TetlowSystem configuration file.
92c535eb59SGordon Tetlow.It Pa /usr/local/etc/man.d/*.conf
93c535eb59SGordon TetlowLocal configuration files.
94c535eb59SGordon Tetlow.El
95c535eb59SGordon Tetlow.Sh EXAMPLES
96c535eb59SGordon TetlowA perl port that needs to install additional manual pages outside of the
97c535eb59SGordon Tetlowdefault location could install a file in
98c535eb59SGordon Tetlow.Pa /usr/local/etc/man.d/perl.conf
99c535eb59SGordon Tetlowwith the following contents:
100c535eb59SGordon Tetlow.Bd -literal -offset indent
101c535eb59SGordon Tetlow# Add perl man pages to search path
102c535eb59SGordon TetlowMANPATH /usr/local/lib/perl5/5.8.9/man
103c535eb59SGordon TetlowMANPATH /usr/local/lib/perl5/5.8.9/perl/man
104c535eb59SGordon Tetlow.Ed
105c535eb59SGordon Tetlow.Pp
106c535eb59SGordon TetlowA Japanese localization port could install a custom toolset and include a
107c535eb59SGordon Tetlowfile in
108c535eb59SGordon Tetlow.Pa /usr/local/etc/man.d/ja-man-doc.conf
109c535eb59SGordon Tetlowwith the following contents:
110c535eb59SGordon Tetlow.Bd -literal -offset indent
111c535eb59SGordon Tetlow# Setup Japanese toolset
112c535eb59SGordon TetlowMANLOCALE	ja_JP.eucJP
1131030a67fSRuslan ErmilovEQN_JA		/usr/local/bin/geqn
114c535eb59SGordon TetlowPIC_JA		/usr/local/bin/gpic
115c535eb59SGordon TetlowTBL_JA		/usr/local/bin/gtbl
116*cd89fe39SWolfram SchneiderNROFF_JA	/usr/local/bin/groff -mandoc -dlang=ja_JP.eucJP
117*cd89fe39SWolfram SchneiderTROFF_JA	/usr/local/bin/groff -mandoc -dlang=ja_JP.euc.jp
118c535eb59SGordon Tetlow.Ed
119c535eb59SGordon Tetlow.Pp
120c535eb59SGordon TetlowIf the system administrator decides to override the
121c535eb59SGordon Tetlow.Va LOCALBASE
122c535eb59SGordon Tetlow.Xr make 1
123c535eb59SGordon Tetlowvariable causing all
124c535eb59SGordon Tetlow.Xr ports 7
125c535eb59SGordon Tetlowto be installed into
126c535eb59SGordon Tetlow.Pa /opt
127c535eb59SGordon Tetlowinstead of
128c535eb59SGordon Tetlow.Pa /usr/local ,
129c535eb59SGordon Tetlowspecifying the following in
130c535eb59SGordon Tetlow.Pa /etc/man.conf
131c535eb59SGordon Tetlowwill accommodate this change:
132c535eb59SGordon Tetlow.Bd -literal -offset indent
133c535eb59SGordon Tetlow# Look for additional configuration files
134c535eb59SGordon TetlowMANCONFIG /opt/etc/man.d/*.conf
135c535eb59SGordon Tetlow.Ed
136c535eb59SGordon Tetlow.Sh SEE ALSO
137c535eb59SGordon Tetlow.Xr apropos 1 ,
138c535eb59SGordon Tetlow.Xr man 1 ,
139c535eb59SGordon Tetlow.Xr manpath 1 ,
140c535eb59SGordon Tetlow.Xr whatis 1
141