Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add man_skip_desc_subtitle option #9431

Closed
wants to merge 1 commit into from

Conversation

hkuno
Copy link
Contributor

@hkuno hkuno commented Jul 12, 2021

A configuration value to optionally skip printing the description
of a command as a subtitle when generating a manpage.
This commit addresses #9430

Signed-off-by: Harumi Kuno harumi.kuno@hpe.com

Subject: add option to manpage builder to not generate descriptive subtitle

Feature or Bugfix

  • Feature

Purpose

@jsquyres and I would like to generate both groff files and also html files from a single set of rst man page files.
However, the manpage.py writer currently always prints a subtitle (added by the manpage.py builder) with a description of the command (the html writer does not do this).

The problem is that there is currently no way to turn that off and if the man page files already include descriptions of the commands (e.g., because the rst files were ported from nroff files), then that description will appear twice in the generated man page.

For example, if rst/conf.py contains the following:

man_pages=[("ompi/mpi/man/man3/MPI_Abort.3","MPI_Abort", "(from conf.py) Terminates MPI execution environment","",3)]

Then the generated man page will look like this:

MPI_ABORT(3)                            Open MPI                            MPI_ABORT(3)

NAME
       MPI_Abort - (from conf.py) Terminates MPI execution environment

       MPI_Abort - Terminates MPI execution environment.

SYNTAX
   C Syntax
          #include <mpi.h>
          int MPI_Abort(MPI_Comm comm, int errorcode)
...

With this change, someone could invoke sphinx-build with a configuration option, like this:

sphinx-build  -b man  -D man_skip_desc_subtitle=True rst/ man/

And then the generated man page will look like this:

MPI_ABORT(3)                            Open MPI                            MPI_ABORT(3)

NAME
       MPI_Abort - Terminates MPI execution environment.

SYNTAX
   C Syntax
          #include <mpi.h>
          int MPI_Abort(MPI_Comm comm, int errorcode)
...

Relates

A configuration value to optionally skip printing the description
of a command as a subtitle when generating a manpage.
This commit addresses
sphinx-doc#9430

Signed-off-by: Harumi Kuno <harumi.kuno@hpe.com>
@hkuno
Copy link
Contributor Author

hkuno commented Aug 30, 2021

Closing this PR because it is superceded by #9594

@hkuno hkuno closed this Aug 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants