A command-line tool and Python library to convert arXiv papers to Markdown format.
Project description
arxiv2md
A command-line tool and Python library for converting arXiv papers to Markdown format.
It retrieves the paper's source code (.tex) from an input arXiv URL and converts it to Markdown format.
Setup
First, you need to install latexml:
# For macOS
brew install latexml
# For Ubuntu
sudo apt update
sudo apt install latexml
Then install arxiv2md:
# Using pip
pip install arxiv2md
# Using uv
uv tool install arxiv2md
Usage
Simply provide the arXiv URL:
arxiv2md https://arxiv.org/abs/1706.03762
For use from Python code:
from arxiv2md import arxiv2md
markdown, metadata = arxiv2md("https://arxiv.org/abs/1706.03762")
with open("output.md", "w") as f:
f.write(markdown)
Example output file: example.md
Notes
- The input URL doesn't necessarily need to be the arXiv's abstract page. It will work with PDF pages or source code pages as well. Ultimately, it should work with any string containing an arXiv ID.
- Papers without provided LaTeX source code cannot be converted.
- Figures and tables will be ignored.
- Papers not using bibtex will have reference citations displayed incorrectly.
- For papers with a large number of pages, processing by latexml may take considerable time.
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 arxiv2md-0.1.1.tar.gz.
File metadata
- Download URL: arxiv2md-0.1.1.tar.gz
- Upload date:
- Size: 42.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3354f2649795e77c5fd1c65852b46db363749ae60da6e108254409ba209ce7f
|
|
| MD5 |
9f2becb73641bd6f6dc62c98b6a2e6fe
|
|
| BLAKE2b-256 |
66c4c008d78236584cbadeb4c45ea6b13cd03a47f5aa3b5d2a9dccba18856ba7
|
File details
Details for the file arxiv2md-0.1.1-py3-none-any.whl.
File metadata
- Download URL: arxiv2md-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52ee217058cc94805b4627a036b9d433d9f61a59ed43b6dad04c5945e5e10620
|
|
| MD5 |
d26ec5b340dddc049ce14a6dbdc67db8
|
|
| BLAKE2b-256 |
6f850ddebe7f283fad8a45472939c1bc6c438630ea1f5269cefbefe6f6ad584f
|