#10146: update SageTeX spkg to version 2.3
----------------------------------------------------+-----------------------
   Reporter:  ddrake                                |       Owner:  ddrake    
       Type:  enhancement                           |      Status:  needs_work
   Priority:  major                                 |   Milestone:  sage-4.7  
  Component:  packages                              |    Keywords:            
     Author:  Dan Drake                             |    Upstream:  N/A       
   Reviewer:                                        |      Merged:            
Work_issues:  spacing before/after sagecommandline  |  
----------------------------------------------------+-----------------------
Changes (by novoselt):

  * priority:  minor => major
  * status:  needs_review => needs_work
  * work_issues:  => spacing before/after sagecommandline


Comment:

 OK, I have found fixes for the vertical space issues both before and
 after. In the sagetex.py file (I am not sure where the original is
 supposed to be, I was fixing the version in `sage/local/lib/python2.6
 /site-packages`).

 Lines 77-78 should be
 {{{
     self.souttmp.write('\\newlabel{@sageinline' + str(counter) + '}{{%\n'
 +
                  s.rstrip() + '}}\n')
 }}}
 I have removed four pairs of `{}` before the newline. It may be not the
 proper place/way to do it, but the main idea is that these braces should
 not appear on the last line of every command line listing in
 `*.sagetex.sout`. This seems to fix the issue with extra space appearing
 after sagecommandline, if the following text starts a new paragraph or a
 theorem.

 Line 145 should be
 {{{
       latex_string = r"\unskip\unskip\vspace{\sagecommandlineskip}" + "\n"
 }}}
 Two unskips eliminate the space before sagecommandline which was appearing
 if the preceding line was "full." One unskip does not work, what is the
 correct number of them I don't know, but I took the repetition idea from
 `amsthm.sty` which contains
 {{{
 \ifhmode\unskip\unskip\par\fi
 }}}
 on line 140.

 It is possible that `\ignorespaces` should be used somehow in the end of
 blocks for even more robust behaviour.

 Please include these fixes, for these spacing issues are really annoying
 and it is somewhat non-trivial to figure out a workaround ;-)

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