#13232: LaTeX export for plots
---------------------------------------------------------------------+------
       Reporter:  nthiery                                            |         
Owner:  jason, was
           Type:  enhancement                                        |        
Status:  new       
       Priority:  major                                              |     
Milestone:  sage-5.3  
      Component:  graphics                                           |    
Resolution:            
       Keywords:  latex, plot                                        |   Work 
issues:            
Report Upstream:  N/A                                                |     
Reviewers:            
        Authors:  Thomas Ayoub, Bertheville ChloƩ,  Arthur Mauvezin  |     
Merged in:            
   Dependencies:                                                     |      
Stopgaps:            
---------------------------------------------------------------------+------

Comment (by nthiery):

 Replying to [comment:7 ppurka]:
 > Some minor comments:
 > 1. Is it necessary or useful to add `_latex` method to
 `GraphicsPrimitive` and override that from the `arc`, `line`, etc? I think
 this method is used only in `Graphics` so that only one
 `\begin{tikzpicture}` is used, right? Since the classes `Arc`, `Line`, etc
 are not exposed hence it doesn't seem to matter whether the method is
 named `latex` or `_latex`. I am not sure which is the correct approach
 here, so I am just curious.

 In any cases, all the methods should be named _latex_, for consistency
 with SageObject. At this point, I don't see a use for having _latex_ in
 GraphicsPrimitive, since there is already a default (admittedly pretty
 useless in this case) implementation in SageObject.

 > 2. Should it return an empty string from `Graphics` if there are no
 objects in it? Again, I am just wondering because I am not sure which
 behavior is more appropriate. Currently, this patch results in the
 following behavior:
 > {{{
 > sage: G = Graphics()
 > sage: latex(G)
 > \begin{tikzpicture}
 >
 > \end{tikzpicture}
 > sage: len(G)
 > 0
 > }}}

 That's sounds reasonable; let's not introduce a special case.

 > 3. The check for `None` should be done by using `is` or `is not`,
 according to [http://www.python.org/dev/peps/pep-0008/#programming-
 recommendations this PEP].

 +1

 Thanks for your comments!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13232#comment:8>
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