Productivity in Writing

I’ve tackled a few large writing projects over the past few years. Because I am a geek, I wrote a script that tallied the number of words I’d written every 15 minutes during each project. Because I am a scientist, I’ve analyzed the results and determined that, in each case, very different behavior is evident.

Among other things, writing my dissertation in 2001-2002 was an exercise in pure, undiluted focus. For several months, I did little but wake up, eat, write, sleep, repeat and repeat and repeat.


There are some gaps in November and December due to working on job applications and otherwise being distracted. The gap in February occurred when I fell victim to some horrible contagion that had me flat on my back for days, stole my voice, and forced me to reschedule a job interview. But from March to mid-May, it was smooth sailing. As my deadline approached, you can see the slope increasing until, near the end of May, I submitted the dissertation to my committee members for their review. I defended in June, made some revisions, and finally Phinished in July.

However, that smooth exponential behavior was not observed while working on my Master’s thesis in 2008:


Progress occurred in a very discontinuous way, because this time I was fitting writing time around my work schedule, mostly on weekends. I learned first-hand how hard it is to write a large document when each time you return to it, you have to invest significant effort in re-acquiring your train of thought. (The large gap in late May cannot, however, be blamed on work, and was instead due to a fabulous trip to Japan.) Writing also had to compete with coursework for my attention until early May. But it wasn’t only the time constraints that slowed me down. My job already involves a lot of technical writing, and I often found that at the end of the day the writing part of me felt drained dry, with little left over for more technical composition. Sure, the dissertation was much longer than the thesis… but sometimes it felt like writing the thesis took even more determination and willpower to bring it into being.

It’s interesting to contrast both of these to my productivity during November 2006, in which I tackled a work of fiction. National Novel Writing Month challenges you to write 50,000 words in 30 days. Now, my dissertation was just over 50,000 words, so I knew it was theoretically possible–except that I’d had much more than a month to write it. Of course, writing fiction is a whole different ballgame, unfettered by factual reporting and experimental results. Since the goal is to produce a certain number of words, rather than a coherent document about a research project, it’s much easier to break it down into equally sized daily word count targets, which we see reflected in the plot:


This one is much better fit by a linear trend than an exponential one, indicating almost no procrastination that would otherwise necessitate a final push. But “procrastination” is a deceptive term. Exponential productivity in writing a thesis or dissertation is not necessarily a result of procrastination; you can’t really split up the final goal into tiny daily chunks because it’s hard (or impossible) to define what the final product should look like until you’re already there. Outlines are helpful, but no one can predict how many words it will take to address each point you need to make. Overall, I learned that if the goal is raw, regular productivity, then I can meet it, at least for a month (even working around a full-time job and the hardest class I ever took at USC!). On the other hand, if I’m attempting thoughtful, substantial, technical composition, then I do best with solid uninterrupted chunks of time. This definitely isn’t a place where I can work wonders while multitasking!

How to Make LaTeX use a Hanging Indent

Ah, LaTeX. The programmer’s text processing system, in which you have to compile your document before it turns into something viewable. It gives us the joys of truly beautiful equation typesetting and the agonies of obscure commands, crazy “badness” rules, and sometimes obstreperous auto-figure placement.

Today was a case in point. I’m typesetting the index for a book and I wanted to get entries to have hanging indents, like this:

This is my paragraph, which I am writing to demonstrate what it looks like to have a paragraph that wraps and uses a hanging indent.

The only problem is that LaTeX only lets you specify how much to indent the first line of a paragraph, not the rest. The assumption is that the “typical” sort of indentation you want is to get paragraphs like this:

This is another paragraph, which shows what it looks like to have a paragraph that wraps but indents the first line instead of the following lines.

The solution turns out to be to set your left margin in to where you want the hanging lines to be, and then use a negative offset to specify the indentation of the first line. Here’s an example:

\leftskip 0.1in
\parindent -0.1in

Thank you, google! Talk about thinking outside the box.

P.S. What’s funny is that HTML has the same limitation, so to show the first example above, I had to set a negative text indentation.

This They Believe

I recently finished reading “This I Believe”, a compilation of 500-word essays on various people’s self-articulated core beliefs. Virtually every essay, whether you agree with the beliefs in it or not, makes for fascinating reading. Here are just a few of my favorite excerpts:

  • Isabel Allende:
    “What is the point of having experience, knowledge, or talent if I don’t give it away? Of having stories if I don’t tell them to others? Of having wealth if I don’t share it? I don’t intend to be cremated with any of it! It is in giving that I connect with others, with the world, and with the divine.”
  • Mary Cook:
    “One very wise man told me, ‘You are not doing nothing. Being fully open to your grief may be the hardest work you will ever do.’ “
  • Albert Einstein:
    “Alongside the development of individual abilities, the education of the individual aspires to revive an ideal that is geared toward the service of our fellow man, and that needs to take the place of the glorification of power and outer success.”
  • Martha Graham:
    “I believe that we learn by practice. […] Practice means to perform, over and over again in the face of all obstacles, some act of vision, of faith, of desire. Practice is a means of inviting the perfection desired.”
  • Brian Greene:
    “I believe the process of going from confusion to understanding is a precious, even emotional, experience that can be the foundation of self-confidence.”
  • Rick Moody:
    “I read Umberto Eco’s ‘Role of the Reader’, in which it is said that the reader completes the text, that the text is never finished until it meets this voracious and engaged reader. The open texts, Eco calls them.”
  • Mel Rusnov:
    “In ordinary life, I’m a civil engineer. […] But in my other life, I am a pianist… [After gaining applause from an impromptu performance in an airport lobby,] I thought: No one smiled and clapped after my presentation on the site engineering for a new strip mall.”
  • Wallace Stegner:
    “Everything potent, from human love to atomic energy, is dangerous; it produces ill about as readily as good; it becomes good only through the control, the discipline, the wisdom with which we use it.”
  • Deirdre Sullivan:
    “‘Always go to the funeral’ means that I have to do the right thing when I really, really don’t feel like it. I have to remind myself of it when I could make some small gesture, but I don’t really have to and I definitely don’t want to.”

