Automatically number display-math equations in pandoc.
Project description
pandoc-displaymath2equations
Replace blocks of displaymath with the equation environment.
This is a very simple filter. For a solution with all the bells and whistles use the (now seemingly unmaintained) pandoc-eqnos.
Effect
Content that would usually generate output like this:
\[
1 + 1 = 2
\]
will instead generate a block like this:
\begin{equation}
1 + 1 = 2
\end{equation}
Usage
Install the pandoc-displaymath2equation
package from PyPI, and add pandoc-displaymath2equation
to your filters.
Development
Source-code goes into displaymath2equation/
, tests go into tst/
.
Code style should conform to PEP-8, and commit messages should follow the conventional commits spec.
Dependencies
Dependencies for development can be installed from requirements-dev.txt
.
New dependencies should go into pyproject.toml
.
If code in displaymath2equation/
depends on them, they go into [project.dependencies]
, otherwise into an environment in [project.optional-dependencies]
, most likely dev
.
If dependencies are added, requirements.txt
and requirements-dev.txt
should be regenerated.
This can be done with make requirements.txt
and make requirements-dev.txt
respectively.
Testing
Having tests is nice. Even though the test we have is a little sparse, it's better than no test.
Docs
Documentation is nice, but doesn't exist yet.
Once it does, it goes into docs
.
TODOs
Possible future features that would be nice to have:
- syntax for
- labeling (determining the label rendered next to the equation)
- identifying (giving a unique ID to an equation)
- reference an equation by its ID, such that its label is displayed
- link an equation by its ID
- logic to deal with split/align environments
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
File details
Details for the file pandoc_displaymath2equation-0.0.0.1rc1.tar.gz
.
File metadata
- Download URL: pandoc_displaymath2equation-0.0.0.1rc1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ccf597e696d4e4e2ab77092f536bc54891aba4ce59724fcc1d59c6d885cc533 |
|
MD5 | 2d0f5ebc7ec737100c1269d633bd53a6 |
|
BLAKE2b-256 | f9531e8f3660745ecc7814cbf83774226a47bdf9ca6dffb084541b1dc340c17f |
File details
Details for the file pandoc_displaymath2equation-0.0.0.1rc1-py3-none-any.whl
.
File metadata
- Download URL: pandoc_displaymath2equation-0.0.0.1rc1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b695a9bda7d21995b3ba92de9d3edda6bc9ffb5d5e9ba9d786ecd1f75ddbf7f9 |
|
MD5 | 060d181d14718e9542495797feded6f6 |
|
BLAKE2b-256 | 54f3aa821996fd175be2803cef6496160faf3f72857b7053698c725d6445ab65 |