A lightweight converter for Markdown (my own flavour!) to PDF-slides (Latex Beamer) written in Rust.
Creates .pdf
and .tex
file for slideshows.
There are many Markdown to PDF-slides converter. But as of my knowledge none of them can position images freely on slides. To achieve this, I wrote my own Markdown-flavour that supports a few Latex-Beamer functionalities and is easy to read and fast to write in Markdown style.
Needs pdflatex installed.
- "floating" positionable text-boxes.
- Code syntax support
An example Markdown file can be found here.
You can convert it by ./mdTex demo.md
. This will generate a demo.tex
and demo.pdf
file at the same location.
- At the beginning of the file
- starts and ends with
%%
- key-value pairs that define global configurations
- theme: Sets the theme of the presentation to one of the Latex Beamer Themes.
- title: Specifies the title of the presentation.
- author: Specifies the author of the presentation.
- date: Inserts the current date. Either a date (eg. 10.01.2024) or LaTeX's
\today
. - indentation: Sets the indentation level to 4 spaces.
- enclosed by
*
: Text is italic - enclosed by
**
: Text is bold - enclosed by
_
: Text is underlined - enclosed by
-
: Text is crossed
---
: Separates slides.- With slide title:
--- This is the slide title
.
- With slide title:
#
: Huge Heading.##
: Large.###
: Footnotesized heading.// This is a comment
: Adds comments.[Box title][[This text is inside a box]]
: Creates a box with a title and content.[][[This box has no Title]]
: Creates a box without a title but with content.[[This is also a box]]
: Also creates a box.
::
: Indicates the start and end of column sections.:40%
,:60%
: Specifies the percentage width of columns.
::
:40%
Left column text
:60%
right column text
::
There can be more than two columns.
![x:0.0,y:0.0,w:0.25][This is the Image caption](./test.jpg)
: Inserts an image with parameters for positioning and width, along with an optional caption.- If positioning is not needed, the x,y,w values should be set to 0.0
- Paragraphs are separated by an empty line.
- Tabs as indentation do not work.