I have left Harvard as of July 1, 2008 to take a position at NYU. This website has been cached and left static. Feel free to browse my new website, aka "What the heck is a Clinical Associate Professor?"

04.28.07

EdTags

Posted in Education, Web at 12:30 pm by leingang

At the last web pedagogies lunch Michael Hemment told us about Edtags, a social-bookmarking service for educational resources. He’s also blogged about it here.  it seems like a fun tool, and I think like to play with it, but I’m wondering if they’d be upset by the intrusion of an undergraduate educator. :-)

But my main question is this: Why use this instead of del.icio.us?  To me it seems like creating a search engine that focuses on pages about fishing.  You can just add “fishing” to your search query in a real engine like Google and probably get better results.  So why not use the same tags on del.icio.us and benefit from the larger community?

Update: Apparently TeachingHacks recommends just that.

Blogged with Flock

What you know about math?

Posted in Math, Funny at 8:03 am by leingang

It ain’t “White and Nerdy,” but they are white and nerdy.



Blogged with Flock

04.27.07

Configuring tex4ht to link to PDF

Posted in Courses, Computing, LaTeX at 7:19 am by leingang

As I wrote before, I’m a big fan of TeX4ht to convert (La)TeX documents to HTML and variants. One thing I liked was its professed configurability. So I gave it a whirl.

The HTML that TeX4ht isn’t quite perfect, still. It needs some help with tables, and if I use custom list styles they don’t carry over (although that might be a browser thing, now, come to think of it). So I wanted to insert two things into the HTML file: a <LINK> element in the document head indicating to any machine reader that the PDF version exists, and a note at the top of the document body indicating to any human reader that the PDF version exists and is more authoritative.

So here’s my linktopdf.cfg file, which I put in the same directory as the LaTeX file.

\Preamble{xhtml}
% You can put definitions here
\begin{document}
% This stuff goes in the <head> of the HTML document
\HCode{<link rev="alternate" media="print" xhref="\jobname.pdf" mce_href="\jobname.pdf" />}
\EndPreamble
% This goes at the beginning of the <body> of the document.
Note: This is an automatically generated HTML conversion of a LaTeX file, provided for convenience. The authoritative version is the \Link[\jobname.pdf]{}{PDF}PDF\EndLink\ version.

To compile a LaTeX file with this configuration use

$htlatex foo.tex "linktopdf" "" "-cvalidate"

and that ought to do it! I’d kind of like it to go after the title, rather than at the very beginning of the document, but that would take a little more reading of the configuration process. Advanced usage would be to give it a class and add CSS to the head that sets this paragraph in a different style

I thought for a while whether I wanted to use a LINK REL or a LINK REV declaration. The question is, is it more useful or correct to say the the PDF file is a printable version of the HTML, or that the HTML is a screen version of the PDF? Perhaps the latter, but i don’t exactly know which would make a machine go get the PDF instead.

Blogged with Flock

04.26.07

Separated (in space-time) at birth?

Posted in Math, Funny at 1:51 pm by leingang

David Hilbert (1862-1943), legendary and influential mathematician:

David Hilbert

David Hilbert, Principal Research Scientist, CSIRO Sustainable Ecosystems:

David Hilbert

Are you smarter than a Chinese 12th grader?

Posted in Education at 9:09 am by leingang

Oliver forwarded me this article from the BBC in which two mathematics problems are compared.

  Chinese maths test

English maths test

These pictures say a thousand words apiece…

Blogged with Flock

TeX4ht

Posted in Computing, LaTeX, Web at 6:56 am by leingang

I’m so glad that TeX4ht exists. It’s a suite of programs that convert TeX or LaTeX to one of many hypertext variants. You can generate HTML or XHTML, XML files readable by OpenOffice, JavaHelp, and others.

The mathematics in your document can be handled in various ways, too: the “normal” way of producing images for complicated formulas and inlining them to the document, or the “right” way of embedding MathML into the XML file. Unfortunately, the “right” way is not very well supported–not too many browsers read MathML yet. But it’s nice that tex4ht allows me to get by with this yucky kludge until it happens (if ever!)

A long time ago there was LaTeX2HTML for this purpose, and man, did I hate it.  It was an impressive project, and sometimes I got it to work.  However, I disagreed with the whole ethos of it.  LaTeX2HTML uses perl to parse TeX files and generates an HTML file.  Why do it this way?  TeX already parses files and produces output in the form of a DVI file.  What tex4ht does is attaches onto TeX’s parser and operates on the DVI file to make the conversion. 

And then there’s the fact that tex4ht has so many options and is configurable.  I’d like to learn more about configuring it well, but in a short time I was able to do one thing I wanted–link to the PDF in the HTML version.

Blogged with Flock

04.25.07

"Best LaTeX package ever” of the week: hyperref

Posted in Computing, LaTeX at 12:34 pm by leingang

One of the most useful little LaTeX packages is hyperref. In it normal use it doesn’t involve any new commands. However, it adds hyperlinks to references in the resulting PDF or HTML document.

This means if you use a PDFLaTex and this package, you get the bookmarked outline view of the PDF for free. Other references, like to the bibliography or to sections of the document, are now clickable as well. All this extra functionality for one line of code!

PDF created with LaTeX and hyperrefpicture-3.png
\usepackage{hyperref}

This is so useful it makes make want to re-LaTeX files I find that don’t include it.

Blogged with Flock

Hope you enjoyed the three-day spring

Posted in Uncategorized at 12:26 pm by leingang

Monday the magnolias bloomed in Boston.  Today the flowers are falling off the dogwoods.  So I guess it’s going to be summer soon.

Blogged with Flock

04.24.07

Microsoft spurns its own keyboard

Posted in Computing, Mac at 11:09 am by leingang

I just posted this on a macworld thread, but i’ll republish it as a rant.

I have a Microsoft Natural Keyboard
Elite USB keyboard plugged into my PowerBook G4.

MS NaturalKeyboard Elite

It’s been pretty good for my wrists, and it’s cheap, too.

I recently had to do a
pair of Archive and Install’s on the PowerBook, and I lost the kernel extensions
that made the Microsoft keyboard more like a mac (swapping alt and
command keys, etc).

I went to Microsoft’s download page
and they don’t have a listing for the Natural Keyboard Elite anymore.
The latest keyboard driver is Intellitype 6.2, though. I downloaded and
installed that, and even though I can click “swap alt and command” in
the preference panel, it has no effect.
I’ve installed Intellitype 5.4, 6.0, 6.1, and 6.2, and all of
them aren’t working out-of-the-box.

I’ve also discovered that
when I select Keyboard Info from the Intellitype about window, it tells
me that no Microsoft Keyboards have been found. Why not? I repeat, this
used to work.

I’m using doubleCommand now (uControl is another option), but what was
nice about Intellitype was it only went into effect when the keyboard
was installed. With the laptop on its own it would revert to normal.

Blogged with Flock

04.23.07

A Queuing Model for Use of Laundry Machines in Student Dormitories

Posted in Math at 6:04 am by leingang

Serena Rezny is speaking this week in the Undergraduate Mathematics Colloquium aka Math Table on laundry machines. Sounds like a fun practical math application that all undergraduates could learn from. Serena is the four-time π day recitation champion, having reached 1058 digits this most recent March 14.

Blogged with Flock

« Previous entries ·