Markdown kramdown, markdown, memos

Some memos for Markdown

Specials characters

Escape with \.

Test for smartypants substitution :

Markdown HTML
text ``text’’
"double-quoted text" “double-quoted text”
'single-quoted text' ‘single-quoted text’
(tm) (tm)
(r) (r)
(c) (c)
1/4th, 1/2, 3/4ths, and 5/4. 1/4th, 1/2, 3/4ths, and 5/4.
...
. . . . . .
A^B. A^(B+2) A^B. A^(B+2)
   
<< and >> « and »
   
&copy; ©
   
&trade;
   
&reg; ®
   
&frac12; ½
   
&frac14; ¼
   

Headers with class :

Title
===
{: .big .thin}

HTML element with inner markdown element

USe {::options parse_block_html="true" /} before ie :

{::options parse_block_html="true" /}

<section class="content about">

Traz
====
{:.big .thin}

Just a simple Ruby hobbyist from New Caledonia 

<http://traz.github.io> auto link to http://traz.github.io

blockquoted : http://traz.github.io

but not here <http://example.com/>

or here: <http://example.com/>

[Markdown] [1] give Markdown

[RDiscount][2] give RDiscount

with at the end of the page :

[1]: http://tedwise.com/markdown/
[2]: http://www.pell.portland.or.us/~orc/Code/markdown/

Inline link :

just [url name](/url.adress/ "title"), or [url name](url.adress) like Traz’s notes

For some inline page references, use the inline link [title](#html_id)

Images tags

Just like links : ![alt text](/path/to/img.png "Title") for inline or same for reference-style.

alt text

Or with reference :

![Alt text][id]
...
[id]: url/to/image  "Optional title attribute"

Code

Just one or 4 spaces. For highlighting with pygments, use `{ % highlighting lexername % }` starting block with a `{ % enhighlighting % }` (without space between { or } and % ).

Horizontal rules

--- or *** or ___


Headers

### Header 3 and ## Header 2

Emphasis

Use *word* or _word_ or **word** and __word__ give : word or word or word and word.

Lists

* for unordered can swap with +, or -

Ordered :

a. one b. two c. three

numbered :

  1. one
  2. two
  3. three

Blank line betweens items give some <p> tags for the list item.

Blockquotes

> ## This is a header.
> 
> 1.   This is the first list item.
> 2.   This is the second list item.
> 
> Here's some example code:
> 
>     return shell_exec("echo $input | $markdown_script");

*   A list item with a blockquote:
    > This is a blockquote
    > inside a list item.

*   A list item with a code block:
        <code goes here> gives

This is a header.

  1. This is the first list item.
  2. This is the second list item.

Here’s some example code:

return shell_exec("echo $input | $markdown_script");

Tables

First line is the header, second line define the alignment with the colon (on left, on right, or centered)

| header column 1 |          header column 2          | header column 3 |
| :-------------- | --------------------------------: | :-------------: |
| hello           |                            sailor |       test      |
| next            |                                 2 |        1        |
| 3rd line        | long text for testing the purpose |        5        |
header column 1 header column 2 header column 3
hello sailor test
next 2 1
3rd line long text for testing the purpose 5

Further tests

For center a text : ->center text<- :doesn’t work with kramdown, use instead :

**This is a test**
{: style="text-align: center"}

This is a test

tag1 *test* test
tag2
: data.
tag1
: data
tag1 test test
tag2
data. tag1
data

Inline <span> :

This is <span style="color: red">written in red</span>.

This is written in red.

This is *red*{: style="color: red"}.

This is red.


comments powered by Disqus