Fonctionnalités
Pipeline de conversion
La conversion suit un pipeline de 30 étapes :
Markdown brut
↓
1. Expand block references (![[file#^block]])
↓
2. Stash direct blocks (%% BLOCK %%)
↓
3. Remove comments (%% ... %%)
↓
4. Convert iframes
↓
5. Join soft-wrapped lines
↓
6. Stash code/math blocks
↓
7. Normalize block embeds
↓
8. Clean crossref wrappers
↓
9. Hide links (stash)
↓
10. Stash tables
↓
11. Convert headings → \section{}
↓
12. Convert tags → \tagchoice{}
↓
13. Escape underscores in sections
↓
14. Convert images → \includegraphics
↓
15. Normalize block embeds (2nd pass)
↓
16. Replace mermaid blocks → PNG
↓
17. Convert lists → itemize/enumerate
↓
18. Convert citations → \citep{}
↓
19. Process footnotes
↓
20. Convert inline math
↓
21. Convert inline styling (bold, italic, etc.)
↓
22. Convert special chars (& → \&, etc.)
↓
23. Convert callouts → tcolorbox
↓
24. Enforce internal links → \hyperref
↓
25. Add hypertargets at labels
↓
26. Restore links from stash
↓
27. Restore code/math blocks
↓
28. Convert remaining dollar math
↓
29. Finalize float environments
↓
30. Hide emojis → \twemoji{}
↓
LaTeX généré
Syntaxe supportée
En-têtes Markdown
| Markdown |
LaTeX |
# Titre |
\section{Titre} |
## Sous-titre |
\subsection{Sous-titre} |
### Paragraphe |
\subsubsection{Paragraphe} |
#### Rubrique |
\paragraph{Rubrique} |
| Markdown |
LaTeX |
**gras** |
\textbf{gras} |
*italique* |
|
~~barré~~ |
|
==surligné== |
|
{color}texte |
\textcolor{color}{texte} |
$$ |
$...$ (inline) |
$$...$$ |
\begin{equation}...\end{equation} |
Listes
| Markdown |
LaTeX |
- item |
\begin{itemize}...\end{itemize} |
1. item |
\begin{enumerate}...\end{enumerate} |
- [ ] tâche |
\begin{todolist}...\end{todolist} |
- [x] fait |
\begin{todolist}...\end{todolist} |
Tableaux
| Markdown |
LaTeX |
\| a \| b \| |
tabular/tabularx/longtable |
| Pipe tables |
avec largeurs auto, couleurs, hlines |
Images
| Markdown |
LaTeX |
 |
\includegraphics{...} |
![[image.png]] |
\includegraphics{...} |
![[file#^block]] |
figure avec metadata |
Citations
| Markdown |
LaTeX |
@key |
\citep{key} |
[@key1; @key2] |
\citep{key1,key2} |
Author [Year] |
\citep{Author:Year} |
Mathématiques
| Markdown |
LaTeX |
$x^2$ |
$x^2$ |
$$\int_0^1 f(x)dx$$ |
\begin{equation}...\end{equation} |
$$\begin{aligned}...\end{aligned}$$ |
aligned equations |
Callouts/Admonitions
| Markdown |
LaTeX |
> [!note] |
\begin{tcolorbox}...\end{tcolorbox} |
> [!warning] |
\begin{tcolorbox}...\end{tcolorbox} |
> [!tip] |
\begin{tcolorbox}...\end{tcolorbox} |
Wikilinks
| Markdown |
LaTeX |
[[Page]] |
\hyperref[sec:page]{Page} |
[[Page\|alias]] |
\hyperref[sec:page]{alias} |
Code
| Markdown |
LaTeX |
```python |
lstlisting/minted/tcolorbox |
```latex |
rendu via pdflatex |
Compilation PDF
La compilation PDF utilise Podman/Docker avec l'image vlatex-env :
- pdflatex (1ère passe) — génère les .aux
- biber ou bibtex — traite la bibliographie
- pdflatex (2ème passe) — intègre les références
- pdflatex (3ème passe) — finalise les numérotations
Options :
- -interaction=nonstopmode
- -shell-escape
- Navigation bidirectionnelle des citations (flèches ↑↓)
Compilation DOCX
La compilation DOCX utilise pandoc via Podman :
- Préparation du LaTeX pour pandoc
- Rendu des blocs LaTeX code (via pdflatex+pdftotext)
- Conversion pandoc avec :
--mathml
--embed-resources
--standalone
--toc
--citeproc (si bibliographie)
- Post-traitement :
- Flèches de retour ↑↓ pour les citations
- Numérotation des sections (optionnel)
Embeds Obsidian
Résolution des embeds depuis le filesystem :
![[Chapter1]] → contenu de Chapter1.md
![[Chapter1#Section]] → section spécifique
![[assets/fig.png]] → image intégrée
Profondeur maximale : 10 niveaux.
WASM
Le cœur de conversion est compilé en WASM pour une utilisation dans le navigateur.
Voir WASM Playground.