https://github.com/bencevans/arxiv-to-xml
📎 Generate XML representation of an arXiv paper using latexml
https://github.com/bencevans/arxiv-to-xml
arxiv latexml papers research
Last synced: 28 days ago
JSON representation
📎 Generate XML representation of an arXiv paper using latexml
- Host: GitHub
- URL: https://github.com/bencevans/arxiv-to-xml
- Owner: bencevans
- Created: 2018-10-14T21:15:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-15T18:21:58.000Z (over 7 years ago)
- Last Synced: 2025-02-12T15:48:21.798Z (over 1 year ago)
- Topics: arxiv, latexml, papers, research
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# arxiv-to-xml
> Generate XML representation of an arXiv paper using `latexml`.
## Prerequisite
The following is required if running on a host machine. Instead you can use the Docker image - instructions below.
Install texlive
```
sudo apt update
sudo apt install -y texlive-full
```
Install latexml
```
mkdir -p /usr/src/latexml
cd /usr/src/latexml
export LATEXML_COMMIT=9bccfbf633855a2cf9a1c5f03c3ce85c46be4717
curl -L https://github.com/brucemiller/LaTeXML/tarball/$LATEXML_COMMIT | tar --strip-components 1 -zxf - \
&& perl Makefile.PL \
&& make \
&& make install
```
## Docker
### Prebuilt
```
# Pull image
docker pull bencevans/arxiv-to-xml
# Get your XML
docker run --rm bencevans/arxiv-to-xml [arxiv id]
```
### Build your own
```
# Clone repo
git clone https://github.com/bencevans/arxiv-to-xml.git
cd arxiv-to-xml
# Build image
docker build -t arxiv-to-xml .
# Get your XML
docker run arxiv-to-xml [arxiv id]
```
## Nodejs
### Command line interface
Ensure you've installed a latex suite and latexml.
```
# Install from npm
npm install --global arxiv-to-xml
# Get your XML
arxiv-to-xml [arxiv id]
```
### Library
Ensure you've installed a latex suite and latexml.
```
# Install from npm
npm install --save arxiv-to-xml
```
```js
const arxivToXML = require('arxiv-to-xml')
arxivToXML(arxivId)
.then(xml => console.log(xml))
.catch(err => {
console.error(err)
process.exit(1)
})
```
## Licence
MIT © [Ben Evans](https://bencevans.io)