#8486: Xelatex and Sage notebook
---------------------------+------------------------------------------------
   Reporter:  klee         |       Owner:  tbd       
       Type:  enhancement  |      Status:  needs_work
   Priority:  minor        |   Milestone:  sage-4.3.4
  Component:  misc         |    Keywords:            
     Author:  Kwankyu Lee  |    Upstream:  N/A       
   Reviewer:               |      Merged:            
Work_issues:               |  
---------------------------+------------------------------------------------
Changes (by ddrake):

  * status:  needs_review => needs_work


Comment:

 Hrm, this doesn't pass doctests. The first problem is that the "official"
 way to do deprecation is like this: for the {{{pdflatex}}} function (line
 1188), you should do:
 {{{
 from sage.misc.misc import deprecation
 deprecation('Use engine("pdflatex") instead.')
 if t is None:
     return _Latex_prefs._option["engine"] == "pdflatex"
 self.engine("pdflatex")
 }}}
 and then in the first doctest that uses the function:
 {{{
 sage: latex.pdflatex()
 doctest:1: DeprecationWarning: Use engine("pdflatex") instead.
 False
 }}}
 Also, I see that the {{{pdflatex}}} function never unsets the pdflatex
 engine -- I think we need
 {{{
 if t is None:
     return _Latex_prefs._option["engine"] == "pdflatex"
 elif t:
     self.engine("pdflatex")
 else:
     self.engine("latex")
 }}}
 so that {{{pdflatex(False)}}} does properly reset the engine.

 Finally, in the {{{png}}} function (line 1749 or so), you need to change
 the pdflatex keyword to engine, and change the {{{_run_latex_}}} command
 on line 1795 or so.

 Hmmm, it seems like the {{{view}}} command can call {{{png}} with the
 pdflatex keyword: see line 1721 or so (I've fiddled with latex.py, so my
 line numbers are a bit off):
 {{{
 png(objects, os.path.join(base_dir, png_file),
                 debug=debug, do_in_background=False, pdflatex=pdflatex)
 }}}
 I think you'll need to move up the little snippet where you use the
 pdflatex keyword to decide what engine to use.

 With these changes, doctests should pass.

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