Skip to content

ieeecscet/Markdown-tutorial

Repository files navigation

Learning Markdown

logo

Understanding of a concept begins from the definition of that concept

Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).. As said by John Gruber Co-Founder of Markdown. Markdown can be written in a basic text editor (don't use Word) like TextEdit for Mac (save as plain-text) or Notepad on Windows. It's an easy way to write text that easily translates into HTML. The web is written in HTML, so think of it like quick-start web development tool for content editors. When you write in Markdown, you save the document with the file extension .md. More often than not, you'll never need to save a Markdown document, because you'll be using an online tool. Markdown applications use something called a Markdown processor (also commonly referred to as a “parser” or an “implementation”) to take the Markdown-formatted text and output it to HTML format. At that point, your document can be viewed in a web browser or combined with a style sheet and printed. You can see a visual representation of this process below. workflow

Well that was pretty simple,but why do we really need markdown?

Markdown gets rid of all the distractions of a formatting toolbar and mouse clicks by helping you focus on your writing without lifting your fingers off of the keyboard. Advanced writers love this kind of seamless experience which allows them to stylize their text on the fly. Since Markdown is just plain text, it can be exported to a variety of applications and can be converted into a bunch of formats like PDF, epub, Docx, HTML, etc. You don’t need to worry about formatting, just start writing and export your document once you are done. Markdown is a fast and easy way to take notes, create content for a website, and produce print-ready documents. It doesn't take long to learn the Markdown syntax, and once you know how to use it, you can write using Markdown just about everywhere. Most people use Markdown to create content for the web, but Markdown is good for formatting everything from email messages to grocery lists. Here are some examples of what you can do with Markdown.

Websites

Markdown was designed for the web, so it should come as no surprise that there are plenty of applications specifically designed for creating website content. If you're familiar with HTML, CSS, and version control, check out Jekyll, a popular static site generator that takes Markdown files and builds an HTML website. One advantage to this approach is that GitHub Pages provides free hosting for Jekyll-generated websites. If Jekyll isn't your cup of tea, just pick one of the many other static site generators available.

Documents

Markdown doesn't have all the bells and whistles of word processors like Microsoft Word, but it's good enough for creating basic documents like assignments and letters. You can use a Markdown document authoring application to create and export Markdown-formatted documents to PDF or HTML file format. The PDF part is key, because once you have a PDF document, you can do anything with it — print it, email it, or upload it to a website.

Notes

In nearly every way, Markdown is the ideal syntax for taking notes. Sadly, Evernote and OneNote, two of the most popular note applications, don't currently support Markdown. The good news is that several other note applications do support Markdown If you can't part with Evernote, check out Marxico, a subscription-based Markdown editor for Evernote, or use Markdown Here with the Evernote website.

Documentation

Markdown is a natural fit for technical documentation. Companies like GitHub are increasingly switching to Markdown for their documentation — check out their blog post about how they migrated their Markdown-formatted documentation to Jekyll. If you write documentation for a product or service, take a look at these handy tools:

  • Read the Docs can generate a documentation website from your open source Markdown files. Just connect your GitHub repository to their service and push — Read the Docs does the rest. They also have a service for commercial entities.
  • VuePress is a static site generator powered by Vue and optimized for writing technical documentation.
  • Jekyll was mentioned earlier in the section on websites, but it's also a good option for generating a documentation website from Markdown files. If you go this route, be sure to check out the Jekyll documentation theme.

Tools you need or probably don't

Most of you are using VsCode and it has inbuilt markdown functionality.For more info on this go here And for those of you using Sublime Text there are 2 plugins which will be helpful-->MarkdownEditor and MarkdownLivePreview.

You don’t even need to download anything. There are several online Markdown editors that you can use to try writing in Markdown. Dillinger is one of the best online Markdown editors. Just open the site and start typing in the left pane. A preview of the rendered document appears in the right pane.Dillinger

!!BELOW ARE SOME TOOLS FOR PURE MARKDOWN AND ARE NOT NECESSARY UNLESS YOU ARE WRITING CONTENT PURELY IN MARKDOWN!!

  • ReText for linux users get it here.
  • Mou for Mac users but if you have updated to Mojave you gotta pay get it here.
  • Marked is a tool providing live preview as you write in any text editor.

SYNTAX

We will be focusing mainly on GFM or Github Flavoured Markdown which is markdown but with added functionality from github.It's really all about looking it up multiple times in cheat sheets as and when you need it and eventually you'll be a pro at it Some links to useful resources are:

OVERVIEW

These are the elements outlined in John Gruber's original design document. All Markdown applications support these elements.

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Blockquote > blockquote
Ordered List 1. First item
2. Second item
3. Third item
Unordered List - First item
- Second item
- Third item
Code `code`
Horizontal Rule ---
Link [title](https://www.example.com)
Image ![alt text](image.jpg)

Text in markdown

It's very easy to make some words **bold** and other words *italic* with Markdown. **BOLD1** __BOLD2__ __*BOLD + ITALIC*__

# this is a h1 tag
## this is a h2 tag
### this is a h3 tag
#### this is a h4 tag
##### this is a h5 tag
###### this is a h6 tag

It's very easy to make some words bold and other words italic with Markdown. BOLD BOLD2 BOLD + ITALIC

this is a h1 tag

this is a h2 tag

this is a h3 tag

this is a h4 tag

this is a h5 tag
this is a h6 tag

Any word wrapped with two tildes (like this) will appear crossed out.

Blockquotes

>Markdown is cool and you who is trying to master it is cooler
Begin the second level of blockquotes
>
>>Me
>
End the second level of blockquotes

Markdown is cool and you who is trying to master it is cooler

Me

You can use an Horizontal line easily like this * * * or *** which will result in


To display a literal character that would otherwise be used to format text in a Markdown document, add a backslash (\) in front of the character.

\* Without the backslash, this would be a bullet in an unordered list.

The rendered output looks like this:

* Without the backslash, this would be a bullet in an unordered list.

Characters You Can Escape

You can use a backslash to escape the following characters.

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

LISTS

Sometimes you want numbered lists:

1. One
2. Two
3. Three

Sometimes you want bullet points:

* Start a line with a star
* Profit!

Alternatively,

- Dashes work just as well
- And if you have sub points, put two spaces before the dash or star:
  - Like this
  - And this

Sometimes you want numbered lists:

  1. One
  2. Two
  3. Three

Sometimes you want bullet points:

  • Start a line with a star
  • Profit!

Alternatively,

  • Dashes work just as well
  • And if you have sub points, put two spaces before the dash or star:
    • Like this
    • And this

CODE IN MARKDOWN

This is where Github flavoured markdown really comes into play.Syntax highlighitng for multiple languages and is really easy to implement.

Inline code is written by enclosing in backticks. Multi line code is enclosed by ```

```language name
code
``` 

for syntax highlighting

code

Markdown and print('code') go hand in hand

x=[a for a in x if a>1]
for i in x:
    if i<1:
        print("Python doesn't work")
x=[a for a in x if a>1]
for i in x:
    if i<1:
        print("Python doesn't work")

Tables

You can create tables by assembling a list of words and dividing them with hyphens - (for the first row), and then separating each column with a pipe |:

code

First Header Second Header
Content from cell 1 Content from cell 2
Content in the first column Content in the second column

Images

We can get cool images like this one using the syntax ![alternate txt](url)

cool

Links

We can have inline links like this-> hello this is an [example link](http://example.com)

hello this is an example link

We can also have images as links as we can see from this example where the illuminati symbol leads us to the wiki page of the illuminati. The syntax is: [![alt txt](url)](link url)

ill

EXTRAS

GitHub supports emoji so go crazy

👍 ✨ 🐫 🎉

🚀 🤘 :octocat:

THIS IS THE EMOJI CHEAT SHEET

Typing an @ symbol, followed by a username, will notify that person to come and view the comment. This is called an “@mention”, because you’re mentioning the individual. You can also @mention teams within an organization

Task Lists

This is how you make task lists

code

  • This is a complete item
  • This is an incomplete item

Well hopefully you have been convinced that learning Markdown is useful and you have got a good idea as to how to use it.Happy coding!

About

A source to learn markdown

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published