Skip to content →

Tag: LaTeX

mathML versus LaTeXRender

No math
today. If you’re interested in the latest on noncommutative geometry,
head over to the NCG-blog where Alain Connes has a post on
Time.
Still, Alain’s post is a good illustration of what Ill be rambling about
TeX and how to use it in a blog.

If you’re running a math-blog,
sooner or later you want to say something more than new-age speak like
‘points talking to each other’ and get to the essence of it. In short,
you want to talk math and it’s a regrettable fact that math doesnt go
well with ASCII. In everyday life we found a way around this : we all
use TeX to write papers and even email-wise (among mathematicians) we
write plain TeX-commands as this language is more common to us than
English. But, plain TeX and the blogosphere don’t mix well. If you’re
expecting only professional mathematicians to read what you write, you
might as well arXiv your thoughts. Im convinced the majority of people
coming here (for whatever reason) dont speak plain-TeX. Fortunately,
there is technology to display TeX-symbols on a blog. Personally, I was
an early adapter to
LaTeXRender and even today a
fair share of page-views relates to the few
posts I did on
how to get latexrender working on a mac. Some time ago I
switched to mathML and now I’m
regretting I ever did…

Mind you, I’m convinced that mathML is the
‘proper’ way to get TeX to the internet but there are at the moment some
serious drawbacks. For starters, it is highly user-unfriendly. You
simply cannot expect people to switch browsers (as well as installing
extra fonts) just because they come to your site (or you have to be a
pretty arrogant git). Speaking for myself, Im still having (against my
better judgment) Safari as my default browser, so when I come to a site
like the n-category cafe I just
skim the plain-text in between and if (and only if) the topic interests
me tremendously I’ll allow myself to switch to Flock or Firefox to read
the post in detail. I’m convinced most of you have a similar
surfing-attitude. MathML also has serious consequences on the
server-side. If you want to serve mathML you have to emit headers which
expect everything to follow to be purified XHTML. If I ever forget a
closing tag in a post, this is enough to break down NeverEndingBooks to
all Firefox-users. I’ve been writing HTML since the times when the best
browser around was something called NCSA Mosaic so Ive a
pretty lax attitude to end-tags (especially in IMG-tags) and Im just
getting too old to change these bad habbits now… It seems I’m not the
only one. Many developers of WordPress-plugins write bad XHTML-code, so
the last couple of weeks I’ve been spending more time fixing up code
than writing posts. If you want to run a mathML-wordpress site you might
find the following hints helpfull. If you get a ‘yellow screen of
death’ when viewing your site with Firefox, chances are that one of your
plugin-authors missed a closing tag in the HTML-rendering of his/her
plugin. As a rule of thumb : go for the IMG-tags first! I’m sorry to
say, but Latexrender-Steve
is among the XHTML-offenders. (On a marginal note, LaTeXrender also has
its drawbacks : to mathematicians this may seem incredible but what
Latexrender does to get one expression displayed is to TeX an entire
file, get the image from the ps-file turn it into a gif and display it,
so one gets a GIF-folder of enrmous proportions. Hence, use Latexrender
only if you have your own server and dont have to care about memory
constraints. Another disadvantedge was that the GIFs were displayed with
a vertical offset, but this has been solved recently (use the ‘offset
beta’ files in the distribution)). Wrt. to that offset-beta version, use
this latex.php file instead (I
changed the IMG-line). Some plugins may not serve the correct headers
to display mathML. So, if you want to allow readers to have a
printer-friendly version of your mathML-post, get the WP-print plugin BUT
change to this wp-print.php file in order to
send the proper headers. Sometimes there are just forgotten lines/tags
in the code, such as in the [future calendar plugin](http://anthologyoi.com/wordpress/plugins/future-posts-calendar-
plugin.html). So, please use this version
of the future.calendar.php file. And so on, and so on. The joys of
trying to maintain a mathML-based blog… So, no surprise I’m seriously
considering to ditch mathML and change to normal headers soon. One of
the things I like about LaTeXRender is that it can be extended, meaning
that you can get your own definitions and packages loaded whereas with
mathML you’re bound to write iTeX, which Ill never manage. But, again,
mathML will be the correct technology once all major browsers are mathML
capable and the font-problem is resolved. Does anyone know whether
Safari 3 (in Leopard, that is Mac OS 10.5 to the rest of you) will be
mathML-able?

Leave a Comment

the father of all beamer talks

