GithubHelp home page GithubHelp logo

lia's Introduction

LiA logo
(LaTeX Is Annoying)

A transpiled superset of $\text{TeX}$ for writing $\text{LaTeX}$.

build build

This project is in development (expect bugs). This is a superset of TeX that extends its syntax adding new several new features. These added features are just designed to make LaTeX code less verbose and 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
@img = (src, desc) => {
    env center {
        \image{@("images/" + src)}{10cm}
        \linebreak
        **@desc**
    }
}
#* Cool Image
## A subsection
@img(cat.png, A cat!)

Resulting TeX

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


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


\begin{document}
    \section*{Cool Image}
    \subsection{A subsection}
    \img{cat.png}{A 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
Arch Linux Install from the AUR https://aur.archlinux.org/packages/lia-git.
Other 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.

Usage

lia file.lia -w -c "pdflatex -interaction=nonstopmode file.tex"
  • Run lia --help for more information on usage.
  • The -w flag will tell the compiler to watch the file for changes and recompile it.
  • The -c flag chains a command to run after the build.

Building

Requires Rust to be installed.

git clone https://github.com/jaspwr/LiA
cd LiA
cargo build --release

Your binary will be in target/release.

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.

Contributing

I am planning to do a full rewrite. Please do not contribute right now.

lia's People

Contributors

jaspwr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.