A transpiled superset of TeX for writing LaTeX.

Overview

LiA

A transpiled superset of TeX for writing LaTeX.

status AUR

This is more for my personal use however you're welcome to use it or contribute. These added features are just designed to make LaTeX code less verbose, faster to write but also just catered more towards my personal preference.

For a more detailed explanation of the features see the documentation.

For installation instructions see the installation section.

Example #1

LiA code

eq {
    dy/dx = x*(a - b) + [[1, 2], [3, 4]] + sin(x)
}

Resulting TeX

\begin{document}
    \begin{equation}
        \frac{dy}{dx} = x \times \left(a - b\right) + \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} +\sin \left(x\right)
    \end{equation}
\end{document}

Example #2

LiA code

use graphicx, [utf8]inputenc
@cat = 🐈
@img = (src, desc) => {
    env center {
        \image{@("images/" + src), 10cm}
        \linebreak
        **@desc**
    }
}
#* Cool Cat Image
## A subsection
@img(cat.png, Meow @cat!)

Resulting TeX

\usepackage{graphicx}
\usepackage[utf8]{inputenc}


\newcommand{\cat}{🐈}
\newcommand{\img}[3]{
    \begin{center}
        \image{#3, 10cm}
        \linebreak
        \textit{#2}
    \end{center}
}


\begin{document}
    \section*{Cool Cat Image}
    \subsection{A subsection}
    \img{cat.png}{Meow \cat!}{images/cat.png}
\end{document}

Example #3

LiA code

@muliplication = (a: Number, b: Number) => { $@a \times @b = @(a * b)$ }
* I'm a **Markdown** style ***list***
* @muliplication(2, 3)
* @muliplication(6, 6)
* @muliplication(2, 9)
  * I'm indented
* {I'm a multiline
   list item}

Resulting TeX

\newcommand{\muliplication}[3]{
    $#1 \times #2 = #3$ 
}


\begin{document}
    \begin{itemize}
        \item I'm a \textit{Markdown} style \textbf{list}
        \item \muliplication{2}{3}{6}
        \item \muliplication{6}{6}{36}
        \item \muliplication{2}{9}{18}
        \begin{itemize}
            \item I'm indented
        \end{itemize}
        \item {I'm a multiline
        list item}
    \end{itemize}
\end{document}

Installation

OS Instructions
Windows Download the latest release from the releases page. There is currently no installer so you will need to add the directory to your path manually. If you have Rust intalled it is recommended that you use the instructions in the building section.
Arch Linux Install from the AUR https://aur.archlinux.org/packages/lia-git.
Other Follow the instructions in the building section.

Usage

lia file.lia -w
  • Run lia --help for more information on usage.
  • The -w flag will tell the compiler to watch the file for changes and recompile it.

Building

Requires Rust to be installed.

git clone https://github.com/jaspwr/LiA
cargo install --path [path-to-cloned-repo]

You will need to add Cargo's bin directory to your PATH environment variable.

Building docs and tooling.

If you have made changes to the code that alter the language in anyway or bumped the version, it is a good idea to run the following command. This will recompile all of the code examples in the documentation, update list of known macros and keywords, etc.

cargo run --bin docs_and_tooling_builder

VSCode extension

For syntax highlighting and other features in VSCode, you can use the extension. To install it, copy tooling/vscode/lia-helper to your VSCode extensions directory (normally ~\.vscode\extensions) then restart VSCode.

You might also like...
An attribute macro to simplify writing simple command line applications.

fncli An attribute macro to simplify writing simple command line applications. Example #[fncli::cli] fn main(a: i32, b: i32) { println!("{}", a +

A tool that makes writing WebAssembly Text files easier.

Silly WAT Linker SWL is a tool that makes writing WebAssembly Text files easier. It is future-proof and simple because it doesn’t actually understand

Command-line tool that provides a workflow for extending, editing, diffing, and writing to vim-style grep lines.

Grug Grug is a command-line tool that provides a workflow for expanding, editing, diffing, and writing edits to files using vim-styled grep lines (suc

🧮 Writing an Equation Solver

Writing an Equation Solver Writing an Equation Solver is a process that is made of: parsing, equating/unifying and rewriting. Equating: it's the step

😎 Pretty way of writing regular expressions in Rust

🔮 Write readable regular expressions The crate provides a clean and readable way of writing your regex in the Rust programming language: Without pret

A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

More than safe rust abstractions over rytm-sys, an unofficial SDK for writing software for Analog Rytm running on firmware 1.70.
More than safe rust abstractions over rytm-sys, an unofficial SDK for writing software for Analog Rytm running on firmware 1.70.

rytm-rs More than safe rust abstractions over rytm-sys, an unofficial SDK for writing software for Analog Rytm running on firmware 1.70. On top of CC

Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

A superset of PHP with extended syntax and runtime capabilities.

PXP PXP is a superset of the PHP programming language that provides an extended set of syntax rules and language features to improve developer experie

A Rust-like Hardware Description Language transpiled to Verilog

Introduction This projects attempts to create a Rust-like hardware description language. Note that this has nothing to do with Rust itself, it just ha

Spine runtime for Rust (and wasm!) transpiled from the official C Runtime.

rusty_spine Spine runtime for Rust (and wasm!) transpiled from the official C Runtime. Supports Spine 4.1. [dependencies] rusty_spine = "0.4.0" Onlin

UnTeX is both a library and an executable that allows you to manipulate and understand TeX files.

UnTeX UnTeX is both a library and an executable that allows you to manipulate and understand TeX files. Usage Executable If you wish to use the execut

TextOCX is a Windows program that converts TeX snippet to MSOffice pastable format.

TextOCX TeX Snippet ===== MSOffice Screencast Preview | Download What TextOCX is a Windows program that converts TeX snippet to MSOffice pastable for

Converts books written in Markdown to HTML, LaTeX/PDF and EPUB

Crowbook Crowbook's aim is to allow you to write a book in Markdown without worrying about formatting or typography, and let the program generate HTML

Latex template handler using Rust
Latex template handler using Rust

Latex template handler using Rust All the templates used by this program are stored in another GitHub repository. Dependencies rust & cargo How to use

🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.
🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.

Marky Markdown Magician 🧙 Features Hot reload previewing 🔥 Conversion to HTML / PDF 🏭 Themes! ✨ Extensions - Math, diagrams, syntax-highlighting 🧩

Make beautiful colored code listings in LaTeX with the power of TreeSitter.
Make beautiful colored code listings in LaTeX with the power of TreeSitter.

What is this? This is a CLI tool that consumes TreeSitter's output and transforms it into LaTeX code that will produce syntax-colored code listing. If

LaTeX support for Typst, powered by Rust and WASM.
LaTeX support for Typst, powered by Rust and WASM.

MiTeX LaTeX support for Typst, powered by Rust and WASM. MiTeX processes LaTeX code into an abstract syntax tree (AST). Then it transforms the AST int

Releases(v0.2.2)
Owner
Jasper
Jasper
TextOCX is a Windows program that converts TeX snippet to MSOffice pastable format.

TextOCX TeX Snippet =====> MSOffice Screencast Preview | Download What TextOCX is a Windows program that converts TeX snippet to MSOffice pastable for

Xie Jingyi 5 Feb 18, 2024
Latex template handler using Rust

Latex template handler using Rust All the templates used by this program are stored in another GitHub repository. Dependencies rust & cargo How to use

Johan Rodríguez 2 Oct 19, 2022
🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.

Marky Markdown Magician ?? Features Hot reload previewing ?? Conversion to HTML / PDF ?? Themes! ✨ Extensions - Math, diagrams, syntax-highlighting ??

Vadim 12 Feb 19, 2023
Make beautiful colored code listings in LaTeX with the power of TreeSitter.

What is this? This is a CLI tool that consumes TreeSitter's output and transforms it into LaTeX code that will produce syntax-colored code listing. If

Tomáš Lebeda 11 Sep 4, 2023
LaTeX support for Typst, powered by Rust and WASM.

MiTeX LaTeX support for Typst, powered by Rust and WASM. MiTeX processes LaTeX code into an abstract syntax tree (AST). Then it transforms the AST int

null 58 Jan 1, 2024
A zero-dependency crate for writing repetitive code easier and faster.

akin A zero-dependency crate for writing repetitive code easier and faster. Check Syntax for information about how to use it. Why? Example Syntax NONE

LyonSyonII 36 Dec 29, 2022
visual guide for writing Intrinsics(SIMD)

wasm-pack-template A template for kick starting a Rust and WebAssembly project using wasm-pack. Tutorial | Chat Built with ?? ?? by The Rust and WebAs

Ric Li 1 Apr 6, 2022
A domain-specific language for writing AIR constraints for Miden VM

AirScript A domain specific language to write AIR constraints for the Miden VM. NOTE: This project is in the initial stages of development. Overview A

Polygon Miden 25 Dec 23, 2022
A domain-specific language for writing AIR constraints for Miden VM

AirScript A domain-specific language for expressing AIR constraints for STARKs, especially for STARK-based virtual machines like Miden VM. An in-depth

Polygon Miden 16 Nov 9, 2022
Pure rust library for reading / writing DNG files providing access to the raw data in a zero-copy friendly way.

DNG-rs   A pure rust library for reading / writing DNG files providing access to the raw data in a zero-copy friendly way. Also containing code for re

apertus° - open source cinema 4 Dec 1, 2022