Difference between revisions of "Markdown"

From Sustainability Methods
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
# What is Markdown?
+
== What is Markdown? ==
 
Markdown is an easy-to-use markup language that is used with plain text to add formatting elements (headings, bulleted lists, URLs) to plain text without the use of a formal text editor or the use of HTML tags.
 
Markdown is an easy-to-use markup language that is used with plain text to add formatting elements (headings, bulleted lists, URLs) to plain text without the use of a formal text editor or the use of HTML tags.
  
## Why Markdown?
+
=== Why Markdown? ===
- Can be used for everything (websites, documents, notes, books, presentations, email messaged, and technical documentation).
+
* Can be used for everything (websites, documents, notes, books, presentations, email messages, and technical documentation).
- Portability: Files containing Markdown-formatted text can be opened using virtually any application.
+
* Portability: Files containing Markdown-formatted text can be opened using virtually any application.
- Platform independent: You can create Markdown-formatted text on any device running any operating system.
+
* Platform independent: You can create Markdown-formatted text on any device running any operating system.
- Future proof: You’ll always be able to read Markdown-formatted text using a text editing application.
+
* Future proof: You’ll always be able to read Markdown-formatted text using a text editing application.
- It is everywhere: Websites like Reddit and GitHub support Markdown, and lots of desktop and web-based applications support it.
+
* It is everywhere: Websites like Reddit and GitHub support Markdown, and lots of desktop and web-based applications support it.
  
## How does Markdown work?
+
=== How does Markdown work? ===
 
1. Create a Markdown file using a text editor or a dedicated Markdown application. The file should have an .md or .markdown extension.
 
1. Create a Markdown file using a text editor or a dedicated Markdown application. The file should have an .md or .markdown extension.
 +
 
2. Open the Markdown file in a Markdown application.
 
2. Open the Markdown file in a Markdown application.
 +
 
3. Use the Markdown application to convert the Markdown file to an HTML document.
 
3. Use the Markdown application to convert the Markdown file to an HTML document.
 +
 
4. View the HTML file in a web brower or use the markdown application to convert it to another file format, like PDF.
 
4. View the HTML file in a web brower or use the markdown application to convert it to another file format, like PDF.
  
  
## Pros && Cons
+
=== Strengths & Challenges ===
- simplicity, being fast and easy to learn made it very popular
+
* It simple, fast and easy to learn which made it very popular
- all features of HTML can be used in Markdown and it is more readable rather than HTML
+
* All features of HTML can be used in Markdown and it is more readable than HTML
- Markdown is not able to map different element types to each other, so it is less useful as a semantic tool
+
* Markdown is not able to map different element types to each other, so it is less useful as a semantic tool
- Creation of table of contents, reusing content, mixing parts together and managing larger documents are not possible
+
* Creation of table of contents, reusing content, mixing parts together and managing larger documents are not possible
## Basics - more on [docs.github](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)
+
 
##### *Create Heading*:
+
In the following, the basics will be presented. You can find more [https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax here]
 +
 
 +
== Formating examples ==
 +
=== Headings ===
 +
Create a hierarchically nested system in your text, and consider balance to this end. Most larger headings should contain smaller headings, yet not too many of these. Find a balance.
 +
<syntaxhighlight lang="R" line>
 
`# The largest heading`
 
`# The largest heading`
 
`## The second largest heading`
 
`## The second largest heading`
 
`##### The smallest heading`
 
`##### The smallest heading`
# Like This Heading
+
</syntaxhighlight>
 
 
  
 +
=== Text styles ===
 +
<syntaxhighlight lang="R" line>
 
##### *Styling text*:
 
##### *Styling text*:
 
`**This is bold text**`
 
`**This is bold text**`
Line 36: Line 45:
  
 
**Like this bold text**
 
**Like this bold text**
 +
</syntaxhighlight>
 +
 +
=== Quoting ===
 +
<syntaxhighlight lang="P" line>
 
##### *Quoting*:
 
##### *Quoting*:
  
 
`> Text is a quote`
 
`> Text is a quote`
>Like this  quote
+
> Like this  quote
 
`Use backticks (``) to code quote `
 
`Use backticks (``) to code quote `
 
```
 
```
Line 49: Line 62:
 
A code block like this
 
A code block like this
 
```
 
```
 +
</syntaxhighlight>
  
 +
=== Links ===
 +
<syntaxhighlight lang="P" line>
 
##### *Links*:
 
##### *Links*:
 
`This normal text includes the website [website text](https://docs.github.com)`
 
`This normal text includes the website [website text](https://docs.github.com)`
 
  
 
##### *Relative Links*:
 
##### *Relative Links*:
Line 59: Line 74:
 
##### *Images*:
 
##### *Images*:
 
`We can display an image using ![image text](image_link)`
 
`We can display an image using ![image text](image_link)`
 +
</syntaxhighlight>
  
 +
=== Lists ===
 +
<syntaxhighlight lang="P" line>
 
