Skip to content →

Category: books

Ulysses and LaTeX

If you’re a mathematician chances are that your text-editor of choice will be TeXShop, the perfect environment for writing papers. Even when writing a massive textbook, most of us stick to this or a similar LaTeX-frontend. The order of chapters in such a book is usually self-evident, and it is enough to use one TeX-file per chapter.

If you’re a blogger, chances are you spend a lot of writing time within the WordPress-editor. If you have a math-blog, there’s no longer the issue of including TeX-output images in some laborious way, thanks to MathJax. Even for a longer series of blog-posts there’s no problem staying within the WordPress-environment.

However, if you’re reckless enough to want to write a novel, or a math-book for a larger audience, you may need different equipment.

You will have to be able to follow story-lines, to follow your main characters throughout the plot, get word counts on scenes and chapters, jot down ideas and results from research, but most of all: you will have to be able to remain focussed just on your writing, as far away as possible from all bells and whistles and thrills of internet and preview-on-the-go editors.

In short, you may consider moving all of your writing to Ulysses.

I’ve been an early adopter from the days their iPad-app was called Daedalus, which I found cute, being a pathetic Joyce-fan. However, the app’s iCloud syncing sucked, but it is now replaced by the Ulysses.app which works like magic, syncing every keystroke between iPad, iPhone and whatever Mac you use as your workhorse.

But, what if you want to write about math and are unwilling to ban all LaTeX-formulas from your text.

Well, I’ve tried everything, including the approach below (in a faulty way), and figured it was impossible due to the fact that Ulysses is a MarkDown editor in which underscores are entirely different from indices.

Fortunately, yesterday Eline Steffens posted “Writing Mathematical Equations in Ulysses” showing me what I did wrong.

If you want MathJax to parse your text you need to include the standard code in your header. What I missed was that you have to include it as a ‘Raw source block’ (under ‘Markup’ in Ulysses).

Further, I forgot to prepend dollar-signs with a tilde, which works as an escape character in Ulysses so that all underscores are safe within the LaTeX-boundaries.

But now it works like a charm.

Ulysses is able to export your text in a variety of ways. You can preview it as HTML, including all rendered LaTex, and you can export directly either to Medium (on which I should begin to cross-post stuff asap) or your own WordPress-site.

In fact, I wrote this in Ulysses, then clicked the export-icon, choose ‘Publishing’ and NeverEndingBooks, and bingo I was able to post it as a draft. I can even fill in categories and tags, even add the featured image appearing at the top of this post, check everything in WordPress-admin and hit: “Publish”.

I guess I’ll be doing all my non-paper writing from now on entirely in Ulysses.

Leave a Comment

NaNoWriMo (2)

Two more days to go in the NaNoWriMo 2016 challenge. Alas, it was clear from the outset that I would fail, bad.

I didn’t have a sound battle plan. Hell, I didn’t even have a a clue which book to write…

But then, I may treat myself to a SloWriMo over the Christmas break.

For I’ve used this month to sketch the vaguest possible outlines of an imaginary book.

ulysses2

[section_title text=”An imaginary interview”]

Question: What is the title of your book?

I don’t know for sure, but my working title is Primes and other imaginary shapes.

Question: What will the cover-illustration look like?

At the moment I would settle for something like this:

Question: Does your book have an epigraph?

That’s an easy one. Whenever this works out, I’ll use for the opening quote:

