Skip to content →

Category: web

quiver pictures in wordpress

Having

latexrender
available, one can edit the _class.latexrender.php_ file
to include additional LaTeX-packages. For example adding the lines

string .= '\usepackage{xy}\n';
string .= '\xyoption{all}\n';
string .= '\newcommand{\vtx}[1]{*+[o][F-]{\scriptscriptstyle #1}}\n';

makes it possible to include quiver-pictures in this weblog.
Observe the double blackslash before newcommand, a single backslash
would produce a new-line and fail to define something.

Leave a Comment

LatexRender plugin for wordpress under Panther

After
three days of desperate trial-and-error I seem to have managed to get latexrender working for
wordpress under Mac
OS X.
First things first : if you only want to include some
symbols in your blog-posts the easiest way to do so is to use mimetex and the
corresponding
wordpress-plugin
written by Steve Mayer. Follow the
instructions and you will be able to include a limited subset of LaTeX
in your blog within 10 minutes.
If you want more, you have to
work a lot harder. The starting point is to follow Steve’s
blog-entries on latexrender
.
But then under Mac OS X you will probably get error messages
when you activate the plugin. The reason seems to be that most versions
of imagemagick available for
OS X require X-terminal support and PHP gets confused between the two
shells. A typical error message is

Warning:
copy(70afbabac176169545d01f4bd91f3055.gif): failed to open
stream:
No such file or directory in
/Users/lieven/Sites/wordpress/latexrender/class.latexrender.php on
line
269

[Unparseable or potentially dangerous latex
formula. Error 6 ]

As suggested by Steve Mayer there are
two roads to obtain more information on what goes wrong. The first is to
uncomment the _unlink commands _ at the end of the
_class.latexrender.php_ file and look in the _wordpress/latexrender/tmp_
directory for which conversions were done and which failed. The normal
latexrender-procedure is : tex->dvi->ps->gif. Probably you will
get all files but the gifs!

Another (and more useful) source of
informations is to look in the _error-log_ of the Apache-WebServer and
see whether you get things like

This is dvips(k) 5.94a
Copyright 2003 Radical Eye Software (www.radicaleye.com)
\\’
TeX output 2004.08.30:1433\\’ ->
0d48700a5dde6d746813733d26dd8df8.ps

. [1]
sh: line 1:
gs: command not found
convert: no decode delegate for this image
format

/Users/lieven/Sites/weblog/latexrender/tmp/
0d48700a5dde6d746813733d26dd8df8.ps\\’.

convert: missing an image
filename/Users/lieven/Sites/weblog/latexrender/tmp/
0d48700a5dde6d746813733d26dd8df8.gif\\’.

identify: unable to
open image 0d48700a5dde6d746813733d26dd8df8.gif\\': No such file
or directory.
identify: missing an image
filename
0d48700a5dde6d746813733d26dd8df8.gif\\’.
`

Here the essential point is that the webserver doesn’t
seem to be able to find GhostScript (even if you have several versions
installed).

To bypass these problems I did two essential
things : (1) in the _class.latexrender.php_ file I rewrote the
conversions so as to use _pdflatex_ instead of tex (to get
immediately a pdf-file rather than the tex->dvi->ps process) and then
use _convert_ to translate this pdf-file into a gif-file. (2) the
version of _convert_ and _include_ (both part of the
ImageMagick package) are those provided by Fink but you should be extremely
careful to install the imagemagick-nox package and not
the imagemagick package! After the command
sudo fink
install imagemagick-nox

you are presented with several
configuration choices. Do _not_ choose on auto-pilot the default
choices but look for options specifying that there is no X-support!
After this, everything should work. If you want to have a look at how
I changed the PHP files, mail
me
.

Leave a Comment

a spider for Paul Smithโ€™s list

One
of the best collections of links to homepages of people working in
non-commutative algebra and/or geometry is maintained by Paul Smith. At regular intervals I use it to check
up on some people, usually in vain as nobody seems to update their
homepage… So, today I wrote a simple spider to check for updates in
this list. The idea is simple : it tries to get the link (and when this
fails it reports that the link seems to be broken), it saves a text-copy
of the page (using lynx) on disc which it will check on a future
check-up for changes with diff. Btw. for OS X-people I got
lynx from the Fink Project. It then collects all data (broken
links, time of last visit and time of last change and recent updates) in
RSS-feeds for which an HTML-version is maintained at the geoMetry-site, again
using server side includes. If you see a 1970-date this means that I
have never detected a change since I let this spider loose (today).
Also, the list of pages is not alphabetic, even to me it is a surprise
how the next list will look. As I check for changes with diff the
claimed number of changed lines is by far accurate (the total of lines
from the first change made to the end of the file might be a better
approximation of reality… I will change this soon).
Clearly,
all of this is still experimental so please give me feedback if you
notice something wrong with these lists. Also I plan to extend this list
substantially over the next weeks (for example, Paul Smith himself is
not present in his own list…). So, if you want your pages to be
included, let me know at lieven.lebruyn@ua.ac.be.
For those on Paul\’s list, if you looked at your log-files today
you may have noticed a lot of traffic from lievenlb.local as
I was testing the script. I\’ll keep my further visits down to once a
day, at most…

Leave a Comment