Taking Notes with Markdown

Why markdown ?

Markdown is an easy to learn and quickly applicable markup
language. The simple syntax makes it ideal for taking notes
at school. Another huge advantage is, markdown files can
be exported to other document formats like html, LaTex, Office Word
or PDF.

Markdown is also widely used to write technical documentations
(README.md on github for example)

Editors

There’s a variety of online editors like
- Dillinger
- Stackedit

While they are pretty great, you are still bound to a network
connection. This is where a great text editor comes in handy.

You can use editors like Notepad++ or Sublime Text with various plugins and add-ons.


Sublime Text 2

sublime01.jpg

Why Sublime Text ?

Sublime is a great text editor and has a lot of features
and extensions. Here is a good reason why you are
much faster when working with Sublime Text.

Installation

Install Sublime Text from the official website and then
the additional package manager to easily add new extensions.
- Sublime Text 2
- [Package Manager]

Packages

To make Sublime Text 2 markdown compatible, the following
packages necessary for a better experience.

To install the packages, open the package manager with
ctrl + shift + p and type Install Package.
Then enter the names of the packages.

( tools recomended by source 1 )

Setup

Default Filetype

If you want every newly created document to be a .md file, follow the steps bellow.

To change the new filetype go to Preferences > Browse Packages...
Locate the Default File Type/default_file_type.sublime-settings
and open it with Sublime Text 2.
Change it to read:

{
    // location of the language syntax
    "default_new_file_syntax": "Packages/Markdown/Markdown.tmLanguage",
    // true, if you want to open a new file with the same syntax as the one you
    // have already opened
    "use_current_file_syntax": true
}

Save it, open a .md file. While the .md file is displayed, go to
View > Syntax > Open all with current extension as... and then choose your
favorite editor style under Markdown or MarkdownEditor.

Browser Preview

Again, open package control by pressing ctrl + shift + p and then type
Markdown Preview: Preview In Browser, press enter and then select one of the displayed options. Now your default browser should display the generated html file. This html file gets updated each time you save the .md file.
If you don’t want to manually refresh your browser each time, there are some
browser extensions available. Just search for auto refresh.

Markdown Syntax

There are various tutorial and reference manuals available online.
I recommend this cheatsheet from source 2 to start with.

Style Customization

Highlighting

To add the option of text highlighting, you can add the following code at the
end of your .md file. This allows you to change the emphasised styling.

<style>
.markdown-body strong {
    /* font-weight: lighter; */       /* not bold */
    background-color: #FFFF75;  /* yellow text */
}
</style>

Inline HTML

Also inline html works mostly well in markdown.

This is a </p><p style="color:red;">red</p><p>text in markdown.

This is a

red

text in markdown.

Export

Download and install Pandoc on your machine.

To convert your .md file to a .pdf open your directory in the command line.
You can then use the command pandoc to convert the markdown file to almost anything.

PDF

C:\Users\simon\Desktop>pandoc notes.md -o notes.pdf

WORD

C:\Users\simon\Desktop>pandoc notes.md -o notes.docx

The first time you do this, it will ask you to install some additionally required packages.