Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/red-rapious/lobstex
A mini LaTeX clone prototype in Rust.
https://github.com/red-rapious/lobstex
latex pdf-generation rust
Last synced: 26 days ago
JSON representation
A mini LaTeX clone prototype in Rust.
- Host: GitHub
- URL: https://github.com/red-rapious/lobstex
- Owner: Red-Rapious
- Created: 2024-05-03T18:43:18.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-07T07:40:14.000Z (9 months ago)
- Last Synced: 2024-11-12T18:28:24.930Z (3 months ago)
- Topics: latex, pdf-generation, rust
- Language: Rust
- Homepage:
- Size: 6.64 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LobsTeX
A mini LaTeX clone prototype in Rust.```
_ _ _____ __ __
| | ___| |__ __|_ _|__\ \/ /
| |__/ _ \ '_ (_-< | |/ -_)> <
|____\___/_.__/__/ |_|\___/_/\_\
/==g _
T // >>>/---{_ P
e `==::[[[[|: _ D
X >>>\---{_ F
```## Compilation and usage
To build the project, launch at the root of the repository:
```bash
cargo build
```
You can launch LobsTeX using
```bash
./target/debug/lobstex demo.lob
```
to compile any LobsTeX file to a PDF.Alternatively, you can do:
```bash
cargo run demo.lob
```
which builds and executes LobsTeX.## How it works
This project is build in Rust. A simili-LaTeX file is lexed and parsed using [`lalrpop`](https://github.com/lalrpop/lalrpop) to build a simple AST. This AST is then rendered into a PDF using - for now - the [`genpdf`](https://github.com/dabega/genpdf-rs) crate. I might transition from the high-level `genpdf` crate towards the lower-level `printpdf` crate to add more features, such as justified alignment.## TODO
- Page numbers
- Margin handling
- Bold, italic text