dirty again. meh
This commit is contained in:
parent
82ef0b4231
commit
4cedd7c0c1
@ -1 +0,0 @@
|
|||||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --filter pandoc-latex-environment --listings
|
|
@ -1,130 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Boxes with pandoc-latex-environment and awesomebox"
|
|
||||||
author: [Author]
|
|
||||||
date: "2020-01-01"
|
|
||||||
subject: "Markdown"
|
|
||||||
keywords: [Markdown, Example]
|
|
||||||
lang: "en"
|
|
||||||
colorlinks: true
|
|
||||||
header-includes:
|
|
||||||
- |
|
|
||||||
```{=latex}
|
|
||||||
\usepackage{awesomebox}
|
|
||||||
```
|
|
||||||
pandoc-latex-environment:
|
|
||||||
noteblock: [note]
|
|
||||||
tipblock: [tip]
|
|
||||||
warningblock: [warning]
|
|
||||||
cautionblock: [caution]
|
|
||||||
importantblock: [important]
|
|
||||||
...
|
|
||||||
|
|
||||||
# Boxes with `pandoc-latex-environment` and `awesomebox`
|
|
||||||
|
|
||||||
This example demonstrates the use of the filter [`pandoc-latex-environments`] to create custom boxes with the [`awesomebox`] package. *pandoc-latex-environment* is a pandoc filter for adding LaTeX environment on specific HTML div tags.
|
|
||||||
|
|
||||||
|
|
||||||
## Box Types
|
|
||||||
|
|
||||||
For a list of all available boxes and options visit the [`awesomebox` documentation](https://ctan.org/pkg/awesomebox).
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
::: note
|
|
||||||
Lorem ipsum dolor ...
|
|
||||||
:::
|
|
||||||
```
|
|
||||||
|
|
||||||
::: note
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
|
||||||
quis lectus elementum fermentum.
|
|
||||||
|
|
||||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
|
||||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
|
||||||
:::
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
::: tip
|
|
||||||
Lorem ipsum dolor ...
|
|
||||||
:::
|
|
||||||
```
|
|
||||||
|
|
||||||
::: tip
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
|
||||||
quis lectus elementum fermentum.
|
|
||||||
|
|
||||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
|
||||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
|
||||||
:::
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
::: warning
|
|
||||||
Lorem ipsum dolor ...
|
|
||||||
:::
|
|
||||||
```
|
|
||||||
|
|
||||||
::: warning
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
|
||||||
quis lectus elementum fermentum.
|
|
||||||
|
|
||||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
|
||||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
|
||||||
:::
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
::: caution
|
|
||||||
Lorem ipsum dolor ...
|
|
||||||
:::
|
|
||||||
```
|
|
||||||
|
|
||||||
::: caution
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
|
||||||
quis lectus elementum fermentum.
|
|
||||||
|
|
||||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
|
||||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
|
||||||
:::
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
::: important
|
|
||||||
Lorem ipsum dolor ...
|
|
||||||
:::
|
|
||||||
```
|
|
||||||
|
|
||||||
::: important
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
|
||||||
quis lectus elementum fermentum.
|
|
||||||
|
|
||||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
|
||||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
|
||||||
:::
|
|
||||||
|
|
||||||
One can also use raw HTML `div` tags to create the custom environments.
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
<div class="important">
|
|
||||||
Lorem ipsum dolor ...
|
|
||||||
</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
<div class="important">
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
|
||||||
quis lectus elementum fermentum.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
Markdown formatting inside the environments is supported.
|
|
||||||
|
|
||||||
::: important
|
|
||||||
**Lorem ipsum dolor** sit amet, `consectetur adipiscing` elit.
|
|
||||||
|
|
||||||
```
|
|
||||||
if(args.length < 2) {
|
|
||||||
System.out.println("Lorem ipsum dolor sit amet");
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
*Nam aliquet libero
|
|
||||||
quis lectus elementum fermentum.*
|
|
||||||
:::
|
|
||||||
|
|
||||||
[`pandoc-latex-environments`]: https://github.com/chdemko/pandoc-latex-environment/
|
|
||||||
[`awesomebox`]: https://ctan.org/pkg/awesomebox
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 350 KiB |
@ -1 +0,0 @@
|
|||||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --filter pandoc-latex-environment --listings
|
|
@ -1,78 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Boxes with pandoc-latex-environment and tcolorbox"
|
|
||||||
author: [Author]
|
|
||||||
date: "2020-01-01"
|
|
||||||
subject: "Markdown"
|
|
||||||
keywords: [Markdown, Example]
|
|
||||||
lang: "en"
|
|
||||||
colorlinks: true
|
|
||||||
header-includes:
|
|
||||||
- |
|
|
||||||
```{=latex}
|
|
||||||
\usepackage{tcolorbox}
|
|
||||||
|
|
||||||
\newtcolorbox{info-box}{colback=cyan!5!white,arc=0pt,outer arc=0pt,colframe=cyan!60!black}
|
|
||||||
\newtcolorbox{warning-box}{colback=orange!5!white,arc=0pt,outer arc=0pt,colframe=orange!80!black}
|
|
||||||
\newtcolorbox{error-box}{colback=red!5!white,arc=0pt,outer arc=0pt,colframe=red!75!black}
|
|
||||||
```
|
|
||||||
pandoc-latex-environment:
|
|
||||||
tcolorbox: [box]
|
|
||||||
info-box: [info]
|
|
||||||
warning-box: [warning]
|
|
||||||
error-box: [error]
|
|
||||||
...
|
|
||||||
|
|
||||||
# Boxes with `pandoc-latex-environment` and `tcolorbox`
|
|
||||||
|
|
||||||
This example demonstrates the use of the filter [`pandoc-latex-environments`]
|
|
||||||
to create custom boxes with the [`tcolorbox`] package.
|
|
||||||
*pandoc-latex-environment* is a pandoc filter for adding LaTeX environment on
|
|
||||||
specific HTML div tags. For a list of all available options visit the
|
|
||||||
[`tcolorbox` documentation](https://ctan.org/pkg/tcolorbox).
|
|
||||||
|
|
||||||
## Simple Box
|
|
||||||
|
|
||||||
::: box
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
|
||||||
quis lectus elementum fermentum.
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Markdown inside the Box
|
|
||||||
|
|
||||||
Markdown formatting inside the environment is supported.
|
|
||||||
|
|
||||||
::: box
|
|
||||||
Lorem ipsum **dolor** sit amet, `consectetur adipiscing` elit.
|
|
||||||
|
|
||||||
```
|
|
||||||
if(args.length < 2) {
|
|
||||||
System.out.println("Lorem ipsum dolor sit amet");
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
*Nam aliquet libero
|
|
||||||
quis lectus elementum fermentum.*
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Custom Box
|
|
||||||
|
|
||||||
One can define custom boxes in the LaTeX preamble with the variable
|
|
||||||
`header-includes` at the top of this document.
|
|
||||||
|
|
||||||
::: info
|
|
||||||
**Info**: This is a custom box that may be used to show info messages in your
|
|
||||||
document.
|
|
||||||
:::
|
|
||||||
|
|
||||||
::: warning
|
|
||||||
**Warning**: This is a custom box that may be used to show warning messages in
|
|
||||||
your document.
|
|
||||||
:::
|
|
||||||
|
|
||||||
::: error
|
|
||||||
**Error**: This is a custom box that may be used to show error messages in your
|
|
||||||
document.
|
|
||||||
:::
|
|
||||||
|
|
||||||
[`pandoc-latex-environments`]: https://github.com/chdemko/pandoc-latex-environment/
|
|
||||||
[`tcolorbox`]: https://ctan.org/pkg/tcolorbox
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 176 KiB |
Loading…
Reference in New Issue
Block a user