This is the second in a series of blog posts to help new users get more out of Trunk Notes. In this post I will introduce Markdown, the way to add some style to your wiki pages.
Why use a markup language?
Plain text is just that – plain. One font, one size, one colour. No bold, italics or underline. Simple yet lacking in style.
A markup language is a halfway house between plain text and a wysiwyg application like Microsoft Word. HTML is a markup language, and its used to format web pages. HTML however isn’t as easy to read as plain text.
There are a whole host of simpler markup languages which have been designed to be easy to write and read – for humans as well as computers. A well designed simple markup language should be quick to write, and you could show it to someone and they might just think they were looking at plain text.
Here is an example written in HTML and Markdown.
The same in Markdown
Markdown was created by John Gruber and is used by many blogging engines, wikis and other online tools.
To get started with Markdown is really simple. Many people will already be writing valid Markdown without even realising it.
Let’s say you want to write a numbered list. Here it is in Markdown:
You might look at that and think I’ve mistyped the numbers – they are all 1′s. However what I’ve done here is leave the hard job of counting to the computer! When I view the Markdown in Trunk Notes, that is get the computer to actually display all the formatting and styles, the computer will put the right numbers in for me.
You might say that counting isn’t very hard. What is boring though is renumbering lists when you want to insert something into the middle of them. For example,
Now when I view the list pears will have number 4 and bananas number 3 which is just what I wanted.
Another common type of list is a bulleted list. Here is a bulleted list in Markdown:
* ipod touch
Many people will already write their lists like that when writing in a plain text editor.
I hope you are starting to see how simple Markdown is!
Emphasising words is also easy. To put something in bold put two underlines to __turn on bold__, and two underlines to turn it off again.
Italics are often used when you don’t want as much emphasis as bold provides. Logically then to use italics you use just one underline. _Italicised text is also simple_
Another main formatting technique used to help structure text is to use headings of different sizes.
To make a line of text into the main heading for a page simply put a # (hash) at the start of the line. For example,
# A Heading
If you want a second level heading put ## – and so on.
Markdown in Trunk Notes
Trunk Notes makes Markdown even simpler to use. When editing text you are provided with a toolbar (unless you are in landscape mode on the iPhone where there is limited vertical space).
The first button on the toolbar will add up to three #’s to the start of the line. It doesn’t matter where the cursor is, Trunk will do the right thing.
The next button is for making bulleted lists. Simply tap the button once to start a list. If you want to add a new item to the list simply press return on the keyboard and Trunk Notes will start a new bullet point on the next line down. Numbered lists work in exactly the same way and are controlled by the third toolbar button.
When you are writing stuff on the computer you often want to provide links to websites or, in the case of a wiki, other pages you have written.
iOS does a great job of recognising links for you in text. If you want though to be a little more explicit about what is a link to a website just put < > around the website name.
Trunk Notes makes it really easy to create links to other pages in your wiki. The easiest type of link is to a page which is a WikiWord – that is a word which is actually two or more words stuck together with each word being capitalised. If Trunk Notes spots a wiki word it will automatically make it into a link. This is an extension to Markdown so don’t expect to be able to do this in other Markdown editors!
The other type of link is to a page which isn’t a wiki word. Here you just surround the word or phrase by [[ ]]. For example [[link to a page about pasta]]. You can even make links nicer to read by providing display text – [[xyyz|click here to read about radishes]] (that is any text after the bar character will be shown instead of the link name).
There is lots more you can do with Markdown. Here are a couple of resources if you want to find out more:
Markdown on daringfireball.net
Lots of cheat sheets you can print out