Commits

Jon Waltman committed 69acc55

Add :confval:`texinfo_show_urls`.

Comments (0)

Files changed (4)

    * *targetname*: file name (no extension) of the Texinfo file in the output
      directory.
    * *title*: Texinfo document title.  Can be empty to use the title of the
-     *startdoc*.
-   * *author*: Author for the Texinfo document.  Use ``\and`` to separate
-     multiple authors, as in: ``'John \and Sarah'``.
+     *startdoc*.  Inserted as Texinfo markup, so special characters like @ and
+     {} will need to be escaped to be inserted literally.
+   * *author*: Author for the Texinfo document.  Inserted as Texinfo markup.
+     Use ``@*`` to separate multiple authors, as in: ``'John@*Sarah'``.
    * *dir_entry*: The name that will appear in the top-level ``DIR`` menu file.
    * *description*: Descriptive text to appear in the top-level ``DIR`` menu
      file.
 
    .. versionadded:: 1.1
 
+.. confval:: texinfo_show_urls
+
+   Control how to display URL addresses.
+
+   * ``'footnote'`` -- display URLs in footnotes (default)
+   * ``'no'`` -- do not display URLs
+   * ``'inline'`` -- display URLs inline in parentheses
+
+   .. versionadded:: 1.1
+
 .. confval:: texinfo_elements
 
    A dictionary that contains Texinfo snippets that override those Sphinx
         default ``4``.  Specify ``0`` for no indentation.
 
      ``'preamble'``
-        Text inserted as is near the beginning of the file.
+        Texinfo markup inserted near the beginning of the file.
+
+     ``'copying'``
+        Texinfo markup inserted within the ``@copying`` block and displayed
+        after the title.  The default value consists of a simple title page
+        identifying the project.
 
    * Keys that are set by other options and therefore should not be overridden
      are:
 
+     ``'author'``
+     ``'body'``
+     ``'date'``
+     ``'direntry'``
      ``'filename'``
+     ``'project'``
+     ``'release'``
      ``'title'``
      ``'direntry'``
 
         texinfo_appendices = ([], None),
         texinfo_elements = ({}, None),
         texinfo_domain_indices = (True, None),
+        texinfo_show_urls = ('footnote', None),
 
         # linkcheck options
         linkcheck_ignore = ([], None),

sphinx/quickstart.py

 
 # If false, no module index is generated.
 #texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
 '''
 
 EPUB_CONFIG = '''

sphinx/writers/texinfo.py

         sid = self.get_short_id(id)
         for id in (eid, sid):
             if id not in self.written_ids:
-                self.body.append('@anchor{%s}\n' % id)
+                self.body.append('@anchor{%s}' % id)
                 self.written_ids.add(id)
 
     def add_xref(self, id, name, node):
         else:
             uri = self.escape_arg(uri)
             name = self.escape_arg(name)
-            show_urls = 'footnote'
+            show_urls = self.builder.config.texinfo_show_urls
             if self.in_footnote:
                 show_urls = 'inline'
             if not name or uri == name: