---
amsthm:
  counter_depth: 2
  definition:
  - Definition
  name_to_text:
    KL: Klein's Lemma
  parent_counter: section
  plain:
  - Theorem:
    - Lemma
    - Corollary
  - With Space\*
  - Proposition: Conjecture
  - WithoutSpace
  - KL
  remark:
  - Case
  counter_ignore_headings:
  # include these if you use pandoc-crossref
  # which are auto-generated by it
  - List of Figures
  - List of Tables
  - List of Listings
header-includes: |
  ```{=latex}
  \usepackage{amsthm}
  ```
---
# Demo
::: {.Theorem info="within parenthesis"}
plain theoremstyle *here*
We can use pandoc-crossref style @simplestEquation and [@simplestEquation]
and cite before definition.
:::
::: {#simplestEquation .Theorem}
Label and reference:
$$E=mc^2$$
:::
From the \ref{simplestEquation}, we see that...
Or \eqref{simplestEquation}, ...
::: {.With_Space info="**This** is *markdown*."}
Environment name has a space, and is unnumbered.
:::
::: {.Lemma info="can cite \ref{simplestEquation}"}
This one share counter with Theorem.
:::
::: {.Definition info="pandoc-crossref style cite @simplestEquation"}
definition theoremstyle here
:::
::: {.Case info="within parenthesis"}
remark theoremstyle here
:::
::: {.proof info="Proof of the Main Theorem"}
Predefined proof theoremstyle here
:::
::: {.proof info="Proof of the *little* theorem"}
Predefined proof theoremstyle here with markdown info.
:::
::: {.proof}
Bare proof here.
:::
::: KL
Klein's Lemma from amsthm doc.
:::
::: Definition
```
code here
```
:::
# Counter test
::: Theorem
some theorem
:::
::: Theorem
some theorem
:::
## Next level
::: Theorem
some theorem
:::
::: Theorem
some theorem
:::
### Level 3
::: Theorem
some theorem
:::
::: Theorem
some theorem
:::
#### Level 4
::: Theorem
some theorem
:::
::: Theorem
some theorem
:::
##### Level 5
::: Theorem
some theorem
:::
::: Theorem
some theorem
:::
###### Level 6
::: Theorem
some theorem
:::
::: Theorem
some theorem
:::