Learning Markdown - Frugal Guidance 2 - http://andybrandt531.com

Part 2: Learning Basic Character Formatting

If you are worried about whether you can learn how to write using Markdown, relax. This is the easy stuff. Memorize a few things and you have it down.

Paragraphs

Create separate paragraphs by typing an extra space between them. Just hit Enter or Return twice on you keyboard. (Two Carriage Returns (i.e. <cr> <cr>, if you studied programming.) The result is a space between paragraphs, as you see here.

If you write poetry, though, you already see a problem: you don’t want an extra space between lines in your poems. To solve this issue, you can end a paragraph with two spaces followed by the Enter/Return key, which then creates a new line without the space. Nifty, eh?

Hear the sledges with the bells –
Silver bells!
What a world of merriment their melody foretells!
How they tinkle, tinkle, tinkle,
In the icy air of night!
While the stars that oversprinkle
All the heavens seem to twinkle
With a crystalline delight;

The 2-space trick is also useful if you want
to break text between lines at a specific location.

Full honesty disclosure: In my WordPress editor, the HTML code produced by Markdown by the 2-space trick is, apparently, filtered out and doesn’t work. This might be due to built-in CSS settings in my theme.  I had to adjust it manually by replacing the Return with a Shift-Enter. This shouldn’t  be a problem with blogging software using Markdown editors. Sometimes you have to expect the unexpected. 

What happens if you forget to put the extra line between paragraphs? Then your text gets mushed together into one very long paragraph. This might happen if you are cutting and pasting text from a word processor. If it’s a long article, you might want to go back to the word processor and use Find and Replace to change each single paragraph mark to two.

Emphasis / Italics

Italic sample

To italicize any text, from a single letter to a paragraph, just place an asterisk ( * ) before and after the text to make it italic.

If you type:

Type *asterisks* to get italics.

This will result in:

Type asterisks to get italics.

When translated into HTML code, this will look like:

<p>Type <em>asterisks</em> to get italics.</p>

(This is how your website HTML interpreter/editor will format your text.)

You may have used asterisks in old email editors to imitate italics. You may also have used an underscore ( _ ) in your email, which also works in Markdown.

Type this:

You can also use a single _underscore_ to create italics.

To get this:

You can also use a single underscore to create italics.

If you do decide to start learning HTML, you should know that HTML doesn’t use the word “italics” but the word “emphasis” instead, abbreviated <em> and closed with </em>.

Boldface / Strong Text

Boldface sample

Similar to italics, you can create bold text by using two asterisks (**) or two underscores (__) before and after the text.

If you type:

Use two **asterisks** or two __underscores__ to indicate **boldface**.

It will appear as:

Use two asterisks or two underscores to indicate boldface.

This will translate into the HTML code:

<p>Use two <strong>asterisks</strong> or two <strong>underscores</strong> to indicate <strong>boldface</strong>.</p>

Combining Bold and Italic

Bold Italic

It’s not commonly used, but if you have an itch to combine both italics and boldface together, use three asterisks.

Type this:

This creates ***an italicized boldface***.

Which which will appear as:

This creates an italicized boldface.

Or nest the combination:

**An Analysis of Gershwin's *An American in Paris***

In order to read as:

An Analysis of Gershwin’s An American in Paris

You can also add ___three underscores___ which will result in the same italicized boldface. I find it easier to count asterisks than underscores when proofreading, though, so I prefer to use asterisks.

Both of these abbreviations create the same HTML code:

<p>This creates <strong><em>an italicized boldface</em></strong>.</p>

(Are you beginning to see how Markdown might be easier to proofread than HTML?)

Note that the triple asterisk or triple underscore does not work in all Markdown translators. Sometimes a triple underscore will work when a triple asterisk doesn’t. Experiment if you need to.

Adding some extra simple HTML for special formatting

Strikethrough Text

Strikethrough

There is no basic Markdown abbreviation for the lesser used strikethrough characters. But, if you need it, just surround the text with <del> before the text, and </del> afterwards. Notice that the second (ending) mark has an extra slash ( / ) before the “del”. This is standard in HTML for ending a formatting control.

So type:

I really thought the idea was <del>stupid</del> creative.

To view as:

I really thought the idea was stupid creative.

If your Markdown editor, however, uses MultiMarkdown or Github Flavored Markdown, you can get Strikethrough text by simply typing two tildes ( ~~ ) at the beginning and end of the text.

Some editors let you type tildes to get ~~strikethrough~~ text.

Which reads as:

Some editors let you type tildes to get strikethrough text.

Underscore / Underlined text

Underlined

Similarly, you can create underlined text using some simple HTML by using
<ins> before and </ins> afterwards.

So type:

I use <ins>underlined</ins> text, when I’m nostalgic for my old typewriter.

To view as:

I use underlined text, when I’m nostalgic for my old typewriter.

Horizontal Rules

Horizontal rule

If you want to separate parts of your blog post with a horizontal line or “rule”, just type:

*** or * * * or --- or ___ or some variation of at least 3 of the characters, with or without spaces.

Or you can just add the HTML code: <hr />

If you get tired of simple, thin horizontal rules, note that some blog themes or plug-ins will allow you to add fancier rules, thick rules, double rules, rules with shadows and rules with icons. This is going beyond the capabilities of Markdown, though.

Wrap Up

These are most of the types of text formatting that you will probably need to use on a blog, so Markdown is a great way to enter the formatting on the fly without using a special HTML editor. As we mentioned before, many of the newer easy-to-use blogging platforms only use a Markdown editor.

In the next post, we’ll take a look at creating headlines and  lists in Markdown. See the other parts of this series:

Markdown for Bloggers – Why Use Markdown? (part one)
Markdown for Bloggers – Headlines & Lists (part three)
Markdown for Bloggers – Web Links (part four)
Markdown for Bloggers – Quoting Text and Code (part five)
The Monster List of Markdown Tools (part six

References:

Poem excerpt is from The Bells by Edgar Allen Poe.

Church photo (no, it’s not really the Church of St. Markdown), is of the Presbyterian Memorial Church in Dover, New Jersey, one of the picturesque buildings in this area. It’s Copyright 2014 by the author, Andrew Brandt, edited in Photomatix Pro, Adobe Photoshop and Topaz plugins.

Frugal Guidance 2 - http://andybrandt531.com