Skip to content →

Tag: LaTeX

Return to LaTeX

To most mathematicians, a good LaTeX-frontend (such as TeXShop for Mac-users) is the crucial tool to get the work done. We use it to draft ideas, write papers and courses, or even to take notes during lectures.

However, after six years of blogging, my own LaTeX-routine became rusty. I rarely open a new tex-document, and when I do, I’d rather copy-paste the long preamble from an old file than to start from scratch with a minimal list of packages and definitions needed for the job at hand. The few times I put a paper on the arXiv, the resulting text resembles a blog-post more than a mathematical paper, here’s an example.

As I desperately need to get some math-writing done, I need to pull myself away from the lure of an ever-open WordPress admin browser-screen and reacquaint myself with the far more efficient LaTeX-environment.

Perhaps even my blogging will benefit from the change. Whereas I used to keep on adding to most of my tex-files in order to keep them up-to-date, I rarely edit a blog-post after hitting the ’publish’ button. If I really want to turn some of my better posts into a book, I need them in a format suitable for neverending polishing, without annoying the many RSS-feed aggregators out there.

Who better than Terry Tao to teach me a more proficient way of blogging? A few days ago, Terry announced he will soon have his 5th (!!) book out, after three years of blogging…

How does he manage to do this? Well, as far as I know, Terry blogs in LaTeX and then uses a python-script called LaTeX2WP ’a program that converts a LaTeX file into something that is ready to be cut and pasted into WordPress. This way, you can write, and preview, your post in LaTeX, then run LaTeX2WP, and post into WordPress whatever comes out.’ More importantly, one retains a pure-tex-file of the post on which one can keep on editing to get it into a (book)-publishable form, eventually.

Nice, but one can do even better, as Eric from Curious Reasoning worked out. He suggests to install two useful python-packages : WordPressLib “with this library you can control remotely a WordPress installation. Use of library is very simple, you can write a small scripts or full applications that allows you to automate publishing of articles on your blog/site powered by WordPress” and plasTeX “plasTeX is a LaTeX document processing framework written entirely in Python. It currently comes bundled with an XHTML renderer (including multiple themes), as well as a way to simply dump the document to a generic form of XML”. Installation is easy : download and extract the files somewhere, go there and issue a **sudo python setup.py install** to add the packages to your python.

Finally, get Eric’s own wplatex package and install it as explained there. WpLaTeX has all the features of LaTeX2WP and much more : one can add titles, tags and categories automatically and publish the post from the command-line without ever having to enter the taboo WordPress-admin page! Here’s what I’ve written by now in TeXShop

I’ve added the screenshot and the script will know where to find it online for the blog-version as well as on my hard-disk for the tex-version. Very handy is the iftex … fi versus ifblog … fi alternative which allows you to add pure HTML to get the desired effect, when needed. Remains only to go into Terminal and issue the command

wplpost -x http://www.neverendingbooks.org/xmlrpc.php ReturnToLatex.tex

(if your blog is on WordPress.com it even suffices to give its name, rather than this work-around for stand-alone wordpress blogs). The script asks for my username and password and will convert the tex-file and post it automatic.

5 Comments

Snow leopard + wordpress + latex problem

Ever since I’ve upgraded to Snow Leopard I’ve been having problems with the webserver.

At first there were the ‘obvious’ problems : mysql-connection lost and php-error message. These were swiftly dealt with using the excellent Snow Leopard, Apache, PHP, MySQL and WordPress! advice from ‘tady’.

Right now, access to this blog is extremely slow (and often impossible), certainly via the admin-page. The problem appears to be that most of my CPU is used by lots of pdfetex-processes owned by www. Hence the conjecture that it is a problem with either LaTeXRender or WP LaTeX.

Anyone experiencing a similar problem, or knowing a trick to resolve it? Takk.

Leave a Comment

introducing : the n-geometry cafe

It all started with this comment on the noncommutative geometry blog by “gabriel” :

Even though my understanding of noncommutative geometry is limited, there are some aspects that I am able to follow.
I was wondering, since there are so few blogs here, why don’t you guys forge an alliance with neverending books, you blog about noncommutative geometry anyways. That way you have another(n-category cafe) blogspot and gives well informed views(well depending on how well defined a conversational-style blog can be).

The technology to set up a ‘conversational-style blog’, where anyone can either leave twitter-like messages or more substantial posts, is available thanks to the incredible people from Automattic.

For starters, they have the sensational p2 wordpress theme : “blogging at the speed of thought”



A group blog theme for short update messages, inspired by Twitter. Featuring: Hassle-free posting from the front page. Perfect for group blogging, or as a liveblog theme. Dynamic page updates. Threaded comment display on the front page. In-line editing for posts and comments. Live tag suggestion based on previously used tags. A show/hide feature for comments, to keep things tidy. Real-time notifications when a new comment or update is posted. Super-handy keyboard shortcuts.

Next, any lively online community is open for intense debate : “supercharge your community”



Fire up the debate with commenter profiles, reputation scores, and OpenID. With IntenseDebate you’ll tap into a whole new network of sites with avid bloggers and commenters. And that’s just the tip of the iceberg!

And finally, as we want to talk math, both in posts and comments, they provide us with the WP-LaTeX plugin.

All these ingredients make up the n-geometry cafe ((with apologies to the original cafe but I simply couldn’t resist…)) to be found at noncommutative.org (explaining the ‘n’).



Anyone can walk into a Cafe and have his/her say, that’s why you’ll get automatic author-privileges if you register.

Fill in your nick and email (please take your IntenseDebate setting and consider signing up with Gravator.com to get a nice image next to your contributions), invent your own password, show that you’re human by answering the reCapcha question and you’ll get a verification email within minutes ((if you don’t get an email within the hour, please notify me)). This will take you to your admin-page, allowing you to start blogging. For more info, check out the FAQ-pages.

I’m well aware of the obvious dangers of non-moderated sites, but also a strong believer in any Cafe’s self-regulating powers…

If you are interested in noncommutative geometry, and feel like sharing, please try it out.

3 Comments