##### *List*:
 
##### *List*:
 
```
 
```
Line 81: Line 99:
 
     * this would be the third nested list item
 
     * this would be the third nested list item
 
```
 
```
 +
</syntaxhighlight>
  
 +
=== Mentions and footnotes ===
 +
<syntaxhighlight lang="P" line>
 
##### *Mentioning people and Teams*:
 
##### *Mentioning people and Teams*:
 
`@name Do you understand how it works?`
 
`@name Do you understand how it works?`
Line 100: Line 121:
 
[^note]: words are still converted to numbers but makes it more readable for you as you edit.
 
[^note]: words are still converted to numbers but makes it more readable for you as you edit.
 
```
 
```
 +
</syntaxhighlight>
  
##### *Ignore Markdown formatting*:
 
`Just use a backwards dash in order to ignore the \*formatting\*`
 
\*Ignore my format Like This*
 
 
 
### Emojis:
 
 
 
@Henrik :wink: This PR looks great :dizzy_face:
 
 
### LaTex
 
 
You can render LaTeX mathematical expressions using [KaTeX](https://khan.github.io/KaTeX/):
 
 
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\,.
 
$$
 
 
 
 
### Flowchart
 
 
 
## UML diagrams
 
 
You can render UML diagrams using [Mermaid](https://mermaidjs.github.io/). For example, this will produce a sequence diagram:
 
  
  
 
----
 
----
 
[[Category:Statistics]]
 
[[Category:Statistics]]
[[Category:Python examples]]
+
[[Category:Markdown]]
 +
[[Category:R]]
 +
[[Category:Python]]
  
The [[Table_of_Contributors|author]] of this entry is
+
The [[Table_of_Contributors|author]] of this entry is XX. Edited by Milan Maushart

Latest revision as of 12:55, 29 July 2024

What is Markdown?

Markdown is an easy-to-use markup language that is used with plain text to add formatting elements (headings, bulleted lists, URLs) to plain text without the use of a formal text editor or the use of HTML tags.

Why Markdown?

  • Can be used for everything (websites, documents, notes, books, presentations, email messages, and technical documentation).
  • Portability: Files containing Markdown-formatted text can be opened using virtually any application.
  • Platform independent: You can create Markdown-formatted text on any device running any operating system.
  • Future proof: You’ll always be able to read Markdown-formatted text using a text editing application.
  • It is everywhere: Websites like Reddit and GitHub support Markdown, and lots of desktop and web-based applications support it.

How does Markdown work?

1. Create a Markdown file using a text editor or a dedicated Markdown application. The file should have an .md or .markdown extension.

2. Open the Markdown file in a Markdown application.

3. Use the Markdown application to convert the Markdown file to an HTML document.

4. View the HTML file in a web brower or use the markdown application to convert it to another file format, like PDF.


Strengths & Challenges

  • It simple, fast and easy to learn which made it very popular
  • All features of HTML can be used in Markdown and it is more readable than HTML
  • Markdown is not able to map different element types to each other, so it is less useful as a semantic tool
  • Creation of table of contents, reusing content, mixing parts together and managing larger documents are not possible

In the following, the basics will be presented. You can find more here

Formating examples

Headings

Create a hierarchically nested system in your text, and consider balance to this end. Most larger headings should contain smaller headings, yet not too many of these. Find a balance.

`# The largest heading`
`## The second largest heading`
`##### The smallest heading`

Text styles

##### *Styling text*:
`**This is bold text**`
`*This text is italicized* or _This text is italicized_`
`**This text ist bold and _partly italicized_**`
`***The entire text is bold and italicized***`

**Like this bold text**

Quoting

##### *Quoting*:

`> Text is a quote`
> Like this  quote
`Use backticks (``) to code quote `
```
\```  without backslash (\)
This is a 
code quote block
\````
```
A code block like this
```

Links

##### *Links*:
`This normal text includes the website [website text](https://docs.github.com)`

##### *Relative Links*:
`We can link a relative to the current file by [text](path/file.md)`

##### *Images*:
`We can display an image using ![image text](image_link)`

Lists

##### *List*:
```
[A link Like this to run Markdown ](https://stackedit.io/app#)
![test imge](https://picsum.photos/200/300)
```markdown
- George Washington
- John Adams
- Thomas Jefferson
```
- We can also created
- unordered lists
1. or create 
2. ordered lists
```

##### *Nested Lists*:
```
1. First list item
   - either (-) or (*) needs to be under the first character of the previous item
     * this would be the third nested list item
```

Mentions and footnotes

##### *Mentioning people and Teams*:
`@name Do you understand how it works?`

```
@https://github.com/teslamotors

##### *Footnotes*:
```
Simple footnote[^1]
Footnote with several lines[^2]
It is also possible to use words[^note]

[^1]: First reference
[^2]: Second reference
   with multiple lines

[^note]: words are still converted to numbers but makes it more readable for you as you edit.
```



The author of this entry is XX. Edited by Milan Maushart