Note: These examples are translated from the example of Romain Vimont
- see the
mdbeamer
repository on Github
- item 1 in a block
- item 2 in a block
- sub item 1
\blockbegin{A First Block}
inside the block in Markdown
\blockend
Comments below the first block.
- inside the second block
- the source code is more readable
- sub item 1
- sub item 2
- sub sub item 1
- sub sub item 2
- The syntax is more convenient
- Strikeout: This
is deleted text. - Superscripts and subscripts:
- H
2O is a liquid - 2^10^ is 1024.
- H
- Strikeout: This
- Write me!
- Easy code block, with color syntaxing, just specify the language:
$ whoami # commentaire bash
$ sudo apt install pandoc
With line numbers (but the rendering is sub-optimal):
int main(int argc, char *argv[]) {
printf("Hello world!\n");
return 0;
}
- item one
- item two
- another list item 1
- another list item 2
- clone the repository
- install
pandoc
- Install the dependencies
a.
texlive-latex-base
b.latex-beamer
- Install a PDF reader
This is from Mitch Resnick.
If you learn to read, you can then read to learn.
If you learn to code, you can then code to learn.1
Now a step-by-step appearance:
- first
- then
- finally
A first paragraph
. . .
Then another.
. . .
Now some formatting:
| There exists 2 types of persons: | those who understand recursivity and | those who don't understand that there exists 2 types of persons: | those who understand recursivity and | those who don't understand that there exists 2 types of persons: | ...
- Some elements do not exist in Pandoc Markdown.
- in this case, you shall simply use \LaTeX ;)
\begin{alertblock}{Alert} That's an alertblock with some \textbf{\LaTeX} syntax \end{alertblock}
\begin{exampleblock}{Example} That's an exampleblock with some \textbf{\LaTeX} syntax \end{exampleblock}
With some Formulaes:
And now some table
Test | left | centre | right |
---|---|---|---|
item 1 | 14 | 28 | 56 |
item 2 | 1 | text |
- You can of course do it in \LaTeX\ directly
- recall to eventually adapt
\graphicspath{}
to specify the searched directories:
- recall to eventually adapt
\hfill{}\includegraphics[width=0.1\textwidth]{logo_github.png}\hfill{}
\hfill{}\includegraphics[width=0.1\textwidth]{logo_github.png}\hfill{}
- Classical markdown syntax (yet with no control on the size)
![](images/logo_github.png)
\begin{textblock}{0.15}(0.6,0.5) \includegraphics[width=\textwidth]{logo_github.png} \end{textblock}
- Placing images remains complex in \LaTeX
- A very useful package to program image placement is
textpos
- placement as overlay as in the below example
- particularly interesting to optimize empty area in your slides
\scriptsize
% Useful package to place text wherever you want.
% Usage: (where WIDTH, X and Y are relative numbers between 0 and 1)
% \begin{textblock}{WIDTH}(X,Y) % Ex \begin{textblock}{0.25}(0.7,0.2) % top right slide area
% ... % \includegraphics[width=\textwidth]{...}
% \end{textblock} % \end{textblock}
\usepackage[absolute,overlay]{textpos}
% Set unit for textpos / textblock
\setlength{\TPHorizModule}{\paperwidth}
\setlength{\TPVertModule}{\paperheight}
% [...]
\begin{textblock}{0.15}(0.6,0.5)
\includegraphics[width=\textwidth]{logo_github.png}
\end{textblock}
To permit the usage of Markdown within a beamer columns environment, you have to use the following commands:
\columnsbegin{<width>}
...
\column{<width>}
...
\columnsend
\columnsbegin{.5\textwidth}
Some text on the left column
- item 1
- item 2
- sub item 1
\column{.5\textwidth}
Text on the right column
- enum 1
- enum 2 a. sub enum 1
\columnsend
\columnsbegin{.5\textwidth}
\blockbegin{A Block in A Column}
- item 1
- item 2
- sub item 1
- item 3
- sub item 1
- sub item 2
\blockend
\column{.5\textwidth}
Inside a column environment:
- the
block
environment raise an error - instead, use the following commands:
\blockbegin{Title}
...
\blockend
\columnsend
- This allows to use the Markdown syntax in the block.
- only required with the
\columnsbegin ... \columnsend
construction
- only required with the
\scriptsize
Links on description environment:
pandoc ~ http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html
beamer ~ http://johnmacfarlane.net/pandoc/demo/example9/producing-slide-shows-with-pandoc.html
In french ~ http://enacit1.epfl.ch/markdown-pandoc/
See UL HPC website.
::: {.block}
- liste
- liste :::
follow up text...
\footnotesize
::: columns
:::: {.column width=55%}
- Institute/[...]\newline Office
- Contact:
firstname.name@domain.com
::::
:::: {.column width=45%}
\centering \begin{tcolorbox}[width=0.8\textwidth]\centering \texttt{https://site.domain.com} \end{tcolorbox}
::::
:::
\scriptsize
- Hello