34 releases

0.13.1 Dec 4, 2024
0.13.0 Nov 7, 2024
0.12.1 Sep 26, 2024
0.11.10 Jul 24, 2024
0.3.8 Nov 14, 2022

#92 in Text processing

Download history 161/week @ 2024-09-02 8/week @ 2024-09-09 33/week @ 2024-09-16 445/week @ 2024-09-23 67/week @ 2024-09-30 1/week @ 2024-10-07 115/week @ 2024-11-04 7/week @ 2024-11-11 4/week @ 2024-11-18 140/week @ 2024-12-02

159 downloads per month

MIT license

200KB
5K SLoC

vesti

A transpiler that compiles into LaTeX.

Why need a LaTeX transpiler?

I used to make several documentations using LaTeX (or plainTeX, but TeX is quite cumbersome to write a document, especially very complex tables or put an image, for example). However, its markdown like syntax is not confortable to use it. For example, there is a simple LaTeX document.

% coprime is my custom class. See https://github.com/e0328eric/coprime.
\documentclass[tikz, geometry]{coprime}

\settitle{My First Document}{Sungbae Jeong}{}
\setgeometry{a4paper, margin = 2.5cm}

\begin{document}
\section{Foo}
Hello, World!
\begin{figure}[ht]
    \centering
    \begin{tikzpicture}
        \draw (0,0) -- (1,1);
    \end{tikzpicture}
\end{figure}

Upper code is a figure using tikz.

\end{document}

What I am anoying about to use it is \begin and \end block. Is there a way to write much simpler? This question makes me to start this project. Currently, below code is generated into upper LaTeX code using vesti except comments.

% coprime is my custom class. See https://github.com/e0328eric/coprime.
docclass coprime (tikz, geometry)

\settitle{My First Document}{Sungbae Jeong}{}
\setgeometry{a4paper, margin = 2.5cm}

startdoc

\section{Foo}
Hello, World!
useenv figure [ht] {
    \centering
    useenv tikzpicture {
        \draw (0,0) -- (1,1);
    }
}

Upper code is a figure using tikz.

Installation

Vesti can be installed using cargo.

$ cargo install vesti

tectonic backend compilation issue

For a higher version of the rust compiler, somewhat tectonic backend is not compilable. See vesti-tectonic-git if one want to use tectonic backend for vesti.

config file

In default, it uses local pdflatex to compile vesti. If you want to change the default behavior, add config.yaml in $CONFIG_PATH/vesti and type like the following:

engine:
  main:
    "tectonic"

This example defaults vesti to run tectonic backend. (You must download vesti using tectonic-backend to use tectonic). The full list for main engine is in src/commands.rs.

Warning

This language is in beta version, so future break changes can be exist. Beware to use in the large projects.

Dependencies

~6–52MB
~849K SLoC