trac #16058: Organize the index of combinatorial modules
trac #16058: Two new categories
trac #16058: Another group
Some more groupings and separated root system types into separate list.
trac #16058: Rebase on 6.2.rc0
adding a doctest to make sure 13624 is fixed
Trac #16058: Organize the index of the combinatorics section of the reference manual

This page is a bit messy :

http://www.sagemath.org/doc/reference/combinat/index.html

The goal of this ticket is to make it easier to read, in the hope to
find what one is actually looking for.

Everybody is welcome to add a commit to group/sort everything here in a
way that will satisfy the specialist of each field.

Nathann

URL: http://trac.sagemath.org/16058
Reported by: ncohen
Ticket author(s): Nathann Cohen, Travis Scrimshaw
Reviewer(s): Nicolas M. Thiéry
Trac #13624: KeyError raised by GraphLatex.dot2tex_picture when edge_labels=True

The following is ok :

{{{
sage: G = DiGraph()
sage: G.add_edge(3333, 88, 'my_label')
sage: G.set_latex_options(format='dot2tex')
sage: view(G)
}}}

but with `edges_labels=True` a !KeyError is raised :

{{{
sage: G.set_latex_options(edge_labels=True)
sage: view(G)
ERROR    Failed to process input
Traceback (most recent call last):
  File "/Users/slabbe/Applications/sage-5.2/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 2939, in main
    s =  conv.convert(dotdata)
  File "/Users/slabbe/Applications/sage-5.2/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 794, in convert
    return self.do_preview_preproc()
  File "/Users/slabbe/Applications/sage-5.2/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 1167, in do_preview_preproc
    hp,dp,wt = pp.texdims[name]
KeyError: '3333880'
}}}

The error is also raised by `dot2tex_picture` method:

{{{
sage: G = DiGraph()
sage: G.add_edge(0, 1, 'p0')
sage: G.latex_options().dot2tex_picture()
'\n\\begin{tikzpicture}[>=latex,line join=bevel,]\n%%\n\\node (1) at
(6bp,7bp) [draw,draw=none] {$1$};\n  \\node (0) at (6bp,57bp)
[draw,draw=none] {$0$};\n  \\draw [black,->] (0) ..controls
(6bp,44.053bp) and (6bp,33.103bp)  .. (1);\n%\n\\end{tikzpicture}\n'
.dot2tex_picture()
sage: G.set_latex_options(edge_labels=True)
sage: G.latex_options().dot2tex_picture()
ERROR    Failed to process input
Traceback (most recent call last):
  File "/Users/slabbe/Applications/sage-5.2/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 2939, in main
    s =  conv.convert(dotdata)
  File "/Users/slabbe/Applications/sage-5.2/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 794, in convert
    return self.do_preview_preproc()
  File "/Users/slabbe/Applications/sage-5.2/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 1167, in do_preview_preproc
    hp,dp,wt = pp.texdims[name]
KeyError: '010'
''
}}}

This is due to dot2tex currently not supporting '\verb' properly.

The attached patch works around this by replacing \verb by \text, and
stripping out tricky characters like `^` and `_`.

URL: http://trac.sagemath.org/13624
Reported by: slabbe
Ticket author(s): Sébastien Labbé
Reviewer(s): Christian Stump