Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arxiv2md-0.1.0.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arxiv2md-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file arxiv2md-0.1.0.tar.gz.

File metadata

  • Download URL: arxiv2md-0.1.0.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for arxiv2md-0.1.0.tar.gz
Algorithm Hash digest
SHA256 00c350049ed6945e012ccff92c27ea6655a3ae2e577a725b976bb11efefb25be
MD5 05de454386bd99ccf185a72c956722f9
BLAKE2b-256 69f1050fc37581eba8272ee5578c456c3ddcee81af822bb31b11fc8e6b494c04

See more details on using hashes here.

File details

Details for the file arxiv2md-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: arxiv2md-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for arxiv2md-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08145f2eb9c71ed5c78d0e00305a06fb07a6fd9d341e099c4657ac90f1357bd2
MD5 0deb677b1579b1f327f6ca426f19cd32
BLAKE2b-256 e4bfefd951547cff1417d005085a4880b8bed13563e2d8d0b2424a5448975658

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page