DEV Community

Cover image for MaTeX

Posted on


I had a little fun in creating a little mate to LaTeX that looks simpler and when compiled, goes to tex then pdf.

So why don't we look at some simple latex code and see how it looks like in MaTeX:

% Latex Code
\title{Latex Code}
\date{Feb 24 2022}

Enter fullscreen mode Exit fullscreen mode
% Matex code 
documentclass: article
author: Mustafif 
title: Matex Code 
date: Feb 24 2022
import: listings 

document > begin
   pagenumbering: arabic
document > end
Enter fullscreen mode Exit fullscreen mode

You can see the following:

  • Environments are defined as env > begin ... env > end
  • Elements are defined as element: value
  • Literals are defined as name;

There are still lots to do in terms of the "compiler" with error handling, optimizations, but here's the base of this simpler latex.

To install, use cargo:

$ cargo install matex
# To create new project
$ matex new <name>
# To compile project  
$ cd <name> && matex compile 
# To build pdf for matex file
$ matex build <name>
Enter fullscreen mode Exit fullscreen mode

Please comment below what you think of the project, and any suggestions to improve it. In the coming future proper documentation will be added and the project will be added to and in mkpm-cl

Top comments (1)

mustafif profile image

In terms of documentation, I will also write a MaTeX Basics to explore going from LaTeX to MaTeX.