Aller au contenu

Installation

Téléchargement du binaire

Téléchargez le binaire correspondant à votre plateforme depuis la page Releases :

Plateforme Fichier Taille
Linux x64 vlatex-linux-amd64 ~15 MB
macOS x64 vlatex-macos-amd64 ~15 MB
Windows x64 vlatex-windows-amd64.exe ~15 MB

Linux

# Télécharger
wget https://github.com/dvrch/vlatex/releases/latest/download/vlatex-linux-amd64 -O vlatex

# Rendre exécutable
chmod +x vlatex

# Déplacer dans PATH (optionnel)
sudo mv vlatex /usr/local/bin/

# Vérifier
vlatex --help

macOS

# Télécharger
curl -L https://github.com/dvrch/vlatex/releases/latest/download/vlatex-macos-amd64 -o vlatex

# Rendre exécutable
chmod +x vlatex

# Déplacer dans PATH (optionnel)
sudo mv vlatex /usr/local/bin/

# Vérifier
vlatex --help

Windows

  1. Téléchargez vlatex-windows-amd64.exe
  2. Renommez en vlatex.exe
  3. Ajoutez le répertoire au PATH système

Ou via PowerShell :

# Télécharger
Invoke-WebRequest -Uri "https://github.com/dvrch/vlatex/releases/latest/download/vlatex-windows-amd64.exe" -OutFile "vlatex.exe"

# Ajouter au PATH (session actuelle)
$env:PATH += ";$(Get-Location)"

# Vérifier
vlatex.exe --help

Dépendances système

Pour la compilation PDF/DOCX

vLaTeX utilise un conteneur Podman/Docker pour la compilation LaTeX. Vous devez avoir l'un des suivants :

# Linux (Debian/Ubuntu)
sudo apt install podman

# Linux (Fedora)
sudo dnf install podman

# macOS
brew install podman
podman machine init
podman machine start

# Construire l'image vlatex-env
podman build -t vlatex-env -f Dockerfile.vlatex .
# Linux
sudo apt install docker.io
sudo usermod -aG docker $USER

# macOS
brew install --cask docker

# Construire l'image vlatex-env
docker build -t vlatex-env -f Dockerfile.vlatex .

Si vous préférez ne pas utiliser de conteneur :

# TeX Live (Linux)
sudo apt install texlive-full

# TeX Live (macOS)
brew install --cask mactex

# Pandoc (pour DOCX)
# Linux
sudo apt install pandoc
# macOS
brew install pandoc

# mmdc (pour Mermaid)
npm install -g @mermaid-js/mermaid-cli

Image vlatex-env

L'image vlatex-env doit être construite une seule fois. Elle contient TeX Live complet + Pandoc.


Configuration de l'environnement

Structure d'un vault Obsidian

mon-vault/
├── Writing/
│   ├── mon-document.md
│   ├── equations.md
│   └── BIBTEX.bib
├── assets/
│   └── figure.png
└── BIBTEX.bib

Fichier de configuration

La configuration est stockée dans :

OS Emplacement
Linux ~/.config/vlatex-desktop/config.json
macOS ~/Library/Application Support/com.vlatex.vlatex-desktop/config.json
Windows %APPDATA%\vlatex\vlatex-desktop\config.json

Exemple de configuration :

{
  "profile": "default",
  "vault_root": "/chemin/vers/mon-vault",
  "document_title": "Mon Document",
  "author_name": "Mon Nom",
  "latex_engine": "pdflatex",
  "bibliography_path": "Writing/BIBTEX.bib",
  "csl_path": "",
  "preamble_path": "",
  "keep_nav_arrows": true,
  "default_table_width": "0.95",
  "enable_docx_numbering": true,
  "toc": true,
  "lot": true,
  "lof": true,
  "geometry": "margin=2.5cm",
  "header_content": "",
  "footer_content": "",
  "enable_header": false,
  "enable_footer": false
}

Variables d'environnement

# Niveau de log (debug, info, warn, error)
RUST_LOG=info

# Pas nécessaire pour l'utilisation normale

Vérification de l'installation

# Vérifier la version
vlatex --help

# Tester la conversion CLI
echo "# Mon Document

Ceci est un test avec $mathématiques$ et une citation @key.

## Section 1

- Item 1
- Item 2" > test.md

vlatex test.md

# Si tout fonctionne, vous verrez du LaTeX en sortie

Problèmes courants

"command not found: vlatex"

Le binaire n'est pas dans le PATH. Vérifiez :

# Où est le binaire ?
which vlatex

# Si rien n'est retourné, ajoutez le répertoire au PATH
export PATH=$PATH:/chemin/vers/le/binaire

"podman: command not found"

Installez Podman (voir Dépendances système).

"vlatex-env: image not found"

Construisez l'image :

podman build -t vlatex-env -f Dockerfile.vlatex .

Erreur de compilation PDF

Vérifiez que Podman peut accéder au vault :

podman run --rm -v /chemin/vers/vault:/vault vlatex-env ls /vault