https://github.com/shadmeoli/latex_lexer
This project is a TypeScript-based lexer that converts Markdown input into LaTeX output. The lexer tokenizes the Markdown text, parses it into an Abstract Syntax Tree (AST), and then generates the corresponding LaTeX code.
https://github.com/shadmeoli/latex_lexer
Last synced: 3 months ago
JSON representation
This project is a TypeScript-based lexer that converts Markdown input into LaTeX output. The lexer tokenizes the Markdown text, parses it into an Abstract Syntax Tree (AST), and then generates the corresponding LaTeX code.
- Host: GitHub
- URL: https://github.com/shadmeoli/latex_lexer
- Owner: shadmeoli
- Created: 2024-08-02T19:22:37.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-08-03T12:26:37.000Z (10 months ago)
- Last Synced: 2025-01-21T13:07:09.577Z (4 months ago)
- Language: TypeScript
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# latex_lexer
## Markdown to LaTeX ConverterThis project is a TypeScript-based lexer that converts Markdown input into LaTeX output. The lexer tokenizes the Markdown text, parses it into an Abstract Syntax Tree (AST), and then generates the corresponding LaTeX code.
To install dependencies:## Table of Contents
- [Installation](#installation)
- [Project Structure](#project-structure)
- [Contributing](#contributing)## Installation
To get started, clone the repository and install the necessary dependencies:```bash
git clone https://github.com/shadmeoli/latex_lexer.git
cd latex_lexer
``````bash
bun install
```To run:
```bash
bun run index.ts
```## Project Structure
```
latex_lexer/
├── src/
│ ├── lexer.ts
│ ├── parser.ts
│ ├── generator.ts
│ └── index.ts
├── .gitignore
├── package.json
├── README.md
└── tsconfig.json
```- **src/lexer.ts**: Contains the lexer logic to tokenize Markdown input.
- **src/parser.ts**: Contains the parser logic to convert tokens into an AST.
- **src/generator.ts**: Contains the generator logic to convert the AST into LaTeX code.
- **src/index.ts**: Main entry point tying everything together.## Contributing
Contributions are welcome! Please fork the repository and create a pull request with your changes. Make sure to follow the coding style and include tests for any new features or bug fixes.
1. Fork the repository
2. Create a new branch (`git checkout -b feature-branch`)
3. Commit your changes (`git commit -m 'Add some feature'`)
4. Push to the branch (`git push origin feature-branch`)
5. Create a pull request