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.1rc2.tar.gz
.
File metadata
- Download URL: pandoc_displaymath2equation-0.0.0.1rc2.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 | 2ebece1febe58203ebc8fefa22a6faa7459f5fa38453a4bc81cee7eb8a3e8239 |
|
MD5 | 312a1dee34cb2d2f502faa81401fb6f3 |
|
BLAKE2b-256 | 54d92628da35ea64ebd26a805aa9fdaa43fbd81305e2ae7d885e4e89383b6300 |
File details
Details for the file pandoc_displaymath2equation-0.0.0.1rc2-py3-none-any.whl
.
File metadata
- Download URL: pandoc_displaymath2equation-0.0.0.1rc2-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 | 286c6abfffd86c0044b0b74ce381dc9599b1c082dd183e905a3d907119052b67 |
|
MD5 | ccdb515b1edea45246675e6b743f742a |
|
BLAKE2b-256 | caf0756dc7f193c2c380999b6daef8d7b322041c0aa9f7f5b153defdb67773bc |