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...
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

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

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
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 303 Nov 24, 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