Skip to content →

neverendingbooks Posts

markdown2use

Here some
possible uses of Markdown and the
HumaneText Service.
As an example, let us take the
noncommutative geometry & algebra page
maintained by Paul Smith.

If you copy the source of this page to BBEdit and use the
html2txt.py script in the #! menu (see
this post)
you get a nicely readable Markdown-file which strips the page of all its
layout and which is easy to modify, for example to include author and
URL at the start, remove some additional empty lines, make relative URLs
absolute and so on.

Applying the Markdown.pl
script to it one gets a nice RetroCool version
of the page. For starters, this gives a way to make your own collection
of websites you like in a uniform layout (of course, later on you can
add your own CSS to them).

More important is that the
Markdown-version (see here for
the text-file) is extremely readable and allows to _mine_ all
links easily (as you can see all links contained in the HTML-page are
referenced together at the end of the file). So, this is a quick way to
collect homepage- and email-links from link-pages.

Btw. there
are different ways to include links in a markdown text, for example I
like to write it immediately after the reference, so doing a Markdown.pl
followed by a html2txt.py doesn’t have to reproduce your original file
and fortunately you will always end up with a file having all links
referenced at the end. So, this procedure allows you to have uniformity
in a collection of markdown-files.

Equally important for me (for
later use in an intelligent database using DevonThink ) is that the Markdown file is the best way to safe the
HTML file in the database (as a RTF file) while maintaining readability
(which is important when DevonThink returns snippets of
information).

Leave a Comment

markdown

The nerd
implimentation of GTD
is based on plain text-files, or more
precisely

– all lists in text files, kept in directory
“~/Documents/txt”
– all documents maintained in Markdown for easy
HTML conversion

I’ve been writing HTML-code since the times
that the best browser around was something called NCSA Mosaic so I’ve never paid too much attention to
Markdown
before. Here is its main purpose

Markdown is a
text-to-HTML conversion tool for web writers. Markdown allows you to
write using an easy-to-read, easy-to-write plain text format, then
convert it to structurally valid XHTML (or >HTML). Thus, Markdown is
two things: (1) a plain text formatting syntax; and (2) a software tool,
written in Perl, that converts the plain text formatting to
HTML.

An example of Markdown-code followed by its
HTML-output can be seen at the BlueCloth website and I have
to agree that the Markdown text is very legible. I’ve been playing
around with Markdown for a couple of days now (in fact this post is
written in Markdown as WordPress has a Markdown-plugin) and have found a
few uses for it (more on this another time). Essential sites to visit if
you want to learn some Markdown are : its basic
syntax
and in the rare cases that this doesn’t do what you want to
do there is also a full
syntax
page.

If you want to use Markdown to write your
HTML-pages you need to be able to convert Markdown to HTML (and
conversely although the uses for this are not immediately clear, but
there are plenty of good reasons!). That’s what the
Markdown.pl Perl-script does for you (one way) and the
Python-script html2text.py (to be found here) (the other
way).

To get them working using BBedit
all you have to do is to put them in the _BBEdit Support/Unix
Support/Unix Filters_ directory (to be found in the BBEdit-folder in
_/Applications_). Then, if you have written a Markdown-text, do a
_Select All_ go to the !# menu and look for
Markdown.pl under _Unix Filters_ and voila, you have valid XHTML
(the other direction is similar).

This is a bit of work and one
would like to do both operations in nearly all Applications using the
_Services Menu_ (in fact, until a few weeks ago I had no clue
that there was something as useful as this menu hidden under the
program-name-menu of any Cocoa-program!). This is best done using HumaneText.service. The
installation is really as siimple as they say on this page (although it
took me a couple of trials before it worked, and I use the Services-menu
rather than the keystroke-shortcuts).

HumaneText works perfectly with TextEdit,
SubEthaEdit and (probably more important to mathematicians) TeXShop and
iTeXMac (the two most common front-ends for (La)TeX under OS X). A
noteworthy exception is BBEdit (hence the above laborious work-around).
Sometimes there are problems with punctuation in the conversion but you
can get around this using SmartyPants.

Leave a Comment

GMD

I’m always
extremely slow to pick up a trend (let alone a hype), in mathematics as
well as in real life. It took me over a year to know of the existence of
_blogs_ and to realize that they were a much easier way to
maintain a webpage than manually modifying HTML-pages. But, eventually I
sometimes get there, usually with the help of the mac-dev-center. So, once again,
I read their gettings things done with your mac article long after it was
posted and completely unaware of the Getting Things Done (or GTD) hype.

At first, it just
sounds as one of those boring managament-nonsense-peptalk things (and
probably that is precisely what it generically is). Or what do you think
about the following resume from Getting
started with ‘Getting things done’
:

  1. identify all the
    stuff in your life that isnÕt in the right place (close all open
    loops)
  2. get rid of the stuff that isnÕt yours or you donÕt
    need right now
  3. create a right place that you trust and that
    supports your working style and values
  4. put your stuff in the
    right place, consistently
  5. do your stuff in a way that honors
    your time, your energy, and the context of any given moment
  6. iterate and refactor mercilessly

But in fact there is
also some interesting material around at the 43 folders website which bring this
management-talk closer to home such as the How does a
nerd hack GTD?
post.

Also of interest are his findings after
a year working with the GTD setup. These are contained in three posts :
A Year
of Getting Things Done: Part 1, The Good Stuff
, followed by A Year of
Getting Things Done: Part 2, The Stuff I Wish I Were Better At
to
end with A Year of
Getting Things Done: Part 3, The Future of GTD?
. If these three
postings don’t get you intrigued, nothing else will.

So, is
there something like _GMD : Getting Mathematics Done_? Clearly, I
don’t mean getting theorems proved, that’s a thing of a few seconds of
inspiration and months to fill in the gaps. But, perhaps all this GTD
and the software mentioned can be of some help to manage the
everyday-workflow of mathematicians, such as checking the arXiv and the
web, maintaining an email-, pdf- and BiBTeX-database, drafting papers,
books and courses etc.

In the next few weeks I’ll try out some
of the tricks. Probably another way to state this is the question “which
Apps will survive Tiger?” Now that it is official that Tiger (that is, Mac
10.4 to non-apple eaters) will be released by the end of the month it is
time to rethink which of the tools I really like to keep and which is
just useless garbage I picked up along the road. For example, around
this time last year I had a Perl
phase
and bought half a meter or so of O’Reilly Perl-books. And yes
I did write a few simple scripts, some useful such as my own arXiv RSS-feeds,
some not so useful as a web-spider I wrote to check on changes in the
list of hamepages of people working in non-commutative algebra and
geometry. A year later I realize I’ll never become a Perl Monk. So from now on I want to
make my computer-life as useful and easy as possible, relying on wizards
to provide me with cool software to use and help me enjoy mathematics
even more. I’ll keep you posted how my GMD-adventure goes.

Leave a Comment