Writing in Markdown with ReText

HTML code If you’ve been reading this space for any length of time, you know that I’m a heavy user of Markdown. I do a lot of writing with it. In fact, about one-third of my writing is done with a text editor and Markdown. Mainly articles and blog posts.

While I use and like Gedit, I’ve been looking for a dedicated Markdown editor for a while now. I found a promising one a few years ago, but it’s abandonware now. Since then, nothing.

Well, until I stumbled upon ReText a couple of weeks ago. While it’s not 100% there yet, ReText is a solid and capable editor with some useful features.

Let’s take a closer look at it.

Downloading and installing ReText

For ReText to run on your system, you’ll need Python and the Python QT libraries installed. Both are standard kit in many distros, but check your package manager just to be safe.

Then head on over to the editor’s download page and grab the latest version. That’s 2.1 at the time I wrote this post. Then, extract the archive to a directory.

From there, pop open a terminal and navigate to the directory where you extracted the ReText archive. Type the command chmod +x retext.py to make the script retext.py executable. After that, run the script by double clicking on it in your file manager or by typing ./retext.py at the command line.

A new document in ReText

Getting to work

That means typing. There are no toolbar buttons that let you automatically add Markdown formatting; you need to do that manually. However, there are two dropdown lists with which you can add some HTML tags and HTML entities.

If you have files formatted with Markdown, keep in mind that ReText only recognizes files with the extension .md. All of mine have the extension .text. Yes, I was a bit frustrated …

You’ll notice that ReText lacks syntax highlighting. I find that very useful, no matter what markup language I’m working with. Here’s hoping ReText’s developers add that feature in a future version.

Editing a document in ReText

ReText also has a live spelling checker, which puts a squiggly red line underneath words that you mis-spell. You can turn it on and off by selecting Edit > Spell Check > Enable. The spelling checker only highlights errors. You can’t, for example, right click on a word to get suggested corrections.

Previewing your work

When you’re using something like Markdown, your goal is to eventually convert your document to HTML. But if you want a peek at what it will look like without running a Markdown processor, you can do that in ReText.

How? Click the Preview button on the toolbar.

Previewing a document

You can also get a live preview, which updates as you type, by selecting Edit > Live Preview.

Live preview


When you’re done writing, you can export your document to the following formats:

  • HTML (obviously!)
  • ODT
  • PDF

Just select File > Export then choose one of the options.

The results of the PDF conversion aren’t too bad at all:

An exported PDF

With ODT, the text isn’t formatted with styles. That makes it messy if you want to apply a template to the converted files.

You can also upload your documents to Google Docs. To do that, select File > Export > Save to Google Docs. You’ll be prompted for your Google Docs login information.

Uploading to Google Docs

The results are somewhat better than with a conversion to ODT. Google Docs actually uses styles, but there isn’t enough space between the paragraphs.

A file uploaded to Google Docs

Is that it?

No. ReText also has a few other features, which you can learn about here. I don’t use those features, and probably never will. But just in case you’re curious …

While it’s still a bit rough around the edges, ReText is a very useful tool. At least for me. It makes writing with Markdown quite a bit easier.

This work is licensed under a Creative Commons Attribution 4.0 International License.

Flattr this!

  • Dmitry Shachnev

    Thanks for sharing your ReText experience!

    Some notes:

    – ReText is now available in main Ubuntu repositories (for precise), and there is also a PPA available (ppa:mitya57/ppa).
    – You can also try out a beta of 3.0 with some new features like syntax highlighting, shortcuts for formatting and “export extensions” — read more here: http://sourceforge.net/p/retext/blog/2012/02/retext-30-beta-1-released/.
    – .md in not the only supported file extension for Markdown. Others are .mkd, .markdown, .mdown, .mkd and .mkdn. For files with other extensions, you can uncheck “Edit ? Plain text” option and ReText will treat them as Markdown files, too.
    – Feel free to file feature requests in our bug tracker at SourceForge or at Launchpad.

  • Pingback: Ubuntu Musings» Blog Archive » Taking another look at ReText()