Example — sphinx-mdinclude documentation

# Example

This page is written in mixed markdown and reST. Source code is here.

## Basic Markups (inline)

A strong, emphasis, deleted, `code with single-backtick`, `code with two-backticks`, `code can include multiple (``) backticks`, `reST's code role`, and inline html delete.

### Link

Auto link to http://example.com/.

Link to example.com in markdown.

Link to anchor in markdown.

Link to example.com in reST.

Link to example in reST_ref.

Link to example.com with title in markdown.

## Basic Markups (block)

This is a simple sentence.

sentence with
newlines
(reST)

Sentence with hard-wrap (markdown, trailing two spaces)

> block quote second line

> > nested quote

This is a red, raw-html block.

> Block quote after raw-html directive

### List

#### Unordered list

- unordered list new line

- next item

  - nested list with new line

  - nested list item 2

- original depth

  1. ordered list item

  2. second with new line

- original depth again

#### Ordered list

1. ordered list in new line

2. second item

- nested unordered list

- second item with new line

1. original depth

2. nested ordered list with new line

3. again

4. original depth again

### Code Block

Simple, indented code block

    pip install sphinx

Code block with triple backticks and language.

    def a(n: int) -> None:
        for i in range(n):
            print(i)

Triple-tildes (`~~~`) are also available.

    def a(n: int) -> None:
        for i in range(n):
            print(i)

Here is reST style code block.

    if True:
        print('\n')

## Extensions

### Table (Markdown-Style)

(cell-alignment is not supported currently)

Table Header 1 | Table Header 2 | Table Header 3
--- | --- | ---
normal | italic | bold
`code` | deleted | inline-html

### Math

This is \(E = mc^2\) inline math.

The below is math-block (markdown-style).

\[E = mc^2\]

The below is reST-style math-block.

\[E = mc^2\]

### Include Markdown file

To include markdown file:

    .. mdinclude:: path-to-file.md

To include markdown file with specific lines:

    .. mdinclude:: included.md
       :start-line: 2
       :end-line: -2

Original `included.md` file is:

    NOT-INCLUDED

    #### Include this line

    NOT-INCLUDED

This file included as:

    #### Include this line

and results in HTML as below:

#### Include this line

### Footnote

Footnote[#fn-1]_ and footnote[#fn-KEY]_ with markdown.

Footnote with reST[1].

[1]

reST footnote

[2]

footnote 1

[3]

footnote key