Avleen Bijral, one of the students here at TTIC, sent me a link to a pretty cool browser plugin for GMail called GMail TeX. Basically it lets you send LaTeX formatted emails via gmail. This can be quite a time saver for the reader (but maybe not the writer) if you’re remotely collaborating on some project (which I so often am these days, it seems). It’s supported on a wide variety of browsers and seems worth checking out!

If you, like me, tend to cart around old ISIT papers and just gut them to put in the new content for this year’s paper, don’t do it. Instead, download the template because the page size has changed from letter to a4.

Also, as a postscript to Sergio’s note that eqnarray is OVER, apparently Stefan recommends we use IEEEeqnarray instead of align.

Via Erin comes a link to a collaborative web-based LaTeX tool called WriteLaTeX. I feel like someone else told me about this before (it’s been around since the end of September 2011), but I still haven’t tried using it. Has anyone else had much luck actually writing papers with it?

ETA: : See also ShareLaTeX.

New(ish) policies at the NSF — read up if you are planning on writing some grants! h/t to Helena, who sent this in aaaaages ago.

I’m not sure I agree that these are the 10 must-listen, but it’s something at least.

This article on Jonah Lehrer is quite interesting. I think there are some things to be learned here for academic writers as well…

I forgot to add a link to Suhas Mathur has a blog, sorry!

bibimbap is a tool to import BibTeX entries from various sources. It runs in the console and is designed to be simple and fast. bibimbap is simply the easiest way to manage your BibTeX bibliographies. Be advised that it still won’t read the papers for you, though.” — looks like it could be awesome. h/t to Manu.

Apparently the specifications for the Allerton camera-ready copy insist on different page margins for the first page: 1 inch on top and 0.75 on the sides and bottom, whereas it’s 0.75 all around for the other pages. I submitted the paper and was told I had margin errors so I downloaded the draft copy and lo and behold I got an annotated PDF with gray boxes and arrows showing that every page had margin violations. How could that be, I thought?

It seemed that this is different than the default \documentclass[conference,letterpaper]{IEEEtran} options. After hacking around a bit I came across this hack but when I used \usepackage[showframe,paper=letterpaper,margin=0.75in]{geometry} the line-frames around each page showed that all of my text was inside the margins.

Either PaperCept is altering my PDF or it is not capable of calculating margins correctly, or the geometry package is not working. Given the problems I’ve had with PaperCept in the past, I’m guessing that it’s not the latter. My only hack was to use the geometry package to set the margins of all pages to 1 inch.

Did anyone else have these weird margin issues?

Update: Upon further checking, it appears that the margins enforced by PaperCept are not the margins for \documentclass[conference,letterpaper]{IEEEtran} but instead most likely for IEEEconf, which has (I believe) been deprecated. Yikes!

Update 2: This is, in fact, my fault, since the documentation says to use IEEEconf.cls. I am still confused as to why that’s the standard for Allerton. Also, this is the 2002 version of IEEEconf.cls, and there are even newer versions than that. Sigh.

So IEEE wants PDFs that appear on IEEExplore to have two properties:

  • all fonts are embedded
  • the compatibility level is 1.4

Seems simple, right? Except that their instructions for PDF Express are for those who use Adobe Distiller, which I don’t have. You’d think there would be a simple workaround, but no…

This post suggests using ps2pdf command line options, which works if all of your figures are in EPS, but not if you have PDF or JPG figures. Daniel Lemire suggests converting the PDF to PS and then back to PDF.

That didn’t really work for me — I alternately got errors saying they wanted Adobe version 5 or higher (corresponding to compatibility level 1.4) or that fonts were not embedded. I blame Mac OS. On the 10th attempt at uploading, I finally got it to work. Here’s what I did:

  1. Generate the PDF however you like (command line or TeXShop)
  2. Open the PDF in Preview, duplicate, and save a copy. This will embed the fonts but make the PDF version 1.3 or something. Say the file is called copy.pdf.
  3. In a terminal, run pdf2ps copy.pdf to generate copy.ps. This will create a PS file with the fonts embedded.
  4. Run pdf2ps14 -dEmbedAllFonts=true copy.ps to generate a new version of copy.pdf that is both 1.4 and has fonts.

This is dumb. I wasted about an hour on this idiocy and still don't understand why it's such a pain. It seems that on a Mac, dvips does not embed fonts properly by default, and pdflatex also cuts corners. Furthermore, it doesn't seem like one can pass command line options (and make them default in TexShop) to automate this process.

I am sure there are better ways of doing this, but for the time being, this at least works.

I have written a little standalone script in python that parses a LaTeX file with \cite{} commands and the relevant BibTeX file and produces:

  • formatted HTML suitable for dropping into your homepage
  • individual .bib files for each paper
  • linking to archival versions via a DOI reference or URL
  • linking to a local pdf via the local-url field

The point was to make updating the publications on your homepage just epsilon more difficult that updating a BibTeX file/your CV. Of course, this is moot for people who have other folks to update their pages, but for us plebes, it could save a little hassle.

Clearly you could customize the output format to your needs. However, at the moment it’s not very robust (or efficient, or pretty). I’d like to test it out on likely readers of this blog’s personal .bib files to make it useful before sticking it on github. A subset of readers of this blog are likely to be people who might use such a thing, I’d like to know what your .bib files look like. Because BibTeX has a fair bit of variability, I am pretty sure that I did not catch most of the corner cases in my regexps.

So if you are interested, please do send me a representative file to my TTIC address. Thanks a ton!

Manu Sridharan (blog) left a comment the other day on my old post on my script to merge multiple TeX files (and strip the comments) for posting to ArXiV. He’s created a git repository for it, which seem so much more official and stuff. It’s at:

Thanks a bunch, Manu!

As a side note, Péter Gács has a de-macro script to eliminate all of your private macros if you’re so inclined.

I have quite a few collaborative writing projects going on in parallel now. One side-benefit of collaborating is that you learn neat LaTeX macros that your co-authors have developed that end up saving lots of time (or making the TeX equations more readable). Some people invent a whole set of macros for each paper (so that the macros stand for semantic concepts like “input variable”), but I do that mainly for small stuff, like different epsilons. What I do have are macros for are

  • font types and weights : using \mathrm{}, \mathcal{}, etc. is for the birds
  • functions : KL-divergence, mutual information, conditional mutual information etc. I get in trouble sometimes because I use the I(X \wedge Y) instead of I(X; Y) for mutual information, but we can change that in the macro!
  • norms, inner products : these are just functions anyway
  • epsilons : this helps keep different epsilons clearer, actually, and makes debugging proofs a little simpler.

I somehow never get around to making macros like \cX for \mathcal{X}, but maybe that would make my life easier. The nice thing about macros for functions is you can put in auto-sizing delimiters in the macro, saving some \left and \right‘s. What are your favorite things to make into macros?

The papercept website will throw an error if your final PDF is lower than version 1.4. If you use latex -> dvips -> ps2pdf then you will likely get PDF 1.3.

To fix this in TeXShop, go to Preferences and select Engine. Under “Tex + dvips + distiller” enter simpdftex tex --maxpfb --distiller ps2pdf14 and you should be good to go.

More posting about Allerton later!


Get every new post delivered to your Inbox.

Join 159 other followers