#11311: engine="pdflatex" in view is ignored
----------------------------------------------+-----------------------------
    Reporter:  saliola                        |         Owner:  jason, was      
                                  
        Type:  defect                         |        Status:  new             
                                  
    Priority:  major                          |     Milestone:  sage-4.8        
                                  
   Component:  graphics                       |    Resolution:                  
                                  
    Keywords:  latex, pdflatex, days30        |   Work_issues:                  
                                  
    Upstream:  N/A                            |      Reviewer:  Karl-Dieter 
Crisman, Franco Saliola, John Palmieri
      Author:  Franco Saliola, John Palmieri  |        Merged:                  
                                  
Dependencies:                                 |  
----------------------------------------------+-----------------------------

Comment(by kcrisman):

 This seems to have been introduced (or expanded, at least) in #8486.
 {{{
     if engine and not have_pdflatex() and not have_xelatex():
                 print "Error: %s does not seem to be installed.  Download
 it from" % _Latex_prefs._option["engine_name"]
 }}}
 so `engine` is certainly `True` since it's nonempty, and we definitely
 don't have any of those things.  And it first checks whether one has
 LaTeX, before it checks the engines.

 Now we have
 {{{
 sage: sage.misc.latex._Latex_prefs._option
 {'engine': 'latex', 'matrix_delimiters': ['(', ')'], 'jsmath_avoid': [],
 'engine_name': 'LaTeX', 'blackboard_bold': False, 'macros': '',
 'vector_delimiters': ['(', ')'], 'preamble': ''}
 }}}
 in a regular install.  The question is whether there is anywhere `engine`
 gets reset...

 Aha!  [http://hg.sagemath.org/sage-
 main/file/9e29a3d84c48/sage/misc/latex.py#l1404 Line 1404] (of the current
 4.7.2) shows that this is set to `xelatex` and then not reset.
 Apparently the doctest framework doesn't clear this, I'm not sure exactly
 where this all lives.

 Solution should be:
  * Fix the reset of the engine
  * Leave the error message and `# random` it.   Or even include both error
 messages so that the documentation shows exactly what we expect with and
 without a working LaTeX installation.

 What do you think?

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