| Problems |
Known Internal Problems:
As yet, there are no known serious problems with skLaTeX (...give it time! ;-) ). But, skLaTeX does have a few quirks. Some of the quirks are the product of issues suffered by PIL and pstoedit. Other quirks are the result of my inexperience programming Python and Tkinter. It should be noted that these known issues do not effect the functionality of skLaTeX, but rather act as annoyances.
As the problems roll in, I will add then to this list.
1. Cursor moves to end of editor on undo:SkLaTeX's undo mechanism simply replaces the current text with the previous text. The standard "replace" method for the scrolled text widget does just that, but it also puts the cursor at the end of the text. Thus, after an undo, the cursor moves the end of the text in the editor. When you work with few lines this quirk is not noticeable. But when you work with multiple lines (with many lines not in the visible focus) this can be distracting. Hopefully this quirk will be solved by version 1.0.
When you change a formula from display to in-line (or vise versa) the skLaTeX object shifts horizontally on the Skencil canvas. Oddly (actually, logically), if you switch the formula back to display, the skLaTeX object will move back to it's original position. If you are zoomed-in on the object, it may seem like the object disappeared (the object really just shifted out of focus,). Changing environments in text mode (for example, center to flushleft) will produce the same problem, but the shift is vertical. I have no idea why this happens. My guess (and it's just that), is that the bound box for a display formula is different from an line formula and Skencil handles it as such.
Math braces and some variable-sized symbols (when viewed alone) display cut-off in the skLaTeX PS viewer. The placed object is correct, so it's only the preview that is malformed. The problem is most likely how PIL displays the PS file. This is a very minor issue - but worth sharing. Figure 8 (below) shows a cut-off under bracing.
|
Fig. 8: A math under bracing displays cut-off |
The display is cut-off (left), but the placed object is just fine (right). |
Pstoedit
SkLaTeX version 0.9.2e works with the following versions of pstoedit:
Pstoedit version 3.33 or 3.44 are the recommended versions to use.
If you are compiling pstoedit for skLaTeX, note that libemf, libplot and ImageMagick are not required. To compile pstoedit without these libraries use the below configuration options (before "make" and "make install"):
./configure --without-magick --without-emf --without-libplot
The pstoedit web site only provides the latest versions of their utility, so I have added the pstoedit 3.33 tarball to this web site. The pstoedit 3.33 tarball is located underneath the skLaTeX tarball.
teTeX
SkLaTeX works with teTeX 2.x and 3.x. SkLaTeX does NOT work with teTeX 1.x (this will not be looked at). SkLaTeX is know to work with teTeX 3.0 under SuSE 9.3 and Debian (latest). Under Solaris 8, using the sunfreeware package, teTeX 3.0 does not work (the sunfreeware.com 2.x version package does work). I will look over this problem some time in the near future, it seems to be a configuration problem with the package.
PIL
Skencil only requires the PIL imaging library ("imaging.so"). In addition to the PIL imaging library, skLaTeX requires the imaging TK extension. That is, both "_imaging.so" and "_imagingtk.so" are required for skLaTeX to work. If you compile PIL make sure to compile both libraries. Also note that some Linux distributions separate these two libraries into two packages.
Known Platform Problems:
SuSE Linux and Python 2.3 (with work-arounds)
1. SuSE Linux 8.2 to 9.2 - KDE:While making SuSE RPMs I discovered a problem with skLaTeX and SuSE Linux 8.2 to 9.2 running KDE. If Skencil is launched from a icon launcher (i.e. "link to application") the skLaTeX PS viewer does not display the formula and the error message "Display image not recognized" is thrown. The placement of the Skencil objects works despite this error.
The problem seems to be related to PIL's PhotoImage method and ghostscript viewing PostScript files on some systems. (The problem is not present on SuSE if you view a non PostScript file, like a jpeg.)
A simple work around to this problem is to start Skencil from a terminal. Alternatively, you can configure a desktop icon launcher to run Skencil in a terminal. Simply right mouse on the icon and select Properties -> Application tab -> Advanced Options -> Terminal - select "Run in Terminal" check box. It would not be a bad idea to unselected the "Enable launch feedback" check box.).
2. SuSE 9.0, 9.1 and 9.2 - Python 2.3:
SuSE Linux 9.0, 9.1 and 9.2 use Python 2.3.0, 2.3.3 and 2.3.4 respectively. There are bugs with Tkinter in these version of Python which effect skLaTeX (and other Skencil plugins) that SuSE has not yet fixed. There are work-arounds to these bugs for those SuSE users who do not have a compiler to install the latest Python 2.3.
Bug 843999 tkFileDialog Open is broken. When trying to open a file with the method askopenfilename(s) the following error is thrown: "TypeError: wantobjects() takes exactly 1 argument (0 given)". This bug effects skLaTeX's open file method and the multiline text load method (both use askopenfilename). The offending code is line 89 of the file /usr/lib/python/lib-tk/tkFileDialog.py. The line 89 is shown below:
if not widget.tk.wantobjects() and "multiple" in self.options:
To my understanding it is technically the code in _Tkinter.c that is the problem and not line 89 of tkFileDialog.py. Never-the-less, the method wantobjects expects an integer for its argument. The valid integers I am aware of are 1 and -1. One simple work-around is to supply an argument to the method. The below is a work-around (using 1 as the argument):
if not widget.tk.wantobjects(1) and "multiple" in self.options:
For me, this seems to "solve" the problem and does not seem to cause ill-effects with Python (yet...). It is important to note that this work-around is not a solution to this bug or even the best work-around. If making this change causes any problems with Python on your system, simply change the line back to it's original state and avoid using the skLaTeX open option and the multiline text load option.
Is it a good idea to modify Python distribution files? No! But I know just enough Python to be dangerous ;-).
3. SuSE 9.0 - Python 2.3.0 only:
In addition to the above bug SuSE 9.0/Python 2.3.0 has an additional bug(s) that effects skLaTeX. One bug is related to the bug 852314 tkFileDialog.askdirectory returns path objects. This bug produces the error message: "Message: Coercing to unicode: need string or buffer. _tkinter,Tcl_Obj found." (Also related is that Pmw seems to not like Tcl Objects - the passing of Tcl objects is a new feature of Python 2.3+). This can be "fixed" by modifying one line of the skLaTeX code. The line to modify is line 399 of the file ~/skencil-version/Plugins/Objects/Lib/sklatex/TextEditor.py. To make it more simple to see the change that needs to be made, the options of the method are omitted:
fileName = tkFileDialog.asksaveasfilename( -lots of options- )
Wrapping the right side of the equation with the str() method seems to do the trick.
fileName = str(tkFileDialog.asksaveasfilename( -lots of options- ))
Some Debian Based Linux Systems
I have been informed that Debian based Linux systems (such as Xandros Linux 3.x; which uses KDE) have a similar problem to that of SuSE/KDE PS display of formulas. Though in the case of Debian based systems, skLaTeX will crash Skencil when trying to view the formula. Again, the Skencil object will place on the Skencil canvas without a problem. Unfortunately, I am unaware of a work around for the Debian based Linux systems. (Starting Skencil from a terminal has no effect in this case).
I've looked over this issue with Debian 3.0r2 and made little head way. I even had serious problems installing skLaTeX for Skencil on the Debian Linux box I had. (My knowledge of Debian is on the server side - minimal install; no X.) It seems like this issue will take more time to figure out than I first thought.
It should be noted that Debian Sarge (The new "testing" version of Debian available on the Internet) is reported not to have this problem. In addition, Debian Sarge comes with pstoedit, python-imaging-tk as well as Ghostscript.