I’m not quite ready to submit my own essay, but I’m very much looking forward to discussing these beliefs, and more, with my fellow salonniers.

How to embed fonts in a PDF file

This is an issue that comes up every now and then, for example when you create a PDF file that’s designed for actual printing (like in a book). The fonts used by PDF (or PS) files can be either embedded or simply “linked” to fonts already installed on the system. The advantage to linking is that the file size can be a lot smaller; the PDF file doesn’t need to carry around a full description of how to render each font. Unfortunately, the destination system doesn’t always have the fonts you want. The safest solution is to embed every font description in the PDF file.

But how do you make this magic happen? There are two important steps I learned about today. (These apply to linux/unix/Mac systems.)

1. Tell pdflatex, dvips, and dvipdf to embed the fonts.

The best instructions I’ve seen for this are here. Basically, you run `updmap` to find out where your config file is, then edit it to indicate that you want the fonts to be embedded. Re-run `updmap` to make those config settings stick, and then you can do pdflatex or dvips or dvipdf (as desired) to create files with embedded fonts.

That will get you most of the way there. However, if you’re including figures (say, .eps files) that also have their own fonts that weren’t embedded, and those font names aren’t recognized, you may get an error like:

dvips: Font Helvetica used in file fancy_widget.eps is not in the mapping file.

You can’t embed the font if your system doesn’t have a mapping for it. Oops! This usually happens with fonts like Helvetica, Times, and Symbol; these are proprietary font names, so their mappings aren’t found in most open source systems. But you can fix this problem, as described in this excellent font reference, by replacing the font names with their open-source equivalents:

2. Replace proprietary font names with their open-source equivalents.

Since .eps is a text format, you can just open the .eps file in a text editor and search/replace the font names. Markus Neteler makes this even easier with a handy bit of sed:

cat original_graphics.eps | sed 's+Times-Bold+NimbusSanL-Bold+g' |\
sed 's+Times-Roman+NimbusSanL-Regu+g' |\
sed 's+Times+NimbusSanL-Regu+g' |\
sed 's+Helvetica-BoldOblique+NimbusSanL-BoldItal+g' |\
sed 's+Helvetica-Oblique+NimbusSanL-ReguItal+g' |\
sed 's+Helvetica-Bold+NimbusSanL-Bold+g' |\
sed 's+Helvetica-Bold-iso+NimbusSanL-Bold+g' |\
sed 's+Helvetica+NimbusSanL-Regu+g' |\
sed 's+Helvetica-iso+NimbusSanL-Regu+g' |\
sed 's+Symbol+StandardSymL+g' > new_graphics.eps

For the particular file I was working on today, a couple of additional fonts didn’t show up on Markus’s list. They were all variants on the Courier font. After some hunting around, I figured out that Courier is “Nimbus Mono L”, so here’s the translation:

Courier NimbusMonL-Regu
Courier-Bold NimbusMonL-Bold
Courier-Oblique NimbusMonL-ReguObli
Courier-BoldOblique NimbusMonL-BoldObli

Finally, you may want to check the file to confirm that the fonts were embedded. It seems that you can use a utility called ‘pdffonts’ to do this from the command-line, but I don’t have it on my system. Alternatively, you can fire up Adobe Reader, go to “File->Document Properties”, click on the “Fonts” tab, and browse to see that each font is marked “embedded.”

Writing tips from Natalie Goldberg

I just finished Natalie Goldberg’s “Writing Down the Bones”, a book filled with her advice about writing (and living, really). Her view of writing is strongly influenced by her Zen practice, and the parallels she draws, and her resulting advice, are interesting even if (like me) you aren’t a Zen follower. If I had to sum up her book in a few bullet points, here would be some of the highlights:

  • Use timed writing practice to get yourself going, be committed, be productive, and be uncensored.
  • Write about subjects, and then let them go.
  • Consistency and integrity in writing will increase your confidence and commitment.
  • Originally, she wrote for self-expression… and then her goal shifted to communication. I think writing is all about communication, even if you are the only person who ever reads it; you can communicate with your own self when your thoughts go out, bounce off a page, and come back.

  • She also has a delightful use of metaphor:

  • “Like grating a carrot, give the paper the colorful coleslaw of your consciousness.”
  • “[Writing practice is] our wild forest where we gather energy before going to prune our garden.”
  • “Continue to turn over and over the organic details of your life until some of them fall through to the solid ground of black soil.” (I love the idea of writing as an act of composting!)

  • And a few final quotes I found worth saving:

  • “I had a belief in something real below the surface of life or right in the middle of life, but often my own mind kept me asleep or diverted; yet my own mind and life were also all I had.”
  • “There is no permanent truth you can corner in a poem that will satisfy you forever.” (So perfectionism is impossible, and it’s okay to let it go.)
  • “You have all these ingredients, the details of your life, but just to list them is not enough. You must add the heat and energy of your heart.”
  • “So while we are busy writing, all the burning life we are eager to express should come out of a place of peace.” (Still not quite sure I understand this one, but I’d like to.)

  • « Newer entries