1ltximg(1) General Commands Manual ltximg(1)
2
3
4
6 ltximg - LaTeX environments to image and standalone files
7
9 ltximg [<options>] [--] <filename>.<tex|ltx>
10
12 ltximg automates the process of extracting and converting environments
13 from LaTeX file to image formats and standalone files using ghostscript
14 and poppler-utils. Generates a one file with only extracted
15 environments and other with all extracted environments converted to
16 "\includegraphics".
17
18 By default the extracted environments are:
19
20 preview pspicture tikzpicture pgfpicture psgraph postscript PSTexample
21
23 Options that accept a value require either a blank space or "=" between
24 the option and the value. Multiple short options can be bundling and if
25 the last option takes a comma separated list you need "--" at the end.
26 Relative or absolute paths for directories and files is not supported.
27
28 If used without [<options>] the extracted environments are converted to
29 pdf image format and saved in "./images" directory using "pdflatex" and
30 preview package for process.
31
32 General script options:
33
34 -h, --help
35 Display command line help and exit.
36
37 -v, --version
38 Display current version and exit.
39
40 -V, --verbose
41 Verbose printing information.
42
43 -l, --log
44 Write ".log" file with debug information.
45
46 -t, --tif
47 Create ".tif" files using ghostscript.
48
49 -b, --bmp
50 Create ".bmp" files using ghostscript.
51
52 -j, --jpg
53 Create ".jpg" files using ghostscript.
54
55 -p, --png
56 Create ".png" files using ghostscript.
57
58 -e, --eps
59 Create ".eps" files using pdftops.
60
61 -s, --svg
62 Create ".svg" files using pdftocairo.
63
64 -P, --ppm
65 Create ".ppm" files using pdftoppm.
66
67 -g, --gray
68 Gray scale for images using ghostscript.
69
70 -f, --force
71 Capture "\psset" and "\tikzset" to extract.
72
73 -n, --noprew
74 Create images files without preview package.
75
76 -r integer, --runs=integer
77 Set the number of times the compiler will run on the input file for
78 environment extraction (default: 1).
79
80 -d integer, --dpi=integer
81 Dots per inch resolution for images (default: 150).
82
83 -m integer, --margins=integer
84 Set margins in bp for pdfcrop (default: 0).
85
86 -o filename, --output=filename
87 Create output file.
88
89 --imgdir=dirname
90 Set name of directory to save images and files (default: images).
91
92 --prefix=string
93 Set prefix append to each generated files (default: fig).
94
95 --myverb=macroname
96 Add "\macroname" to verbatim inline search (default: myverb).
97
98 --clean=doc|pst|tkz|all|off
99 Removes specific block text in output file (default: doc).
100
101 --zip
102 Compress files generated in ".zip" format.
103
104 --tar
105 Compress files generated in ".tar.gz" format.
106
107 --srcenv
108 Create files with only code of environments.
109
110 --subenv
111 Create standalone files for environments.
112
113 --shell
114 Enable "\write18{SHELL COMMAND}".
115
116 --latex
117 Using "latex>dvips>ps2pdf" for compiler input and "pdflatex" for
118 compiler output.
119
120 --dvips
121 Using "latex>dvips>ps2pdf" for compiler input and
122 "latex>dvips>ps2pdf" for compiler output.
123
124 --dvilua
125 Using "dvilualatex>dvips>ps2pdf" for compiler input and "lualatex"
126 for compiler output.
127
128 --dvipdf
129 Using "latex>dvipdfmx" for compiler input and "latex>dvipdfmx" for
130 compiler output.
131
132 --xetex
133 Using "xelatex" for compiler input and output.
134
135 --luatex
136 Using "lualatex" for compiler input and output.
137
138 --arara
139 Use "arara" for compiler input and output.
140
141 --latexmk
142 Using "latexmk" for compiler output file.
143
144 --norun
145 Run script, but no create images files.
146
147 --nopdf
148 Don't create a ".pdf" image files.
149
150 --nocrop
151 Don't run pdfcrop.
152
153 --extrenv=env1,env2,...
154 Add new environments to extract.
155
156 --skipenv=env1,env2,...
157 Skip some default environments to extract.
158
159 --verbenv=env1,env2,...
160 Add new verbatim environments.
161
162 --writenv=env1,env2,...
163 Add new verbatim write environments.
164
165 --deltenv=env1,env2,...
166 Delete environments in output file.
167
169 ltximg --latex -e -p --subenv -o test-out.ltx test-in.ltx
170
171 Create a "./images" directory (if it doesn't exist) with all extracted
172 environments converted to ".pdf", ".eps", ".png" and standalone files,
173 a file test-in-fig-all.ltx with all extracted environments and the file
174 test-out.ltx with all environments converted to "\includegraphics"
175 using "latex>dvips>ps2pdf" and preview package for test-in.ltx and
176 "pdflatex" for test-out.ltx.
177
179 For full documentation use:
180
181 texdoc ltximg
182
184 Repository : <https://github.com/pablgonz/ltximg>
185
186 Bug tracker: <https://github.com/pablgonz/ltximg/issues>
187
189 Pablo González Luengo, pablgonz@yahoo.com.
190
192 Copyright 2013-2021 Pablo González, pablgonz@yahoo.com.
193
194 This program is free software; you can redistribute it and/or modify it
195 under the terms of the GNU General Public License as published by the
196 Free Software Foundation; either version 3 of the License, or (at your
197 option) any later version.
198
199 This program is distributed in the hope that it will be useful, but
200 WITHOUT ANY WARRANTY; without even the implied warranty of
201 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
202 General Public License for more details.
203
205 gs(1), dvips(1), ps2pdf(1), pdfcrop(1), pdftops(1), pdftocairo(1),
206 pdftoppm(1)
207
208
209
2102.1 2021-05-21 ltximg(1)