Markdown Syntax for Dummies

Further to my post of a few days ago, I have compiled an easier-to-read list of Markdown’s syntax for future reference.

Basic Character Codes

**strong** or __bold__
strong or bold

*emphasis* or_italics_`
emphasis or italics

two spaces followed by a line break
<br />

Head Levels

Pound symbols (one for each level) followed by a space
## H2 Level Head

H2 Level Head

Block Quotes

> Block Quote text

Block Quote text

Lists

Unordered lists use asterisks *, pluses +, and hyphens —, followed by a space, interchangeably as list markers:
* bob
* frank
* sue

Ordered Lists have any numeral (e.g. 1) followed by a period and a space
1. abc
1. bcd
4. cde
1. abc
1. bcd
4. cde

Horizontal Rule

Three or more hyphens, asterisks, or underscores on a line by themselves
***


Hyperlinks

This is [an example](http://example.com/) inline link.
This is an example
or
Define [ID1]: http://example.com/ as a link anywhere in the body and call it using
[ID1]
ID1

Images

![Alt text](http://macblaze.ca/wp-content/uploads/2014/12/1-150x82.jpg)
Alt text

Images can also be defined. Define [ID2]: http://macblaze.ca/wp-content/uploads/2014/12/1-150x82.jpg
and call it using [ID2]
ID2

Backslash Escapes

Markdown allows you to use backslash escapes to generate literal characters that have special meaning in Markdown’s formatting syntax.
\*literal asterisks\*
*literal asterisks*

\ backslash
` backtick
* asterisk
_ underscore
{} curly braces
[] square brackets
() parentheses
# hash mark
+ plus sign
- minus sign (hyphen)
. dot
! exclamation mark

Markdown

Markdown is a text based language basically designed to allow you to do simple code while working in a text editor. The curious can learn more here: daringfireball.net/projects/markdown/. I bring this up because as it is approaching the end of the year, I have been tidying up my annual book list (2013, 2012) to get ready to post in the new year. In the past I have prepared the formatting of this list a number of ways from using search and replace to typing it directly into WordPress. In the end, I have found that maintaining a text file using IA Writer which syncs between all my mobile devices and that has the prepared html code has been easiest. I use this:

<i><strong>title</strong></i> author (date)<br>
<b>series</b> Book # – ebook; reread

And it shows this:
title author (date)
series Book # – ebook; reread

I simply copy and paste the code, fill in the proper info and am good to go. The only downside is occasionally I forget to copy the code and then have to recreate the code template. But that’s not too much effort so I haven’t worried about it. But a little reading about Markdown is convincing me that next year I should be able to simplify the procedure. The theory is if I type:

_**Cally's War**_ John Ringo &amp; Julie Cochrane (2004)
**Cally's War** Book 1 - ebook; reread

It should come out as:

Cally’s War John Ringo & Julie Cochrane (2004)
Cally’s War Book 1 – ebook; reread

And look at that, it totally does… You can agree that it’s a whole hell of a lot less typing to format the entries using Markdown than traditional html. I just have to learn a little new syntax.

To enable Markdown for use on my WordPress blog I had to activate the default JetPack plugin and sign in to WordPress.com. After that simply activating the Markdown portion converts the code on the fly without destroying the original text-based code. That should make it easier to write all sorts of entries in my text editors.

Markdown Syntax

Here are a few more  examples of Markdown syntax:

This is an H1
=============

This is an H1

===

This is an H2
-------------

This is an H2

or

# This is an H1
## This is an H2
#### This is an H4

etc.

This is an H1

This is an H2

This is an H4

Pretty simple stuff. The rest of this post is an abridged cut-and-paste from the Markdown Syntax page.

Markdown uses > characters for blockquoting. If you’re
familiar with quoting passages of text in an email message, then you
know how to create a blockquote in Markdown. It looks best if you hard
wrap the text and put a > before every line:

> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
>
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
> id sem consectetuer libero luctus adipiscing.

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.

Markdown allows you to be lazy and only put the > before the first
line of a hard-wrapped paragraph:

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.

Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by
adding additional levels of >:

> This is the first level of quoting.
>
> > This is nested blockquote.
>
> Back to the first level.

This is the first level of quoting.

This is nested blockquote.

Back to the first level.

Markdown supports ordered (numbered) and unordered (bulleted) lists.

Unordered lists use asterisks, pluses, and hyphens — interchangably
— as list markers:

* Red
* Green
* Blue

or

+ Red
+ Green
+ Blue

is

  • Red
  • Blue
  • Green

Ordered lists use numbers followed by periods:

1. Bird
2. McHale
3. Parish

  1. Me
  2. You
  3. Bobby McGee

The one other thing of note is the use of escape characters. A ` before and after a line allows the code to be displayed without applying the formatting or an indent of 4 spaces will show the code in an offset block:

* Bird
* McHale
* Parish

One has to do that in Text view and then post or else WordPress will helpfully delete the blank spaces, so its easiest to use the `

Twitter Digest