github.com/nwtgck/math2img

Convert LaTex Math format to image

7 stars
0 dependents
License: MIT

Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  math2img:
    github: nwtgck/math2img
    version: ~> 0.1.0

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.1.0. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

# math2img - Convert LaTeX Math to image [![Build Status](https://travis-ci.org/nwtgck/math2img.svg?branch=master)](https://travis-ci.org/nwtgck/math2img)

## Requirements

* [Docker](https://www.docker.com/)

## Installation

```bash
brew tap nwtgck/math2img
brew install math2img
```


## Usage


```bash
math2img -e png sample1.math.tex
```
Then you can get `sample1.math.tex.png`

### `sample1.math.tex`

```tex
\[
    e^{i\pi}+1=0
\]
```
=>

<img src="demos/demo1.svg" width="200">

## Build Requirements

* [Crystal (Shards)](https://crystal-lang.org/)


## Build & Run

```bash
git clone <this repo url>
cd <this repo>
shards build
./bin/math2img -e png samples/sample1.math.tex
```

Then you can get `sample1.math.tex.png`

(`./bin/math2img` is a generated binary file.)


## Build a Docker image

```bash
cd <this repo>
docker build -t nwtgck/math2img ./docker
```

## Gallery

<img src="demos/sample2.math.tex.svg" height="50"><br>

<img src="demos/sample3.math.tex.svg" height="50"><br>

<img src="demos/sample4.math.tex.svg" height="50"><br>

<img src="demos/sample5.math.tex.svg" height="50"><br>

<img src="demos/sample6.math.tex.svg" height="50"><br>

<img src="demos/sample7.math.tex.svg" height="50"><br>