Skip to content

Instantly share code, notes, and snippets.

@qwhex
Last active June 27, 2024 11:32
Show Gist options
  • Save qwhex/30ac4af9dbdb3e9b144050dea92d3ced to your computer and use it in GitHub Desktop.
Save qwhex/30ac4af9dbdb3e9b144050dea92d3ced to your computer and use it in GitHub Desktop.

Here's a comprehensive markdown snippet that includes a variety of markdown features. This snippet is useful for testing markdown rendering capabilities across different platforms or applications. It covers headings, emphasis, lists, links, images, code, tables, blockquotes, and horizontal rules.

What is Lorem Ipsum?

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Text formatting

Bold text

Italic text

Strikethrough

Lists

  • Bullet list
    • Nested bullet
      • Sub-nested bullet
  1. Numbered list
    1. Nested numbered list
      1. Sub-nested number
      2. Foobar

Tasks

  • Collect sample data
  • Perform data analysis
  • Draft report
  • Foobar

Etc...

Example Link

Alt text for an image

Inline code in a sentence.

# Code block with syntax highlighting
def hello_world():
    print("Hello, world!")

Blockquote

and a multi-line blockquote below:

Multi Line

Blockquote Yeah Yeah

Table 1

Observation ( x ) ( y )
1 2 4
2 3 5
3 5 7
4 7 10
5 9 15
6 100 2

Table 2

Table Example
Row 1 Data 1
Row 2 Data 2

Some text here.


Horizontal line above

Horizontal rule above this text.

This snippet includes essential markdown features that are commonly used. You can use this as a base to test different markdown renderers to ensure they 
display the content correctly.

In your test code, you've effectively used some advanced Markdown features like mathematical equations and code blocks. Here are a few additional Markdown features that weren't explored in your sample:

  1. Footnotes: You can add footnotes to provide additional context or citations.
  2. Task lists: Checkboxes to mark progress or tasks.
  3. Collapsible sections: Sections that can be expanded or collapsed. This is primarily supported in GitHub-flavored Markdown.
  4. Embedded HTML: For when Markdown's capabilities are insufficient, you can directly embed HTML.
  5. Custom IDs for headings: Allows for direct linking to sections in some flavors of Markdown.

Here’s how some of these additional features might look if incorporated into your existing Markdown text:

Data Analysis Report

Formulas

Mean ((\mu)):

[

\mu = \frac{1}{n} \sum_{i=1}^{n} x_i

]

Standard Deviation ((\sigma)):

[

\sigma = \sqrt{\frac{1}{n} \sum_{i=1}^{n} (x_i - \mu)^2}

]

Linear Regression:

[

y = mx + b

]

Additional Notes1

LaTex math mode specific delimiters as following

inline math: between dollar signs ($math$) or between \( and \) code block math: between double dollar signs or between \[ and \]

More Formulas

Dollar sign

Code block

Quadratic Formula: $$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$

Area of a Circle: $$ A = \pi r^2 $$

Derivative of Sine: $$ \frac{d}{dx}(\sin x) = \cos x $$

Bayes' Theorem: $$ P(A|B) = \frac{P(B|A)P(A)}{P(B)} $$

Inline

Quadratic Formula: $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$

Derivative of Sine: $\frac{d}{dx}(\sin x) = \cos x$

No-dollar

Code block

[ \mu = \frac{1}{n} \sum_{i=1}^{n} x_i ]

Inline

On the same line: ( y = mx + b )

Footnotes

  1. This section might include explanations or external references relevant to the data analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment