June 1st, 2010
Many of python-xml code is probably wrong. Tracing a bug, I found an interesting WTF. A minimal example:
import string
s1 = "\xa0x\xa0"
s2 = u"\xa0x\xa0"
print repr(s1.strip())
print repr(s2.strip())
print repr(s2.strip(string.whitespace))
And what we see in the output?
Read the rest of this entry »
Posted by olpa in python | No Comments »
April 28th, 2010
In some configurations (for example, when using MacTeX), if you copy a TeX-related binary to non-standard location, the tool stops working. More precisely, if a tool uses kpathsea library, special setup is required. More practically, is you compile something like dvisvgm, it might not work.
Read the rest of this entry »
Posted by olpa in TeX | No Comments »
April 26th, 2010
I needed file which was deleted some time ago. Thanks to Subversion, the task is easy as long as you remember the name of the file. Unfortunately, it wasn’t a case. Fortunately, I found a magic spell. In the directory where the file was located, say: svn log –verbose, and the output will contain all the names and the revisions.
Posted by olpa in Uncategorized | No Comments »
April 15th, 2010
My paper “XML to paper publishing with manual intervention” is accepted for XATA 2010 (XML: Aplicações e Tecnologias Associadas), 19 and 20 May, Vila do Conde, Portugal. Abstract:
Read the rest of this entry »
Posted by olpa in publishing, science, TeX, TeXML | No Comments »
March 26th, 2010
In XeTeX, an unicode version of TeX, it’s logical to use unicode math. However, till now (march 2010) unicode math publishing doesn’t work directly out of the box. Here are two solutions, one is fast (and not so wrong) and one is probably the future standard.
Read the rest of this entry »
Posted by olpa in TeX | No Comments »
March 10th, 2010
Time to time, I forget it. Found again in some wiki: “Entering special characters“. In short: ^Vnnn or ^Vxnn. Note also: “how to input diacritic characters“.
Posted by olpa in vim | No Comments »
March 9th, 2010
Probably there is no need to switch from CVS to subversion, but I’m starting to forget the options of the cvs command, therefore decided to migrate. Unfortunately, there is no button “convert” on the site, therefore I had to find how to do it manually.
Read the rest of this entry »
Posted by olpa in Uncategorized | No Comments »
February 12th, 2010
Many OSes have port systems, Mac OS X has too. Macports provides a lot of useful software, but not all. If a software can’t be in the macports for some reason (for example, the software isn’t intended for public), one has to setup a local macports repository.
Read the rest of this entry »
Posted by olpa in Mac | 1 Comment »
February 12th, 2010
To my great surprise, TeXML presentation was not accepted for XML Prague 2010. It’s so unexpected, that I’m even not upset, only puzzled. TeXML is one of a few projects which are somehow revolutionary. Seems it’s my fault I didn’t make it clear. The abstract, the reviews and conclusions follow.
Read the rest of this entry »
Posted by olpa in TeXML | 2 Comments »
December 4th, 2009
In the first part I wrote: “put to a template in your favourite text processor”. Attached is a template (class-file) for LaTeX and an example, the explanations are below.
Read the rest of this entry »
Posted by olpa in chess, TeX | No Comments »
November 27th, 2009
As a part of improvement in chess, it is often recommended to analyze positions. The idea is good, but how to find time to do it? One option is to use otherwise unproductive time: walking, in bus, queues etc. I have printed positions with me, and always can analyze something.
Read the rest of this entry »
Posted by olpa in chess | No Comments »
November 25th, 2009
Bug (?) report: “after switching from LaTeX(pdflatex) to XeTeX(xelatex) as the PDF generator something has ceased to work. Mathematical operators given as unicode characters in math formulas do not show up in the final document.´´
Read the rest of this entry »
Posted by olpa in TeX, TeXML | No Comments »
September 24th, 2009
I purchased “Fritz und Fertig: Schach lernen und trainieren (”Fritz and Chesster: learn to play chess“, other languages also available). My opinion is simple: it’s a masterpiece and the best ever computer game for children.
Unfortunately, I got technical problems. Fortunately, solved them.
Read the rest of this entry »
Posted by olpa in chess, Mac | No Comments »
September 15th, 2009
I’m experimenting with LaTeX and chess. As there is no “for dummies” information in internet, my notes (even if incorrect) could be useful for beginners.
So, the step 1. Print some game or some position.
Read the rest of this entry »
Posted by olpa in chess, TeX | No Comments »
July 20th, 2009
To put an image to a document, LaTeX provides the command “\includegraphics“. As it often happens, due to LaTeX was designed for manual typesetting, this command is a nightmare for automatic generation. For a long time, I use a wrapper to solve 99% of the problems.
Read the rest of this entry »
Posted by olpa in TeX, TeXML | No Comments »
June 12th, 2009
I need to reuse a function in a file. The usual way is just to import this file as a module. But what to do if the name is “bad”? The following doesn’t work:
import foo-bar as foo_bar
foo_bar.callme()
After trials and errors, the desired magic found:
Read the rest of this entry »
Posted by olpa in python | No Comments »
April 27th, 2009
Yes, one installs and configures Samba. All I need is to access a big folder in the read-only mode. The quick and dirty solution is:
Read the rest of this entry »
Posted by olpa in windows, linux | No Comments »
February 22nd, 2009
Consider ‘main.bat‘
call child1.bat
call child2.bat
What happens after ‘child1.bat‘ is finished?
Read the rest of this entry »
Posted by olpa in windows | No Comments »
December 26th, 2008
Extending a virtual disk in vmware
1. Backup!
2. Somewhere in the vmware installation directory, there is a tool named “vmware-vdiskmanager.exe“. There is a lot of options, for resize use “-x“:
vmware-vdiskmanager.exe -x 8Gb ...path.to.vm..../vm_disk.vmdk
(hint: type the command manually, do not copy/paste from web. Otherwise you can get typographical spaces or minuses instead of the usual ones.)
Read the rest of this entry »
Posted by olpa in windows | No Comments »
December 12th, 2008
After a small system upgrade an application started to crash with the message:
*** glibc detected *** sylpheed: double free or corruption (out): 0x0839e818 ***
The right thing is to trace the application and submit a bug report to the author, but I found a fast workaround. Set an environment variable before running the program:
export MALLOC_CHECK_=0
Posted by olpa in linux | No Comments »