Sunday, 28 February 2016

How to USE StackEdit and Markdown in Blog!

How to USE StackEdit and Markdown in Blog!

In my blog, I will introduce some handy tools or software which make my life easer. Those blogs will have the tag tool&skills. As I am using Markdown1 and StackEdit2 to deal with my blog publication. Here, I will first make a simple introduction about this two tools and some tricks.

About Markdown

Markdown is a lightweight markup language with plain text formatting syntax designed so that it can be converted to HTML and many other formats3. If you use Git a lot, you must know that it is used to format readme files.

Markdown Syntax:

Original Code will shows like this.
Result will shows like this.

Headers

Following by different numbers of ‘#’ you can get different level’s header.
# H1
## H2
### H3

H1

H2

H3

Alternatively, for H1 and H2, an underline-ish style:
Alt-H1
======

Alt-H2
------

Alt-H1

Alt-H2

Emphasis

Emphasis, aka italics, with *asterisks* or _underscores_.

Strong emphasis, aka bold, with **asterisks** or __underscores__.

Combined emphasis with **asterisks and _underscores_**.

Strikethrough uses two tildes. ~~Scratch this.~~
Emphasis, aka italics, with asterisks or underscores.
Strong emphasis, aka bold, with asterisks or underscores.
Combined emphasis with asterisks and underscores.
Strikethrough uses two tildes.
Scratch this.
This is [an example](http://trussitn.eu/siyuan-chen/) inline link.

This is an example of link.

Image

![Image name](http://trussitn.eu/wp-content/uploads/2015/02/logo-120h-v1.jpg)

[![Image with link](http://trussitn.eu/wp-content/uploads/2015/02/logo-120h-v1.jpg)](http://trussitn.eu/siyuan-chen/)
Image name
Image with link

Footnotes

You can create footnotes like this[^footnote].

  [^footnote]: Here is the *text* of the **footnote**.
You can create footnotes like this4.

Tables

Markdown Extra has a special syntax for tables:
Item     | Value
-------- | ---
Computer | $1600
Phone    | $12
Pipe     | $1
Item Value
Computer $1600
Phone $12
Pipe $1
You can specify column alignment with one or two colons:
| Item     | Value | Qty   |
| :------- | ----: | :---: |
| A        | $1    |  4    |
| B        | $2    |  5    |
| C        | $3    | 6     |
Item Value Qty
A $1 4
B $2 5
C $3 6

Table of contents

You can insert a table of contents using the marker [TOC] to auto insert the table of contents:
[TOC]
[TOC]

Math Expressions

You can use LaTeX 5 syntax for mathematical expressions:
The *Gamma function* satisfying $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ is via the Euler integral

$$
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
$$
The Gamma function satisfying Γ(n)=(n1)!nN is via the Euler integral

Γ(z)=0tz1etdt.

Note: You can find more information about LaTeX mathematical expressions here.

UML diagrams

You can also render sequence diagrams like this:
```sequence
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!```
Created with Raphaël 2.1.2AliceAliceBobBobHello Bob, how are you?Bob thinksI am good thanks!
Note: You can find more information:
  • about Sequence diagrams syntax here,
  • about Flow charts syntax here.

About StackEdit

StackEdit is a browser editor. All your documents are automatically saved locally and are accessible offline!. It can binding to your Google Drive or Dropbox account to synchronization your work to the cloud. It also provided a one key publication function to push your work to Blog account.

Create a document

The document panel is accessible using the button in the navigation bar. You can create a new document by clicking New document in the document panel.

Delete a document

You can delete the current document by clicking Delete document in the document panel.

Export a document

You can save the current document to a file by clicking Export to disk from the menu panel.
Tip: Check out the Publish a document section for a description of the different output formats.

Synchronization

StackEdit can be combined with Google Drive and Dropbox to have your documents saved in the Cloud. The synchronization mechanism takes care of uploading your modifications or downloading the latest version of your documents.

Publication

Once you are happy with your document, you can publish it on different websites directly from StackEdit. As for now, StackEdit can publish on Blogger, Dropbox, Gist, GitHub, Google Drive, Tumblr, WordPress and on any SSH server.

Contact

Siyuan Chen
School of Civil, Structural and Environmental Engineering
University College Dublin, Ireland
siyuan.chen@ucd.ie

  1. Markdown is a lightweight markup language with plain text formatting syntax designed so that it can be converted to HTML and many other formats using a tool by the same name.
  2. StackEdit is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.
  3. https://en.wikipedia.org/wiki/Markdown
  4. Here is the text of the footnote.
  5. LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation.

No comments:

Post a Comment