#13624: KeyError raised by GraphLatex.dot2tex_picture when edge_labels=True
------------------------------------------+---------------------------------
       Reporter:  slabbe                  |         Owner:  tbd       
           Type:  defect                  |        Status:  needs_work
       Priority:  major                   |     Milestone:  sage-5.9  
      Component:  packages: optional      |    Resolution:            
       Keywords:  dot2tex, graph drawing  |   Work issues:            
Report Upstream:  N/A                     |     Reviewers:            
        Authors:  Nicolas M. ThiƩry       |     Merged in:            
   Dependencies:                          |      Stopgaps:            
------------------------------------------+---------------------------------

Comment (by slabbe):

 Nicolas, could you add the following doctest to your patch to make sure
 the issue do not come up again in the future?

 {{{
 We make sure :trac:`13624` is fixed::

     sage: G = DiGraph()
     sage: G.add_edge(3333, 88, 'my_label')
     sage: G.set_latex_options(format='dot2tex')
     sage: G.set_latex_options(edge_labels=True)
     sage: G.latex_options().dot2tex_picture()  # optional - dot2tex
 graphviz
     \begin{tikzpicture}
     first_line?
     ...
     last_line?
     \end{tikzpicture}
 }}}

 I don't really know where to put the information about where and how to
 download graphviz and dot2tex. In fact, there are many entry points for
 the user:

  - `G.set_latex_options`
  - `G.latex_options`
  - `G.latex_options().dot2tex_picture`
  - `G.latex_options().set_option`    <- it might be strange, but a lot of
 doc is in here
  - `G.latex_options().set_options`
  - `G.latex_options().latex`

 It is hard to know where the user will first have the idea that installing
 graphviz + dot2tex could be nice. Personnaly, I found once that
 information here :

  - `G.layout_graphviz?`

 Here is what it says :

 {{{
 This requires "graphviz" and the "dot2tex" spkg. Here are some
 installation tips:

    * Install graphviz >= 2.14 so that the programs dot, neato, ...
      are in your path. The graphviz suite can be download from
      http://graphviz.org.

    * Download dot2tex-2.8.?.spkg from
      http://trac.sagemath.org/sage_trac/ticket/7004 and install it
      with "sage -i dot2tex-2.8.?.spkg"
 }}}

 This does not speak about any graphviz spkg. In fact, I did not know there
 was one. When I saw that doc in the past, I was then able to install
 graphviz properly.

 The information about the dot2tex spgk is obsolete. I suggest to replace
 it by :

 {{{
    * Get the name of the most recent version of dot2tex from
      the sage command ``optional_packages()``. Then,
      install it with ``sage -i dot2tex-2.8.?.spkg``.
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13624#comment:36>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to