Skip to content

Commit

Permalink
Improvements made & example added to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasl86 committed Jan 9, 2017
1 parent d2a2a9f commit 30be080
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,43 @@

LaTeXbuilder facilitates the compilation of latex source code into PDF or PNG file format e.g. for the creation of a PNG image file of a math formula.
It can
- build a PDF or PNG from given LaTeX source code, e.g. a simple formua: `$\sum P = 0$`
- embed the source code in the PNG file for future modifying of the PNG contents
- build a PDF or PNG from given LaTeX source code, e.g. a simple formua such as `$\sum P = 0$`
- embed the source code in the PNG file for future modifying of the contents
- build figures created with tikzpicture and/or pgfplots

A commandline interface and rudimentary GUI are available (so far).
A commandline interface and rudimentary GUI are available.

The program has so far only been tested with Ubuntu 14.04.
The program has so far only been tested with Ubuntu 14.04 and TeX Live.

# Requirements

For the program to work, the following needs to be pre-installed:
- A latex distribution that contains a pdflatex implementation (e.g. MiKTeX or TeX Live)
- A latex distribution that contains a *pdflatex* implementation (e.g. MiKTeX or TeX Live)
- ImageMagick for the conversion from PDF to PNG

The program uses the following libraries:
- The command line parsing library JOpt Simple
- icafe (https://github.com/dragon66/icafe), a Java library for reading, writing, converting and manipulating images and metadata. The library is used to embed the LaTeX source code within the built PNG file
-ini4j, a Java AIP for parsing configuration files written in the .ini file format
- [icafe](https://github.com/dragon66/icafe), a Java library for reading, writing, converting, and manipulating images and metadata. The library is used to embed the LaTeX source code within the built PNG file and to extract the embedded code in PNGs
- [JOpt Simple](https://pholser.github.io/jopt-simple/), a command line option parsing library
- [ini4j](http://ini4j.sourceforge.net/), a Java API for parsing configuration files written in the .ini file format

# Example

The command line interface is used to compile sample code consisting of a plot (http://pgfplots.sourceforge.net/gallery.html).
Source file (pgfplots_example.tex):
```latex
\begin{tikzpicture}
\begin{axis}[
xlabel=$x$, ylabel={$f(x) = x^2 - x +4$} ]
% use TeX as calculator:
\addplot {x^2 - x +4};
\end{axis}
\end{tikzpicture}
```

Command to build *pgfplots_example.tex*:

`LaTeXbuilder.jar -b pgfplots_example.tex -o pgfplots_example.png`

Result:

![Result](pgfplots_example.png)
Binary file added pgfplots_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 30be080

Please sign in to comment.