October 31, 2009
@Font-face
I decided to to dabble a bit with CSS3’s @font-face
directive. Downloadable fonts are now supported by all major browsers, so I replaced Georgia
(which I never really liked) with Charis SIL as the typeface for running text on this blog.
October 6, 2009
JHEP3
On a completely unrelated note, why is the JHEP3.cls class so broken?
(To amplify a bit, it seems to be incompatible with a number of standard LaTeX packages; some by happenstance, some because it clumsily – and unsuccessfully – tries to emulate them.)
Perhaps there will be a silver lining to the Springer purchase.
October 5, 2009
Fun with (i)tex
Doubtless, you’re familiar with TeX’s \rlap{}
and \llap{}
commands. They collapse the bounding box of their content to zero width. The content sticks out of the bounding box (respectively, to the right, or to the left), overlapping the surrounding content. Hence the name…
If, however, you take a look at the code for these commands,
\def\llap#1{\hbox to0pt{\hss#1}}
\def\rlap#1{\hbox to0pt{#1\hss}}
you notice one unfortunate thing: they don’t work in math mode. That’s a bummer, because they have (or would have) many useful roles in math mode.
In fact, you might even want a \clap{}
command, which would collapse the bounding box to zero width, but cause the content to be centered (sticking out equally, both to the left and to the right) about the current point … something like
\def\clap#1{\hbox to0pt{\hss#1\hss}}
But, of course, that doesn’t work in math mode, either.
Recently, I happened upon this TUGboat article by Alexander Perlis. It explains how to define macros, \mathrlap{}
, \mathllap{}
and \mathclap{}
, which do the same thing as their horizontal mode counterparts, above, but work in math mode.
And I figured out how to implement the same functionality in MathML.