Description: | Convert TeX and LaTeX to PNG images. |
Latest Version: | 2014.12.28 |
Source Code: | src/ |
Architecture: |
|
Dependencies: |
|
Arch Repositories: |
|
AUR Page: | tex2png |
Arch Forum Thread: | 97433 |
Tags: |
tex2png easily converts
When using the “-T” option, single-page images of arbitrary size can be created.
The equation
$\phi_n(\kappa) = \frac{1}{4\pi^2\kappa^2} \int_0^\infty \frac{\sin(\kappa R)}{\kappa R} \frac{\partial}{\partial R} \left[R^2\frac{\partial D_n(R)}{\partial R}\right]\,dR$
with tex2png and inserted automatically into this page using a
script. As you can see, the image is vertically aligned to its context.
Simpler examples include
$ tex2png --help
ABOUT
tex2png - convert (La)TeX to PNG images
USAGE
tex2png [options] [-- <dvi2png args>]
A (La)Tex string can be passed either as a command-line parameter or via
STDIN. When manually entered via STDIN, use ctrl+d to terminate input.
OPTIONS
-b <color spec>
The background color to pass to dvipng's "--bg" option. It should be given
in TeX color \special syntax, e.g. "rgb 0.2 0.2 0.2". "Transparent" and
"transparent" are also accepted. See the dvipng help message for more
details. Default: 'transparent'
-c <string>
The (La)TeX string.
-d <path>
The output directory. See below.
-D <int>
The dpi argument passed to "dvipng". Default is 100. Increase this to
increase font size.
-f
Specify the full input document. By default, tex2png provides its own
headers and wraps the input in document tags. This option enables the user
to provide a full (La)TeX document with custom headers.
-i
Inline mode. This will include the height and depth in the output, which can
be used for vertical alignment in web pages, e.g. This should only be used
when the tex contains mathematics.
-h
Display this help message.
-o <path>
The image path. See below.
-p <int>
Page number to render. Default is 1.
-t <path>
The temporary working directory. A random directory is created with "mktemp"
by default.
-T
Crop whitespace around the content (dvipng -T tight).
OUTPUT
If the image path is set then it is the full path to the image. If it is not
set then the image name will be the sha256 digest of the (La)Tex input string
with the ".png" extension. If the output directory has been set then the image
will be saved there, otherwise it will be saved in the current directory.
DIV2PNG ARGUMENTS
All arguments following "--" will be passed directly to dvi2png. See the
dvi2png man page for details.