# HG changeset patch
# User KarlDieter Crisman
# Date 1341316749 3600
# Node ID 3db1b869b24d1adcf1797f0f5a6d65beb73153d4
# Parent 27ea573f3fe24add016f468e3f960f7d2566f31a
Trac 12806: fix error building documentation
diff git a/sage/graphs/digraph.py b/sage/graphs/digraph.py
 a/sage/graphs/digraph.py
+++ b/sage/graphs/digraph.py
@@ 162,6 +162,7 @@
... g.subgraph(component).plot()
The same methods works for strongly connected components ::
+
sage: for component in g.strongly_connected_components():
... g.subgraph(component).plot()
@@ 2598,7 +2599,7 @@
 ``implementation``  Use the default Cython implementation
(``implementation = default``), the default NetworkX library
(``implementation = "NetworkX"``) or the recursive NetworkX
 implementation (``implementation = "recursive")
+ implementation (``implementation = "recursive"``)
.. SEEALSO::
@@ 2642,8 +2643,8 @@
.. note::
There is a recursive version of this in NetworkX, it used to
 have problems in earlier versions but they have since been
 fixed::
+ have problems in earlier versions but they have since been
+ fixed::
sage: import networkx
sage: D = DiGraph({ 0:[1,2,3], 4:[2,5], 1:[8], 2:[7], 3:[7],
diff git a/sage/graphs/generic_graph.py b/sage/graphs/generic_graph.py
 a/sage/graphs/generic_graph.py
+++ b/sage/graphs/generic_graph.py
@@ 10774,7 +10774,7 @@
The clustering coefficient of a graph is the fraction of possible
triangles that are triangles, `c_i = triangles_i /
 (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [1]. A
+ (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [HSSNX]_. A
coefficient for the whole graph is the average of the `c_i`.
Transitivity is the fraction of all possible triangles which are
triangles, T = 3\*triangles/triads, [HSSNX]_.
@@ 10805,22 +10805,22 @@
def clustering_average(self):
r"""
Returns the average clustering coefficient.

+
The clustering coefficient of a graph is the fraction of possible
triangles that are triangles, `c_i = triangles_i /
 (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [1]. A
+ (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [NTX]_. A
coefficient for the whole graph is the average of the `c_i`.
Transitivity is the fraction of all possible triangles which are
 triangles, T = 3\*triangles/triads, [1].

+ triangles, T = 3\*triangles/triads, [NTX]_.
+
REFERENCE:
  [1] Aric Hagberg, Dan Schult and Pieter Swart. NetworkX
+ .. [NTX] Aric Hagberg, Dan Schult and Pieter Swart. NetworkX
documentation. [Online] Available:
https://networkx.lanl.gov/reference/networkx/

 EXAMPLES::

+
+ EXAMPLES::
+
sage: (graphs.FruchtGraph()).clustering_average()
0.25
"""
@@ 10829,17 +10829,17 @@
def clustering_coeff(self, nodes=None, weight=False, return_vertex_weights=True):
r"""
 Returns the clustering coefficient for each vertex in `nodes` as
+ Returns the clustering coefficient for each vertex in ``nodes`` as
a dictionary keyed by vertex.
For an unweighted graph, the clustering coefficient of a node
`i` is the fraction of possible triangles containing `i` that
 exist. `c_i = 2\*T(i) / (k_i\*(k_i1))` where T(i)` the number
+ exist. `\frac{2 T(i)}{k_i (k_i1)}` where `T(i)` the number
of triangles through `i` and `k_i` is the degree of vertex `i`
 [1].
+ [NX]_.
For weighted graphs the clustering is defined as the geometric
 average of the subgraph edge weights [1], normalized by the
+ average of the subgraph edge weights [NX]_, normalized by the
maximum weight in the network.
The value of `c_i` is assigned to 0 if `k_i < 2`.
@@ 10847,16 +10847,16 @@
A coefficient for the whole graph is the average of the `c_i`.
Transitivity is the fraction of all possible triangles which are
 triangles, T = 3\*triangles/triads, [1].
+ triangles, T = 3\*triangles/triads, [NX]_.
INPUT:
 ``nodes``  the vertices to inspect (default None returns data
on all vertices in graph)
  ``weight``  string or boolean default is False. If it is
+  ``weight``  string or boolean (default is False). If it is
a string it used the indicated edge property as weight.
 `weight = True` is equivalent to `weight = weight`
+ ``weight = True`` is equivalent to ``weight = 'weight'``
 ``return_vertex_weights`` is a boolean ensuring backwards
compatibility with deprecated features of NetworkX 1.2. It
@@ 10864,7 +10864,7 @@
REFERENCE:
  [1] Aric Hagberg, Dan Schult and Pieter Swart. NetworkX
+ .. [NX] Aric Hagberg, Dan Schult and Pieter Swart. NetworkX
documentation. [Online] Available:
https://networkx.lanl.gov/reference/networkx/
@@ 10962,10 +10962,10 @@
The clustering coefficient of a graph is the fraction of possible
triangles that are triangles, `c_i = triangles_i /
 (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [1]. A
+ (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [1]_. A
coefficient for the whole graph is the average of the `c_i`.
Transitivity is the fraction of all possible triangles which are
 triangles, T = 3\*triangles/triads, [1].
+ triangles, T = 3\*triangles/triads, [1]_.
REFERENCE: