Imported Upstream version 1.47.7
[platform/upstream/help2man.git] / help2man.texi
index 9404822..f35067d 100644 (file)
@@ -3,6 +3,8 @@
 @settitle @command{help2man} Reference Manual
 @finalout
 
+@documentencoding UTF-8
+
 @dircategory Software development
 @direntry
 * help2man: (help2man).      Automatic manual page generation.
@@ -14,7 +16,7 @@ simple manual pages from the @samp{--help} and @samp{--version} output
 of other commands.
 
 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010, 2011, 2012,
-2013, 2013 Free Software Foundation, Inc.
+2013, 2014, 2015 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -46,7 +48,7 @@ by the Foundation.
 @page
 @vskip 0pt plus 1filll
 Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010,
-2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -209,7 +211,7 @@ Here are some recommendations for what to include in your
 best chance at generating a respectable man page, as well as
 benefitting users directly.
 
-@xref{Command-Line Interfaces, , , standards, GNU Coding Standards},
+See @ref{Command-Line Interfaces, , , standards, GNU Coding Standards}
 and @ref{Man Pages, , , standards, GNU Coding Standards}, for the
 official GNU standards relating to @option{--help} and man pages.
 
@@ -258,7 +260,7 @@ option only:
 @end smallexample
 
 For programs that take many options, it may be desirable to split the
-option list into sections such as `Global', `Output control', or
+option list into sections such as @samp{Global}, @samp{Output control}, or
 whatever makes sense in the particular case.  It is usually best to
 alphabetise (by short option name first, then long) within each section,
 or the entire list if there are no sections.
@@ -289,6 +291,14 @@ option descriptions for @option{--help} in the same structure as the
 rest of the option definition; you may wish to consider using these
 routines for option parsing instead of @code{getopt}.
 
+By default @command{help2man} has some heuristics for identifying
+manual page sections: a line consisting of @samp{Options:} for example
+will cause the following text to appear in the @code{OPTIONS} section,
+and a line beginning with @samp{Copyright} will appear in the
+@code{COPYRIGHT} section.  Outside of these heuristics, a line
+consisting of @samp{*Words*} will start a new section, and
+@samp{Words:} a new sub-section.
+
 @node Including text
 @chapter Including Additional Text in the Output
 
@@ -296,7 +306,7 @@ Additional static text may be included in the generated manual page by
 using the @samp{--include} and @samp{--opt-include} options
 (@pxref{Invoking help2man}).  While these files can be named anything,
 for consistency we suggest to use the extension @code{.h2m} for
-help2man include files.
+@command{help2man} include files.
 
 The format for files included with these option is simple:
 
@@ -327,10 +337,10 @@ NAME
 SYNOPSIS
 DESCRIPTION
 OPTIONS
+@emph{other}
 ENVIRONMENT
 FILES
 EXAMPLES
-@emph{other}
 AUTHOR
 REPORTING BUGS
 COPYRIGHT
@@ -375,7 +385,7 @@ The value of @code{HELP2MAN} may be set in @code{configure.in} using
 either of:
 
 @example
-AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
+AM_MISSING_PROG(HELP2MAN, help2man)
 @end example
 
 for @command{automake}, or something like: