mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge with 1.0
This commit is contained in:
1
EXAMPLES
1
EXAMPLES
@@ -22,6 +22,7 @@ Documentation using the default theme
|
||||
* Cormoran: http://cormoran.nhopkg.org/docs/
|
||||
* Director: http://packages.python.org/director/
|
||||
* Dirigible: http://www.projectdirigible.com/documentation/
|
||||
* Elemental: http://elemental.googlecode.com/hg/doc/build/html/index.html
|
||||
* F2py: http://f2py.sourceforge.net/docs/
|
||||
* GeoDjango: http://geodjango.org/docs/
|
||||
* Genomedata: http://noble.gs.washington.edu/proj/genomedata/doc/1.2.2/genomedata.html
|
||||
|
||||
@@ -34,6 +34,9 @@ to reStructuredText/Sphinx from other documentation systems.
|
||||
* Marcin Wojdyr has written a script to convert Docbook to reST with Sphinx
|
||||
markup; it is at `Google Code <http://code.google.com/p/db2rst/>`_.
|
||||
|
||||
* Christophe de Vienne wrote a tool to convert from Open/LibreOffice documents
|
||||
to Sphinx: `odt2sphinx <http://pypi.python.org/pypi/odt2sphinx/>`_.
|
||||
|
||||
* To convert different markups, `Pandoc <http://johnmacfarlane.net/pandoc/>`_ is
|
||||
a very helpful tool.
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ documents into multiple output files, Sphinx uses a custom directive to add
|
||||
relations between the single files the documentation is made of, as well as
|
||||
tables of contents. The ``toctree`` directive is the central element.
|
||||
|
||||
.. note::
|
||||
|
||||
Simple "inclusion" of one file in another can be done with the
|
||||
:dudir:`include` directive.
|
||||
|
||||
.. rst:directive:: toctree
|
||||
|
||||
This directive inserts a "TOC tree" at the current location, using the
|
||||
|
||||
@@ -807,7 +807,8 @@ class DefinitionParser(object):
|
||||
argname = argtype
|
||||
argtype = None
|
||||
|
||||
args.append(ArgumentDefExpr(argtype, argname, type_suffixes, default))
|
||||
args.append(ArgumentDefExpr(argtype, argname,
|
||||
type_suffixes, default))
|
||||
self.skip_ws()
|
||||
const = self.skip_word_and_ws('const')
|
||||
noexcept = self.skip_word_and_ws('noexcept')
|
||||
|
||||
@@ -140,7 +140,8 @@ def generate_autosummary_docs(sources, output_dir=None, suffix='.rst',
|
||||
items = []
|
||||
for name in dir(obj):
|
||||
try:
|
||||
documenter = get_documenter(safe_getattr(obj, name), obj)
|
||||
documenter = get_documenter(safe_getattr(obj, name),
|
||||
obj)
|
||||
except AttributeError:
|
||||
continue
|
||||
if documenter.objtype == typ:
|
||||
|
||||
@@ -215,7 +215,7 @@ def missing_reference(app, env, node, contnode):
|
||||
continue
|
||||
proj, version, uri, dispname = inventory[objtype][target]
|
||||
newnode = nodes.reference('', '', internal=False, refuri=uri,
|
||||
reftitle=_('(in %s v%s)') % (proj, version))
|
||||
reftitle=_('(in %s v%s)') % (proj, version))
|
||||
if node.get('refexplicit'):
|
||||
# use whatever title was given
|
||||
newnode.append(contnode)
|
||||
|
||||
@@ -522,7 +522,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
else:
|
||||
self.body.append(r'\pysigline{')
|
||||
def depart_desc_signature(self, node):
|
||||
self.body.append('}{}')
|
||||
self.body.append('}')
|
||||
|
||||
def visit_desc_addname(self, node):
|
||||
self.body.append(r'\code{')
|
||||
@@ -537,9 +537,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
pass
|
||||
|
||||
def visit_desc_returns(self, node):
|
||||
self.body.append(r'}{ $\rightarrow$ ')
|
||||
self.body.append(r'{ $\rightarrow$ ')
|
||||
def depart_desc_returns(self, node):
|
||||
pass
|
||||
self.body.append(r'}')
|
||||
|
||||
def visit_desc_name(self, node):
|
||||
self.body.append(r'\bfcode{')
|
||||
@@ -549,10 +549,12 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
self.literal_whitespace -= 1
|
||||
|
||||
def visit_desc_parameterlist(self, node):
|
||||
# close name, open parameterlist
|
||||
self.body.append('}{')
|
||||
self.first_param = 1
|
||||
def depart_desc_parameterlist(self, node):
|
||||
pass
|
||||
# close parameterlist, open return annotation
|
||||
self.body.append('}{')
|
||||
|
||||
def visit_desc_parameter(self, node):
|
||||
if not self.first_param:
|
||||
@@ -1167,7 +1169,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
# references to labels in the same document
|
||||
id = self.curfilestack[-1] + ':' + uri[1:]
|
||||
self.body.append(self.hyperlink(id))
|
||||
if self.builder.config.latex_show_pagerefs:
|
||||
if self.builder.config.latex_show_pagerefs and not \
|
||||
self.in_productionlist:
|
||||
self.context.append('}} (%s)' % self.hyperpageref(id))
|
||||
else:
|
||||
self.context.append('}}')
|
||||
|
||||
Reference in New Issue
Block a user