UnTeX - Parsing and formatting TeX documents with Rust - Looking for help

60 points jeertmans

Hi everyone!

[TL;DR] I'm working on UnTeX, a general-purpose TeX code library and CLI, and I'm looking for help or feedback.

Context

Very recently, I started reworking UnTeX, a project I developed to enhance my writing environment. I use LaTeX for almost every document I work on, and this is great for writing scientific documents.

Nonetheless, it lacks a lot of nice tools such as "linters", "formatters", "grammar-checker", "syntax-checker", and so on. I know some tools exist (e.g., opendetex, ChkTeX, ...), but most are very old, or do not provide an API for easily interfacing with other programs.

This is why I developed UnTeX: create a general-purpose library, written in Rust, and a CLI that exposes many commands for manipulating TeX files. Having a library in parallel to a CLI is very important to me.

Currently, UnTeX is still in beta, and only few commands are implemented. I recommend you read the README or the docs if you are interested in knowing more :-) I think the core foundations are already there.

Why do I need your help

Parsing TeX, or LaTeX, documents is a very complicated task (in my opinion). As such, UnTeX does not mean to be a complete TeX parser, but rather something that works for most documents. E.g., I will probably assume that nobody will \\renewcommand\\section, otherwise parsing text from files becomes very hard :'-)

I know very little about TeX-syntax rules, and this is the first "official" parser that I write. Of course, I try to rely on documentations (see TeX and LaTeX) when possible.

If you know a bit about TeX, LaTeX, parsing code, or Rust, you can help me:

  • using the CLI and giving your opinion on the current in/outs;
  • reading the docs, and suggesting improvements;
  • contributing to v0.4.0's release, meta issues were opened for that;
  • giving your opinion on the lexer, see Token;
  • asking questions here or on GitHub;
  • or anything else!

Thanks to all of those who took the time to read this, and to everyone who is willing to contribute in some way!

I'm open to any feedback or criticism!