texlite
texlite copied to clipboard
:pencil: A lightweight, open-source tool for writing standard LaTeX documents cleanly using Markdown-style syntax.
TeXLite is a lightweight, open-source tool for writing standard LaTeX documents cleanly using Markdown-style syntax. It's all about writing your LaTeX documents without distractions or overhead.
Example
![]() |
![]() |
|---|---|
| Input: Document | Output: PDF |
TeXLite processes all LaTeX commands seamlessly and directly, even when using external packages!
Get Started
Installation
STEP 1: Install texlite with pip.
$ pip install --upgrade texlite
STEP 2: Install (if not already installed) a distribution of TeX. Recommendations:
-
On Windows, MikTeX can be installed from its official downloads page.
-
On MacOS, MacTeX can be installed with
brew cask install mactex. -
On Ubuntu/Debian, TeX Live can be installed with
sudo apt-get install texlive.
You should now be able to run $ texlite (see Usage). If you have any issues, refer to Installation Fixes.
Usage
Write your document in any editor and save as Markdown (.md). See here for syntax.
Compile your document to PDF by opening the terminal and using:
$ texlite my_document.md
where my_document.md is the path to your document. Note that on Windows you may need to use python -m texlite my_document.md instead, (see Installation Fixes for more info).
Use texlite --help for options and information.
Guide
:orange_book: The guide provides a concise but comprehensive run-down on all you need to know, with examples included.
Document Setup
Document setup options can be specified with tags at the start of the document. For example:
:title: My Document
:usepackages: xcolor, hyperref
The lines above will set the document title to "My Document" and allow the document to use commands from the xcolor and hyperref LaTeX packages (given they're installed).
All the meta specification tags can be found in the guide here.
Saving as LaTeX/TeX
TeXLite "transpiles" to TeX, so it's very easy to save the .tex with:
$ texlite --save-tex my_document.md
Or if you want just the .tex and no PDF:
$ texlite --no-pdf my_document.md
Contributing
TeXLite is still in development and has plenty of features and fixes yet to come! If you can help with that, no matter to what degree, contributions to the project are greatly appreciated.
For example, you can become a credited contributer to the project by:
- Adding ideas for the project to Issues.
- Adding new components (as simple as adding a module to
texlite/componentsand then adding it toparse.py). - Fixing bugs, or trying to break TeXLite to discover bugs (go to Issues).
- Writing documentation or examples (super appreciated!).
Notes on contributing:
-
If you're new to contributing, that's okay! Refer to this great guide on how to get started.
-
Go to Issues to report any bugs, suggest any features, or see what contributions are currently in need.
-
Before and after implementing features, run tests on your local build with
$ toxand lint with$ tox -e lint. Pull requests will not be accepted if not passing tests.
Other
License
TeXLite is licensed under GNU GPL v3. You are essentially free to use this software in any way you want (privately, commercially, with modifications, etc.) on the condition that distributions stay open-source and stick to the license.
Installation Fixes
If you're having issues with installing TeXLite, here are some fixes to possible problems:
-
TeXLite not added to Windows PATH: On Windows, Pip will not automatically add programs to your PATH (meaning that TeXLite can't be executed with
$ texlite). Try calling TeXLite instead withpython -m texliteorpython3 -m texlite, or adding Python/TeXLite to your PATH. -
Wrong Python: If
pip install texliteis not working, you may be using Python 2.7, which has reached its end of life. Usepip3 install --upgrade pipand thenpip3 install texliteto ensure that you're using Python 3. -
TeX Live Missing Packages: If TeX Live is installed and working but the document TeX cannot be compiled, it may because of missing plugins. You can ensure your TeX Live has all the plugins with
sudo apt-get install texlive-full. -
MikTeX Missing Packages: When first running MikTeX on Windows, you may still need to install LaTeX packages. To easily install all that are missing, run
texliteand wait for a prompt. In the prompt there's a checkbox to do this automatically, which may require you to wait but then it should fix your problems.


