sphinx-doc / sphinx-doc/sphinx

Minor inconsistency in conf.py: latex_documents uses author string literal instead of author variable

Open
#8,176 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Description

The conf.py generated by sphinx-quickstart uses the variable author in man_pages and texinfo_documents but also uses the literal string value for author in latex_documents


To Reproduce

$ sphinx-quickstart
...
> Project 
> Author name(s): John Q. Pseudonymous
...
$ cat source/conf.py
...
author = 'John Q. Pseudonymous'
...
latex_documents = [
    (master_doc, 'deleteme.tex', 'delete me Documentation',
     'John Q. Pseudonymous', 'manual'),
]
...
man_pages = [
    (master_doc, 'deleteme', 'delete me Documentation',
     [author], 1)
]
...
texinfo_documents = [
    (master_doc, 'deleteme', 'delete me Documentation',
     author, 'deleteme', 'One line description of project.',
     'Miscellaneous'),
]
...

Expected behavior

I would expect latex_documents to use the author variable rather than the string literal

$ cat source/conf.py
...
author = 'John Q. Pseudonymous'
...
latex_documents = [
    (master_doc, 'deleteme.tex', 'delete me Documentation',
     author, 'manual'),
]
...
man_pages = [
    (master_doc, 'deleteme', 'delete me Documentation',
     [author], 1)
]
...
texinfo_documents = [
    (master_doc, 'deleteme', 'delete me Documentation',
     author, 'deleteme', 'One line description of project.',
     'Miscellaneous'),
]
...

Environment info

  • OS: Ubuntu Studio 20.04
  • Python version: 3.8.2
  • Sphinx version: 1.8.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the conf.py template emitted by sphinx-quickstart and compare latex_documents with the nearby man_pages and texinfo_documents definitions. Rerun sphinx-quickstart with a sample author and inspect source/conf.py; done means latex_documents uses author consistently with the other generated entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.