Ten tips for better writing

(Can you taste the delicious irony?)

From flamewars defending one’s favourite publishing platform, to worrying too much about specific versions of obscure software plug-ins, to constantly tweaking the appearance of blogs, there’s an unfortunate tendency in the blogosphere to focus incessantly on the technical aspects of blogging to the detriment of everything else. In an attempt to buck the trend a little and bring into focus what’s really important—high-quality content—here are ten quick tips to improve your writing on-line:

  1. Focus on the things you know, enjoy and are passionate about.
  2. Never publish your first draft. Nor your second.
  3. Read your entries out loud. It’s amazing how many errors missed when silently scanning words get caught when you hear them out loud.
  4. Find a writing and publishing schedule that works for you. And stick to it.
  5. Recognise that this is not publishing on paper; things can be perpetually improved. Continue to evolve your entries even after they’ve made it to your web site.
  6. Learn to use a thesaurus and a dictionary to make your writing more apt (and stylish!).
  7. Know and engage your audience.
  8. While your writing environment (different blogging software, word processors, text editors, paper and pencil, …) is not of central concern, make sure you choose one that doesn’t get in the way.
  9. Don’t be reluctant to experiment with different writing styles until you figure out one that works for you.

I know I said I’d share ten blogging tips but only ended up presenting nine. Would you like to help me complete the list above?

Taming PDF support

Introduction:

It happens about twice each month. Out of the blue, a random stranger will get in touch with me, curious about how I seem to have PDF support for my journal working “so seamlessly.” A few of these people have also offered me money to help them out, which made me realise this information is of use to somebody; and so exists this tutorial. Digg it if you find it useful!

At the outset, I’d like to let you know that this feature is still rather buggy, but, for the most part it does what is supposed to.

I presume you’re getting in touch with me because a popular plugin that converts posts into PDF, WP2PDF, often misbehaves, and is non-trivial to install and configure in the first place. This page details some of the things I have done to make it work. I have made some changes to the core WP2PDF code, which I detail below. Such is the joy of Free Software!

This guide is not detailed at all, and generally assumes you know what you are doing. If there are many repeated questions about something, I will augment this page to make that bit more clear. The instructions work the same for both WordPress 1.5x, and 2.x—one of which you obviously must have installed; otherwise you wouldn’t be here.

The Rough Steps:

These steps assume your blog’s files are installed at /blog, and it can be accessed via http://your-blog.org/.

  1. Fetch an archive of WP2PDF 0.4.2 from SourceForge.
  2. Copy it over to your server, and unzip it; creating the folder /blog/wp2pdf. “Install” it by opening http://your-blog.org/wp2pdf/install.php in your web browser.
  3. Fetch my modified wp2pdf.php (you need to rename the file from .php.txt to .php) and overwrite the original file in the WP2PDF archive.
  4. Configure it to your heart’s content, (including things like fonts and so on) by visiting http://your-blog.org/wp2pdf/admin/setup.php. This mostly works as advertised. Make sure you set the “saving behaviour” in the general preferences pane to “Save files on the webserver, then relocate.”
    WP2PDF Configuration
  5. Open the file add-to-template-functions-links.php and add its contents to the end of your existing /blog/wp-includes/template-functions-links.php (or, on newer WordPress versions, to /blog/wp-includes/link-template.php). Really, just copy and paste.
  6. Now you’re technically done. To check it out working, try loading http://your-blog.org/wp2pdf/wp2pdf.php. You should get a PDF with recent posts.

More info:

There are quite a few interesting and powerful things you can do from this point on.

  1. Since we’re greedy, we’re still not completely satisfied. We also want cool “permalinks” to work well. If you note, on my journal, the PDF for a post is linked to as post-permalink/pdf/. You definitely want that. For this, open your .htaccess and add the following block (anywhere for WordPress 1.5x, and RIGHT AT THE TOP for WordPress 2.x):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^earlier/([^/]+)/?([0-9]+)?/pdf/?$ /wp2pdf/wp2pdf.php?name=$1&page=$2 [QSA,L]
</IfModule>
  1. You will need to modify this slightly, because my permalinks are of the form /earlier/post-name/ and I want the PDF to show up at /earlier/post-name/pdf/. You will need to tweak the word “earlier” with whatever you use. And finally, you can just use <?php get_wp2pdf_permalink();?> where you need a link to PDFs on your template!
  2. You can have more than one post in the PDF. You can have a certain number of posts, posts by category, … and so much more. Again, you will have to work out your .htacess similar to the above to make your URIs look good. Enjoy!

Known Issues:

  1. Some “special symbols,” such as π, don’t render properly on the PDF document.
  2. Images don’t render on the PDF document.
  3. Some pages will randomly break and fail to render completely as a PDF document.

You need to sacrifice your first born to the gods and hope for the best.