chris-asl / plotextractor

Extract images and captions from TeX files in a tar archive.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plotextractor

Small library for converting and mapping plots in TeX source used in scholarly communication.

Originally part of Invenio https://github.com/inveniosoftware/invenio.

Installation

pip install plotextractor

Usage

from plotextractor import process_tarball
plots = process_tarball("/path/to/tarball.tar.gz")
print(plots[0])
{
    'url': '/path/to/tarball.tar.gz_files/d15-120f3d.png',
    'captions': ['The $\\rho^0$ meson properties: (a) Mass ...']
    'name': 'd15-120f3d',
    'label': 'fig:mass'
}

Known issues

If you experience frequent DelegateError errors you may need to update your version of GhostScript.

About

Extract images and captions from TeX files in a tar archive.

License:GNU General Public License v2.0


Languages

Language:Python 98.6%Language:Shell 1.4%