[quote name=”David Spivak in ‘Presheaf, the cobbler'”]God willing, I will get through SGA 4 and Lurie’s book on Higher Topos Theory.
[/quote]

Question: Any particular reason?

Sure. That’s my ambition for this book, but perhaps I’ll save Lurie’s stuff for the sequel.

Question: As you know, Emily Riehl has a textbook out: Category Theory in Context. Here’s a recent tweet of hers:

Whence the question: does your book have a protagonist?

Well, I hope someone gave Emily the obvious reply: Yoneda! As you know, category theory is a whole bunch of definitions, resulting in one hell of a lemma.

But to your question, yes there’ll be a main character and her name is Alice.

I know, i know, an outrageous cliché, but at least I can guarantee there’ll be no surprise appearances of Bob.

These days, Alices don’t fall in rabbit holes, or crawl through looking-glasses. They just go online and encounter weird and wondrous creatures. I need her to be old enough to set up a Facebook and other social accounts.

My mental image of Alice is that of the archetypical STEM-girl

In her younger years she was a lot like Lewis Carroll’s Alice. In ten years time she’ll be a copy-cat Alice Butler, the heroine of Scarlett Thomas’ novel PopCo.

Question: What will be the opening scene of your book?

Alice will post a question on Lego-stackexchenge, and yes, to my surprise such a site really exists

(to be continued, perhaps)

Leave a Comment

NaNoWriMo (1)

Some weeks ago I did register to be a participant of NaNoWriMo 2016. It’s a belated new-year’s resolution.

When PS (pseudonymous sister), always eager to fill a 10 second silence at family dinners, asked

(PS) And Lieven, what are your resolutions for 2016?

she didn’t really expect an answer (for decades my generic reply has been: “I’m not into that kinda nonsense”)

(Me) I want to write a bit …

stunned silence

(PS) … Oh … good … you mean for work, more papers perhaps?

(Me) Not really, I hope to write a book for a larger audience.

(PS) Really? … Ok … fine … (appropriate silence) … Now, POB (pseudonymous other brother), what are your plans for 2016?

nanowrimo_2016_webbanner_participant

If you don’t know what NaNoWriMo is all about: the idea is to write a “book” (more like a ‘shitty first draft’ of half a book) consisting of 50.000 words in November.

We’re 5 days into the challenge, and I haven’t written a single word…

Part of the problem is that I’m in the French mountains, and believe me, there always more urgent or fun things to do here than to find a place of my own and start writing.

A more fundamental problem is that I cannot choose between possible book-projects.

Here’s one I will definitely not pursue:

“The Grothendieck heist”

“A group of hackers uses a weapon of Math destruction to convince Parisian police that a terrorist attack is imminent in the 6th arrondissement. By a cunning strategy they are then able to enter the police station and get to the white building behind it to obtain some of Grothendieck’s writings.

A few weeks later three lengthy articles hit the arXiv, claiming to contain a proof of the Riemann hypothesis, by partially dismantling topos theory.

Bi-annual conferences are organised around the globe aimed at understanding this weird new theory, etc. etc. (you get the general idea).

The papers are believed to have resulted from the Grothendieck heist. But then, similar raids are carried out in Princeton and in Cambridge UK and a sinister plan emerges… “

Funny as it may be to (ab)use a story to comment on the current state of affairs in mathematics, I’m not known to be the world’s most entertaining story teller, so I’d better leave the subject of math-thrillers to others.

Here’s another book-idea:

“The Bourbaki travel guide”

The idea is to hunt down places in Paris and in the rest of France which were important to Bourbaki, from his birth in 1934 until his death in 1968.

This includes institutions (IHP, ENS, …), residences, cafes they frequented, venues of Bourbaki meetings, references in La Tribu notices, etc.

This should lead to some nice Parisian walks (in and around the fifth arrondissement) and a couple of car-journeys through la France profonde.

Of course, also some of the posts I wrote on possible solutions of the riddles contained in Bourbaki’s wedding announcement and the avis de deces will be included.

Here the advantage is that I have already a good part of the raw material. Of course it still has to be followed up by in-situ research, unless I want to turn it into a ‘virtual math traveler ’s guide’ so that anyone can check out the places on G-maps rather than having to go to France.

I’m still undecided about this project. Is there a potential readership for this? Is it worth the effort? Can’t it wait until I retire and will spend even more time in France?

Here’s yet another idea:

“Mr. Yoneda takes the Tokyo-subway”

This is just a working title, others are “the shape of prime numbers”, or “schemes for hipsters”, or “toposes for fashionistas”, or …

This should be a work-out of the sga4hipsters meme. Is it really possible to explain schemes, stacks, Grothendieck topologies and toposes to a ‘general’ public?

At the moment I’m re-reading Eugenia Cheng’s “Cakes, custard and category theory”. As much as I admire her fluent writing style it is difficult for me to believe that someone who didn’t knew the basics of it before would get an adequate understanding of category theory after reading it.

It is often frustrating how few of mathematics there is in most popular maths books. Can’t one do better? Or is it just inherent in the format? Can one write a Cheng-style book replacing the recipes by more mathematics?

The main problem here is to find good ‘real-life’ analogies for standard mathematical concepts such as topological spaces, categories, sheaves etc.

The tentative working title is based on a trial text I wrote trying to explain Yoneda’s lemma by taking a subway-network as an example of a category. I’m thinking along similar lines to explain topological spaces via urban-wide wifi-networks, and so on.

But al this is just the beginning. I’ll consider this a success only if I can get as far as explaining the analogy between prime numbers and knots via etale fundamental groups…

If doable, I have no doubt it will be time well invested. My main problem here is finding an appropriate ‘voice’.

At first I wanted to go along with the hipster-gimmick and even learned some the appropriate lingo (you know, deck, fin, liquid etc.) but I don’t think it will work for me, and besides it would restrict the potential readers.

Then, I thought of writing it as a series of children’s stories. It might be fun to try to explain SGA4 to a (as yet virtual) grandchild. A bit like David Spivak’s short but funny text “Presheaf the cobbler”.

Once again, all suggestions or advice are welcome, either as a comment here or privately over email.

Perhaps, I’ll keep you informed while stumbling along NaNoWriMo.

At least I wrote 1000 words today…

Leave a Comment