skip to main content.

posts about latex.

today i discovered why sometimes, some of my latex output contains tildes (~) in the dvi/pdf version. usually, if you use a tilde in a tex file, it is interpreted as a non-breakable space (except in special circumstances, such as verbatim environments or in \url{…}). but thanks to a “bugfix” to texi2dvi/texi2pdf, which is a wonderful tool as it runs (pdf)latex often enough together with bibtex, makeindex etc., tildes appearing in tex files are now shown as tildes in the dvi/pdf output. which is absolutely inacceptable behaviour.
it seems that this already was reported (see here, here, here), but it is still around. i don’t really know what to think of this – is nobody responsible for working on texi2dvi/texi2pdf? or did people stop using it as it is broken?
anyway, i fixed my local installed version (/usr/bin/texi2dvi) by chaning the line catcode_special=true to catcode_special=false. a more sophisticated version would be nice, which only changes catcode_special for tex files (and not for texinfo files), but i don’t have time for that now.

today i had a problem with latex. i’m working on graphical output of computational results, and created graphical representation of certain large matrices using libpng, and wanted to include these graphics into the automatically generated .tex files which present the results. it turned out that latex got stuck when image file names such as 1.4-0.362578-10.transform.png turn up, complaining that 4-0.362578-10.transform.png is an unknown file extension. after doing a little research, i found the grffile latex package. including it solved the problem right away… maybe some more people find this useful.

posted in: computer
tags:
places:

i finally started another project: a math blog. the aim of this one is to write about mathematical things which interest me, for example things related to my research. the formulae will be rendered with latex; mathml is simply unuseable so far.
an example post shows a feature with i added to my wp-latex enhancer plugin: (primitive) environments for definitions, theorems, proofs, etc., including a very basic labeling system allowing hyperlinks which jump to the right environment; for example, here’s a link to a lemma in the post. the post features my favorite proof of the fundamental theorem of algebra, using complex analysis.

posted in: computer math www
tags:
places:

i was thinking on using latex in maybe some blog entries, maybe here or maybe somewhere else. so i decided to see what existing plugins there are. after a bit of searching, i stumbled over wp-latex, which is apparently also used by wordpress.com. unfortunately, it has a kind of clumsy syntax (“$latex formula$” instead of simply “$formula$”). and it has no support for display style formulae, i.e. something centered in its own line, as opposed to inline formulae which try to fit neatly into the text.

so i tried to fix that. and it worked out, and i can still use a “normal” $ by appending a blackslash in front of it. well, euler's identity is e^{i \pi} + 1 = 0, as simple as that. if you want to see something more complicated:

let K be a number field or an algebraic function field. then, we have the following commutative diagram with exact rows and columns:

\xymatrix{ & 0 \ar[d] & 0 \ar[d] & 0 \ar[d] & \\ 0 \ar[r] & \calO^* / k^* \ar[r] \ar[d] & \Div^0_\infty(K) \ar[r] \ar[d] & T \ar[r] \ar[d] & 0 \\ 0 \ar[r] & K^* / k^* \ar[r] \ar[d] & \Div^0(K) \ar[r] \ar[d] & \Pic^0(K) \ar[r] \ar[d] & 0 \\ 0 \ar[r] & K^* / \calO^* \ar[r] \ar[d] & \Id(\calO) \ar[r] \ar[d] & \Pic(\calO) \ar[r] \ar[d] & 0 \\ & 0 & H \ar@{=}[r] \ar[d] & H \ar[d] & \\ & & 0 & 0 & }

here, T simply denotes the cokernel of the map \calO^* \to \Div^0_\infty(K) which assigns to every unit \varepsilon \in \calO^* its principal divisor (\varepsilon); in particular, T \cong \Div^0_\infty(K) / (\Princ(K) \cap \Div^0_\infty(K)). finally, H denotes the cokernel of the degree map \Div(K) \to \G, where in the number field case, \G = \R, and in the function field case, \G = \Z.

this is written as follows:

 1 let \$K\$ be a number field or an algebraic function field. then,
 2 we have the following commutative diagram with exact rows and 
 3 columns: 
 4 \$\$\xymatrix{ & 0 \ar[d] & 0 \ar[d] & 0 \ar[d] & \\ 0 \ar[r] & 
 5 \calO^*  / k^* \ar[r] \ar[d] & \Div^0_\infty(K) \ar[r] \ar[d] & 
 6 T \ar[r] \ar[d] & 0 \\ 0 \ar[r] & K^* / k^* \ar[r] \ar[d] & 
 7 \Div^0(K) \ar[r] \ar[d] & \Pic^0(K) \ar[r] \ar[d] & 0 \\ 0 \ar[r]
 8 & K^* / \calO^* \ar[r] \ar[d] & \Id(\calO) \ar[r] \ar[d] & 
 9 \Pic(\calO) \ar[r] \ar[d] & 0 \\ & 0 & H \ar@{=}[r] \ar[d] & H 
10 \ar[d] & \\ & & 0 & 0 & }\$\$
11 here, \$T\$ simply denotes the cokernel of the map \$\calO^* \to
12 \Div^0_\infty(K)\$ which assigns to every unit \$\varepsilon \in 
13 \calO^*\$ its principal divisor \$(\varepsilon)\$; in particular, 
14 \$T \cong \Div^0_\infty(K) / (\Princ(K) \cap \Div^0_\infty(K))\$. 
15 finally, \$H\$ denotes the cokernel of the degree map \$\Div(K) \to 
16 \G\$, where in the number field case, \$\G = \R\$, and in the 
17 function field case, \$\G = \Z\$.

note that this example also shows a problem: namely, the vertical alignment of the inline formulae sucks bigtime. let's see how to fix this...

posted in: math www
tags:
places:

i’ve always thought that mathml is a great idea, allowing you to write formulae in html which look good afterwards. or so i thought. then, today, i saw this. at least in my browser (firefox 2.0.0.6), i have the feeling that word by default produces nicer formulae than this. then, i started searching the web for other examples, maybe it is possible to produce better output. but then, even when looking at (seemingly) standard examples as this and this (the latter supposed to display that 44.997 is an element of the reals), i’m shocked how bad this looks, if it works after all (the first did, more or less, and the latter didn’t). i mean, i know that it might be illusive to expect that the formulae look as good as in latex, but i would have at least expected them to be rendered correctly…
well, i’d guess the only way is to stick to rendering formulae with latex and including them as images, as it is standard practice on basically all sites displaying good looking formulae on the web, as wikipedia, matroids matheplanet, matheraum, etc.
or simply don’t use any formulae in html files, as i’m doing so far. too bad.

posted in: math www
tags:
places: