Monday, July 23, 2007

[Linux] Bug in EPS export

When I try to export an OpenOffice.org drawing to EPS, the right and bottom parts of the drawing
are not shown, even though the bounding box seems right.
This bug started to occur when I upgraded to 2.2.1, although earlier versions
worked fine for me (I would guess the upgrade was from 2.2.0, but I am not
sure). Something definitely changed in recent versions regarding to EPS export
that caused things to stop working.

WORKAROUND 1) Select the whole drawing, then export. For some reason
it works like this.

WORKAROUND 2) Increase the margins by dragging
the margins to be far from the object. This screws-up the bounding box, but at
least the whole object is drawn. I then edit the eps file using a text
editor (vim),
and adjust the bounding box values according to the values I determine by
inspecting the drawing in ghostview ('gv'). The cursor in 'gv' shows the
bounding box value.

http://qa.openoffice.org/issues/show_bug.cgi?id=76048

Keywords: cut-off, draw, impress, latex, bounding box, margins, eps, postscript

[Linux] Printing with CUPS

I was trying to use the KDE control pannel to add printers to my
system, but I would get:
"unable to create temporary printer"

I also had a perfectly working printer, which suddenly became "not
ready" from the acrobat printing menu. When I opened the KDE printing
control panel, and tried "start printer", I got
client-error-not-found

The solution was to add the printer through the CUPS web interface,
which is actually very good. The way to do it is to open the following
link in your browser (konqueror/firefox):

http://localhost:631/

And add the printer from there. The process was straightforward for my
Lexmark Optra T612.
For the record, my CUPS version is 1.2.10. Maybe I updated CUPS and
the KDE print manager got lost? Go figure.. at least I will only use
the CUPS web interface from now on.

Tuesday, July 17, 2007

Birthday photos / Fotos do aniversario!

Check out my Birthday photos are at:
Vejam as Fotos do meu aniversario em:

http://cortex.lems.brown.edu/~rfabbri/gallery

Sunday, July 08, 2007

[Linux] Text encoding

I recently had a problem with special Portuguese characters and latex.
The problem is that the input must be in latin1 encoding, and I was
using utf-8 to edit an input file. It took me quite a while to figure
out why latex would not compile my recently edited file, but would
nicely compile my old files written in Portuguese. The error I was
getting was:

"Command \textcent unavailable in encoding T1"

Your command was ignored.

whenever a special symbol was found (for instance, the letter 'a'
circumflex). After studying encodings, unicode, ascii, latin1, and
also searching for similar errors, I found that Latex does not fully
support UTF-8 (as of this date), and that the input should be encoded
in latin1. The way to check the encoding of a file in VIM is to open
the file and type:

:set fileencoding

if it is utf-8 or anything other than 'latin1', you will get error
messages. So it really turned out that some recently edited files of
mine were in utf-8. My solution was then to type

:set fileencoding=latin1

inside GVIM, and save file, re-run latex and .... done.

PS: my latex preamble has the following:

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[portuges]{babel}

I am using tetex-3.0_p1-r3