Who was the first mathematician to give a slide show talk? I don’t have the
definite answer to this question, but would like to offer a strong
candidate : Hermann Minkowski gave the talk “Zur Geometrie der Zahlen” (On the
geometry of numbers) before the third ICM in 1904 in Heidelberg and even
the title page of his paper in the proceedings indicates that he did
present his talk using slides (Mit Projektionsbildern auf einer
Doppeltafel)

Seven
of these eight slides would be hard to improve using LaTeX

What concerns
us today is the worst of all slides, the seventh, where Minkowski tries
to depict his famous questionmark function $?(x) $, sometimes also called
the _devil’s staircase_

The devil’s
staircase is a fractal curve and can be viewed as a mirror (taking a
point on the horizontal axis to the point on the vertical axis through
the function value) having magical simplifying properties : – it takes
rational numbers to _dyadic numbers_, that is those of the form
$n.2^{-m}$ with $n,m \in \mathbb{Z} $. – it takes quadratic
_irrational_ numbers to rational numbers. So, iterating this
mirror-procedure, the devil’s staircase is a device solving the main
problem of Greek Mathematics : which lengths can be constructed using
ruler and compass? These _constructible numbers_ are precisely those
real numbers which become after a finite number of devil-mirrors a
dyadic number. The proofs of these facts are not very difficult but
they involve a piece of long-forgotten mathematical technology :
_continued fractions_. By repeted approximations using the
floor-function (the largest natural number less than or equal to the real
number), every positive real number can be written as

$a = a_0 +
\frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + \frac{1}{\dots}}}} $

with all $a_i $ natural numbers. So, let us just denote from now on this
continued fraction of a by the expression

$a = \langle
a_0;a_1,a_2,a_3,\dots \rangle $

Clearly, a is a rational number if
(and also if but this requires a small argument using the Euclidian
algorithm) the above description has a tail of zeroes at the end and
(slightly more difficult) $a$ is a real quadratic irrational number
(that is, an element of a quadratic extension field
$\mathbb{Q}\sqrt{n} $) if and only if the continued fraction-expression
has a periodic tail. There is a lot more to say about
continued-fraction expressions and I’ll do that in another
‘virtual-course-post’ (those prepended with a (c): sign). For the
impatient let me just say that two real numbers will lie in the same
$GL_2(\mathbb{Z}) $-orbit (under the action via Moebius-transformations)
if and only if their continued fraction expressions have the same tails
eventually (which has applications in noncommutative geometry as in the
work of Manin and Marcolli but maybe I’ll come to this in the (c):
posts).

Right, now we can define the mysterious devil-stair function
$?(x) $. If a is in the real interval $[0,1] $ and if $a \in
\mathbb{Q} $ then $a = \langle 0;a_1,a_2,\dots,a_n,0,0,\dots
\rangle $ and we define $?(a) = 2 \sum_{k=1}^{n} (-1)^k
2^{-(a_1+a_2+\dots+a_k)} $ and if a is irrational with continued
fraction expression $a = \langle 0;a_1,a_2,a_3,\dots \rangle $, then

$?(a) = 2 \sum_{k=1}^{\infty} (-1)^{k+1} 2^{-(a_1+a_2+\dots+a_k)} $

A
perhaps easier description is that with the above continued-fraction
expression, the _binary_ expansion of $?(a) $ has the following form

$?(a) = 0,0 \dots 01 \dots 1 0 \dots 0 1 \dots 1 0 \dots 0 1 \dots
1 0 \dots $

where the first batch of zeroes after the comma has length
$a_1-1 $, the first batch of ones has length $a_2 $ the next batch of
zeroes length $a_3 $ and so on.

It is a pleasant exercise to verify that
this function does indeed have the properties we claimed before. A
recent incarnation of the question mark function is in Conway’s game of
_contorted fractions_. A typical position consists of a finite number of
boxed real numbers, for example the position might be

$\boxed{\pi} + \boxed{\sqrt{2}} + \boxed{1728} +
\boxed{-\frac{1}{3}} $

The Rules of the game are : (1) Both
players L and R take turns modifying just one of the numbers such that
the denominator becomes strictly smaller (irrational numbers are
supposed to have $\infty$ as their ‘denominator’). And if the boxed
number is already an integer, then its absolute value must decrease.
(2) Left must always _decrease_ the value of the boxed number, Right
must always increase it. (3) The first player unable to move looses
the game. To decide who wins a particular game, one needs to compute
the value of a position $\boxed{x} $ according to the rules of
combinatorial game theory (see for example the marvelous series of four
books Winning Ways for your Mathematical Plays. It turns out that this CG-value is no other than $?(x)$
… And, Conway has a much improved depiction of the devil-staircase in
his book On Numbers And Games

Leave a Comment