A latex's superset
Project description
btex
A latex superset.
How to install
You can simply install btex with the pip package manager
pip install btex
Get started
The language is very similar to latex.
If you want to learn btex, take a look at the examples, I've also made a visual studio code extension for syntax highligthing and snippets.
Macros
Macros are predefined variables in the btex interpreter which will be ignored by the program and instantly converted into the latex alternative.
Macros are surrounded by double $, you can find a list of all the supported macros in the main python file of the interpreter.
Some examples of macros:
$$infinity$$ -> the infinity symbol
$$textwidth$$ -> the \textwidth unit
$$dot$$ -> the dot product symbol for math expressions
$$percent$$ -> since the % symbol is used in latex for comments, you can escape it using this macro
NOTE: if the document doesn't format as you want, you can force it to place some characters:
$$fs$$ -> forces a space
$$fn$$ -> forces a newline (putting \\)
Env
Some latex libraries can have some variables to set for customization.
Since btex automatically imports used libraries without needing to include them manually, you can set some variables with the env.
You can set them in the file
@env {
pdftitle = Document\
var = value\
}
Or using a file
@env .env\
These are the variables you can change
| Var name | Description |
|---|---|
| pdftitle | Used in the hyperref package \hypersetup{pdftitle={VAR} |
Using components not yet supported
Since this project is open source, if you want to use a component that is not available on btex, you can clone this repository and add it by yourself, or just open an issue asking me to do it.
However, if you do really need a component, you can use the @latex attribute
@latex {
your latex code
}
Everything you write in this block, will be ignored by the btex interpreter and will be put exactly how it is in the .tex output file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file btex-0.5.tar.gz.
File metadata
- Download URL: btex-0.5.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.7 Linux/6.17.0-22-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fe2bf041ecf2d05b2b2e617952c24758453516aef616b36488b49eed371a344
|
|
| MD5 |
96edd52b7005558be17e38e4b18621f2
|
|
| BLAKE2b-256 |
d5ccdf9ddba3498efbd09000f85dd7cde203199ebc135f4f70d508cc81325afc
|
File details
Details for the file btex-0.5-py3-none-any.whl.
File metadata
- Download URL: btex-0.5-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.7 Linux/6.17.0-22-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b8bedf65ec3acbabfda721819c5328b0d3d0a8008d4ba49750508fe563cb6b2
|
|
| MD5 |
4486851ae24bf38ed581f42c1cde1aad
|
|
| BLAKE2b-256 |
6aeb164d1a66146f765c8e92cbd4449c676b4c56351eb0e44557bdf85f24b759
|