#9074: Expand latex support for combinatorial graphs via tkz-graph
----------------------------+-----------------------------------------------
   Reporter:  rbeezer       |       Owner:  jason, ncohen, rlm
       Type:  enhancement   |      Status:  needs_work        
   Priority:  minor         |   Milestone:  sage-4.5          
  Component:  graph theory  |    Keywords:                    
     Author:  Rob Beezer    |    Upstream:  N/A               
   Reviewer:                |      Merged:                    
Work_issues:                |  
----------------------------+-----------------------------------------------
Changes (by jhpalmieri):

  * status:  needs_review => needs_work


Comment:

 I'm getting a doctest failure:
 {{{
 File "/Applications/sage/devel/sage/sage/graphs/graph_latex.py", line 271:
     sage: print latex(G)
 Expected:
     \begin{tikzpicture}
     %
     \useasboundingbox (0,0) rectangle (4.0in,4.0in);
     %
     \definecolor{cv0}{rgb}{0.8,0.8,0.8}
     \definecolor{cfv0}{rgb}{0.0,0.0,1.0}
     \definecolor{clv0}{rgb}{0.0,0.5,0.0}
     \definecolor{cv1}{rgb}{0.8,0.8,0.8}
     \definecolor{cfv1}{rgb}{0.0,0.0,1.0}

 [snip]

 Got:
     \begin{tikzpicture}
     %
     \useasboundingbox (0,0) rectangle (4.0in,4.0in);
     %
     \definecolor{cv0}{rgb}{0.8,0.8,0.8}
     \definecolor{cfv0}{rgb}{0.0,0.0,1.0}
     \definecolor{clv0}{rgb}{0.0,0.5,0.0}
     \definecolor{cv1}{rgb}{0.0,0.0,1.0}
     \definecolor{cfv1}{rgb}{1.0,0.0,1.0}
 }}}
 cv1 and cfv1 are not correct.  I wonder if this is because the examples
 are not being run in order, and so some later example is changing some
 settings before this one gets run.

 Also, as I noted on another ticket, jsMath doesn't know about the
 {{{\LaTeX}}} command, so the simplest solution is just to replace it with
 plain-text {{{LaTeX}}} everywhere.  Try typesetting the reference manual
 with "sage -docbuild reference html -j" to see the jsMath version.

 In line 51 of graph_latex.py, the phrase {{{though at the command line the
 call to jsmath_avoid_list() is only needed in the notebook}}}: delete "at
 the command line".

 Line 605-606:

 {{{
 - ``format`` -- default: 'tkz_graph' -- either 'dot2tex'
    or 'tkz_graph'.
 }}}
 The "or" on the second line doesn't line up with the {{{``}}} on the first
 line, so it doesn't get typeset right.

 While you're fixing these issues, you might want to modify this code:
 {{{
 @cached_function
 def setup_latex_preamble():
   ...
 }}}
 For reasons I don't understand, decorating a function with
 {...@cached_function}}} prevents it from appearing in the reference manual,
 so instead you can change it to the following (note the trailing
 underscores, just used to create a new name similar to the original one):
 {{{
 def setup_latex_preamble_():
   ...

 setup_latex_preamble = cached_function(setup_latex_preamble_)
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9074#comment:7>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to