ltximg(1) General Commands Manual ltximg(1)

ltximg - LaTeX environments to image and standalone files

ltximg [<options>] [--] <filename>.<tex|ltx>

ltximg automates the process of extracting and converting environments from LaTeX file to image formats and standalone files using ghostscript and poppler-utils. Generates a one file with only extracted environments and other with all extracted environments converted to "\includegraphics".

By default the extracted environments are:

preview pspicture tikzpicture pgfpicture psgraph postscript PSTexample

Options that accept a value require either a blank space or "=" between the option and the value. Multiple short options can be bundling and if the last option takes a comma separated list you need "--" at the end. Relative or absolute paths for directories and files is not supported.

If used without [<options>] the extracted environments are converted to pdf image format and saved in "./images" directory using "pdflatex" and preview package for process.

General script options:

Display command line help and exit.
Display current version and exit.
Verbose printing information.
Write ".log" file with debug information.
Create ".tif" files using ghostscript.
Create ".bmp" files using ghostscript.
Create ".jpg" files using ghostscript.
Create ".png" files using ghostscript.
Create ".eps" files using pdftops.
Create ".svg" files using pdftocairo.
Create ".ppm" files using pdftoppm.
Gray scale for images using ghostscript.
Capture "\psset" and "\tikzset" to extract.
Create images files without preview package.
Set the number of times the compiler will run on the input file for environment extraction (default: 1).
Dots per inch resolution for images (default: 150).
Set margins in bp for pdfcrop (default: 0).
Create output file.
Set name of directory to save images and files (default: images).
Set prefix append to each generated files (default: fig).
Add "\macroname" to verbatim inline search (default: myverb).
Removes specific block text in output file (default: doc).
Compress files generated in ".zip" format.
Compress files generated in ".tar.gz" format.
Create files with only code of environments.
Create standalone files for environments.
Enable "\write18{SHELL COMMAND}".
Using "latex>dvips>ps2pdf" for compiler input and "pdflatex" for compiler output.
Using "latex>dvips>ps2pdf" for compiler input and "latex>dvips>ps2pdf" for compiler output.
Using "dvilualatex>dvips>ps2pdf" for compiler input and "lualatex" for compiler output.
Using "latex>dvipdfmx" for compiler input and "latex>dvipdfmx" for compiler output.
Using "xelatex" for compiler input and output.
Using "lualatex" for compiler input and output.
Use "arara" for compiler input and output.
Using "latexmk" for compiler output file.
Run script, but no create images files.
Don't create a ".pdf" image files.
Don't run pdfcrop.
Add new environments to extract.
Skip some default environments to extract.
Add new verbatim environments.
Add new verbatim write environments.
Delete environments in output file.

ltximg --latex -e -p --subenv -o test-out.ltx test-in.ltx

Create a "./images" directory (if it doesn't exist) with all extracted environments converted to ".pdf", ".eps", ".png" and standalone files, a file test-in-fig-all.ltx with all extracted environments and the file test-out.ltx with all environments converted to "\includegraphics" using "latex>dvips>ps2pdf" and preview package for test-in.ltx and "pdflatex" for test-out.ltx.

For full documentation use:

texdoc ltximg

Repository : https://github.com/pablgonz/ltximg

Bug tracker: https://github.com/pablgonz/ltximg/issues

Pablo González Luengo, pablgonz@yahoo.com.

Copyright 2013-2021 Pablo González, pablgonz@yahoo.com.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

gs(1), dvips(1), ps2pdf(1), pdfcrop(1), pdftops(1), pdftocairo(1), pdftoppm(1)

2021-05-21 2.1