This repository contains various markdown templates and snippets to simplify the creation of consistent and well-formatted documents, especially for README files on GitHub.
This repository contains commonly used markdown styles and templates, including headers, math equations, mermaid diagrams, and other useful markdown elements.
This section provides guidelines for styling the README.md file to maintain consistency and reduce redundancy.
<style>
mark:
</style>Below are examples of headers (H1, H2, H3) and their corresponding markdown code:
# H1## H2### H3You can create ordered and unordered lists using markdown:
1. Nice
1. Nice
1. Nice
* Nice
* Nice
* Nice- Nice
- Nice
- Nice
- Nice
- Nice
- Nice
Here are some useful tips and tricks for writing markdown:
- Anchor Links:
(DOESN'T WORK)
Create internal links to other sections:
NOTE: replace every capital letter with a small letter, and replace spaces and dots with dashes[Go to top](#readme-guide)
- Emojis: Add emojis using
:emoji_name:(e.g.,:smile:for π). See a full list of GitHub-supported emojis here.
- Links: Create hyperlinks using
[link text](URL). For example: Markdown Guide.
-
Task Lists: Use
- [ ]for an unchecked item and- [x]for a checked item:- [ ] Incomplete Task - [x] Completed Task
- Incomplete Task
- Completed Task
- Collapsible Sections:
Use HTML tags to create collapsible sections:
<details> <summary>Click to expand!</summary> Hidden content goes here. </details>
Click to expand!
Hidden content goes here.
- Footnotes: Add footnotes using
[^1]and reference them at the bottom: Example: Here's a footnote reference1.
A collection of commonly used math equations written in LaTeX:
1. $$a^2 + b^2 = c^2$$
2. $$ax^2 + bx + c = 0$$
3. $$x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
4. $$m = \dfrac{y_2 - y_1}{x_2 - x_1} = \dfrac{\Delta y}{\Delta x}$$
5. $$f'(x) = \lim\limits_{\Delta x \to 0} \dfrac{f(x+\Delta x)-f(x)}{\Delta x}$$
6. $$\dfrac{d}{dx} \left [x^n \right ] = nx^{n - 1}$$
7. $$\int_a^b f(x)~dx = \left [F(x) \right ]_a^b = F(b) - F(a)$$
8. $$\int_a^b f(x)~dx = f(c)(b - a)$$
9. $$\text{average value} = \dfrac{1}{(b-a)} \int_a^b f(x)~dx$$
10. $$\dfrac{d}{dx} \left [\int_a^x f(t)~dt \right ] = f(x)$$Rendered Equations:
$$a^2 + b^2 = c^2$$ $$ax^2 + bx + c = 0$$ $$x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$ $$m = \dfrac{y_2 - y_1}{x_2 - x_1} = \dfrac{\Delta y}{\Delta x}$$ $$f'(x) = \lim\limits_{\Delta x \to 0} \dfrac{f(x+\Delta x)-f(x)}{\Delta x}$$ $$\dfrac{d}{dx} \left [x^n \right ] = nx^{n - 1}$$ $$\int_a^b f(x)~dx = \left [F(x) \right ]_a^b = F(b) - F(a)$$ $$\int_a^b f(x)~dx = f(c)(b - a)$$ $$\text{average value} = \dfrac{1}{(b-a)} \int_a^b f(x)~dx$$ $$\dfrac{d}{dx} \left [\int_a^x f(t)~dt \right ] = f(x)$$
Mermaid diagrams can be used to create flowcharts and other diagrams within markdown.
Example of a simple mermaid graph:
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
- Sequence Diagram:
```mermaid
sequenceDiagram
participant A as User
participant B as Backend
participant C as Database
A->>B: Send request
B->>C: Query database
C-->>B: Return data
B-->>A: Send response
```
sequenceDiagram
participant A as User
participant B as Backend
participant C as Database
A->>B: Send request
B->>C: Query database
C-->>B: Return data
B-->>A: Send response
- Gantt Chart:
```mermaid
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Development
Task 1 :done, des1, 2024-09-01,2024-09-10
Task 2 :active, des2, 2024-09-11, 3d
Task 3 : des3, after des2, 5d
```gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Development
Task 1 :done, des1, 2024-09-01,2024-09-10
Task 2 :active, des2, 2024-09-11, 3d
Task 3 : des3, after des2, 5d
To create a table in markdown:
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data 1 | Data 2 | Data 3 |
| Data 4 | Data 5 | Data 6 || Column 1 | Column 2 | Column 3 |
|---|---|---|
| Data 1 | Data 2 | Data 3 |
| Data 4 | Data 5 | Data 6 |
Here is an example of an array formatted using LaTeX:
$$
\begin{array}{r|rr|rr}
& x^3 & x^2 & x^1 & x^0 \\
\hline
& 2 & 12 & 14 & -3 \\
{\color{red}-4} & & -8 & -16 & +8 \\
\hline
& 2 & 4 & -2 & {\color{blue}5}
\end{array}
$$Rendered Array:
Here are some websites that provides awesome tools:
- repobearts - Stunning Insights for GitHun Repo, like project trackers.
For more LaTeX-style equations, refer to the provided references. Remember, creating clear and organized documentation helps maintain readability and ease of use. π
Footnotes
-
This is the footnote content. β©