summaryrefslogtreecommitdiff
path: root/support/ltximg/ltximg.1
blob: 918b2626ddc01196ec20fd2f6e5a848649532e65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "ltximg 1"
.TH ltximg 1 "2021-05-21" "2.1" "General Commands Manual"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
ltximg \- LaTeX environments to image and standalone files
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBltximg\fR [<\fIoptions\fR>] [\-\-] <\fIfilename\fR>.<\fItex\fR|\fIltx\fR>
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBltximg\fR automates the process of extracting and converting
environments from LaTeX file to image formats and \fIstandalone\fR files
using \fIghostscript\fR and \fIpoppler-utils\fR. Generates a one file with
only extracted environments and other with all extracted environments
converted to \f(CW\*(C`\eincludegraphics\*(C'\fR.
.PP
By default the extracted environments are:
.PP
\&\fBpreview\fR \fBpspicture\fR \fBtikzpicture\fR \fBpgfpicture\fR \fBpsgraph\fR \fBpostscript\fR \fBPSTexample\fR
.SH "OPTIONS"
.IX Header "OPTIONS"
Options that accept a value require either a blank space or \f(CW\*(C`=\*(C'\fR between
the option and the value. Multiple short options can be bundling and
if the last option takes a comma separated list you need \f(CW\*(C`\-\-\*(C'\fR at the end.
Relative or absolute paths for directories and files is not supported.
.PP
If used without [<\fIoptions\fR>] the extracted environments are converted
to \fIpdf\fR image format and saved in \f(CW\*(C`./images\*(C'\fR directory using \f(CW\*(C`pdflatex\*(C'\fR
and \fIpreview\fR package for process.
.PP
General script options:
.IP "\fB\-h\fR, \fB\-\-help\fR" 4
.IX Item "-h, --help"
Display command line help and exit.
.IP "\fB\-v\fR, \fB\-\-version\fR" 4
.IX Item "-v, --version"
Display current version and exit.
.IP "\fB\-V\fR, \fB\-\-verbose\fR" 4
.IX Item "-V, --verbose"
Verbose printing information.
.IP "\fB\-l\fR, \fB\-\-log\fR" 4
.IX Item "-l, --log"
Write \f(CW\*(C`.log\*(C'\fR file with debug information.
.IP "\fB\-t\fR, \fB\-\-tif\fR" 4
.IX Item "-t, --tif"
Create \f(CW\*(C`.tif\*(C'\fR files using \fIghostscript\fR.
.IP "\fB\-b\fR, \fB\-\-bmp\fR" 4
.IX Item "-b, --bmp"
Create \f(CW\*(C`.bmp\*(C'\fR files using \fIghostscript\fR.
.IP "\fB\-j\fR, \fB\-\-jpg\fR" 4
.IX Item "-j, --jpg"
Create \f(CW\*(C`.jpg\*(C'\fR files using \fIghostscript\fR.
.IP "\fB\-p\fR, \fB\-\-png\fR" 4
.IX Item "-p, --png"
Create \f(CW\*(C`.png\*(C'\fR files using \fIghostscript\fR.
.IP "\fB\-e\fR, \fB\-\-eps\fR" 4
.IX Item "-e, --eps"
Create \f(CW\*(C`.eps\*(C'\fR files using \fIpdftops\fR.
.IP "\fB\-s\fR, \fB\-\-svg\fR" 4
.IX Item "-s, --svg"
Create \f(CW\*(C`.svg\*(C'\fR files using \fIpdftocairo\fR.
.IP "\fB\-P\fR, \fB\-\-ppm\fR" 4
.IX Item "-P, --ppm"
Create \f(CW\*(C`.ppm\*(C'\fR files using \fIpdftoppm\fR.
.IP "\fB\-g\fR, \fB\-\-gray\fR" 4
.IX Item "-g, --gray"
Gray scale for images using \fIghostscript\fR.
.IP "\fB\-f\fR, \fB\-\-force\fR" 4
.IX Item "-f, --force"
Capture \f(CW\*(C`\epsset\*(C'\fR and \f(CW\*(C`\etikzset\*(C'\fR to extract.
.IP "\fB\-n\fR, \fB\-\-noprew\fR" 4
.IX Item "-n, --noprew"
Create images files without \fIpreview\fR package.
.IP "\fB\-r\fR \fIinteger\fR, \fB\-\-runs\fR=\fIinteger\fR" 4
.IX Item "-r integer, --runs=integer"
Set the number of times the compiler will run on the \fIinput\fR file for
environment extraction (default: 1).
.IP "\fB\-d\fR \fIinteger\fR, \fB\-\-dpi\fR=\fIinteger\fR" 4
.IX Item "-d integer, --dpi=integer"
Dots per inch resolution for images (default: 150).
.IP "\fB\-m\fR \fIinteger\fR, \fB\-\-margins\fR=\fIinteger\fR" 4
.IX Item "-m integer, --margins=integer"
Set margins in bp for \fIpdfcrop\fR (default: 0).
.IP "\fB\-o\fR \fIfilename\fR, \fB\-\-output\fR=\fIfilename\fR" 4
.IX Item "-o filename, --output=filename"
Create \fIoutput\fR file.
.IP "\fB\-\-imgdir\fR=\fIdirname\fR" 4
.IX Item "--imgdir=dirname"
Set name of directory to save images and files (default: images).
.IP "\fB\-\-prefix\fR=\fIstring\fR" 4
.IX Item "--prefix=string"
Set \fIprefix\fR append to each generated files (default: fig).
.IP "\fB\-\-myverb\fR=\fImacroname\fR" 4
.IX Item "--myverb=macroname"
Add \f(CW\*(C`\emacroname\*(C'\fR to verbatim inline search (default: myverb).
.IP "\fB\-\-clean\fR=\fIdoc\fR|\fIpst\fR|\fItkz\fR|\fIall\fR|\fIoff\fR" 4
.IX Item "--clean=doc|pst|tkz|all|off"
Removes specific block text in \fIoutput\fR file (default: doc).
.IP "\fB\-\-zip\fR" 4
.IX Item "--zip"
Compress files generated in \f(CW\*(C`.zip\*(C'\fR format.
.IP "\fB\-\-tar\fR" 4
.IX Item "--tar"
Compress files generated in \f(CW\*(C`.tar.gz\*(C'\fR format.
.IP "\fB\-\-srcenv\fR" 4
.IX Item "--srcenv"
Create files with only code of environments.
.IP "\fB\-\-subenv\fR" 4
.IX Item "--subenv"
Create standalone files for environments.
.IP "\fB\-\-shell\fR" 4
.IX Item "--shell"
Enable \f(CW\*(C`\ewrite18{SHELL COMMAND}\*(C'\fR.
.IP "\fB\-\-latex\fR" 4
.IX Item "--latex"
Using \f(CW\*(C`latex>dvips>ps2pdf\*(C'\fR for compiler \fIinput\fR and \f(CW\*(C`pdflatex\*(C'\fR for compiler
\&\fIoutput\fR.
.IP "\fB\-\-dvips\fR" 4
.IX Item "--dvips"
Using \f(CW\*(C`latex>dvips>ps2pdf\*(C'\fR for compiler \fIinput\fR and \f(CW\*(C`latex>dvips>ps2pdf\*(C'\fR for
compiler \fIoutput\fR.
.IP "\fB\-\-dvilua\fR" 4
.IX Item "--dvilua"
Using \f(CW\*(C`dvilualatex>dvips>ps2pdf\*(C'\fR for compiler \fIinput\fR and \f(CW\*(C`lualatex\*(C'\fR for
compiler \fIoutput\fR.
.IP "\fB\-\-dvipdf\fR" 4
.IX Item "--dvipdf"
Using \f(CW\*(C`latex>dvipdfmx\*(C'\fR for compiler \fIinput\fR and \f(CW\*(C`latex>dvipdfmx\*(C'\fR for compiler
\&\fIoutput\fR.
.IP "\fB\-\-xetex\fR" 4
.IX Item "--xetex"
Using \f(CW\*(C`xelatex\*(C'\fR for compiler \fIinput\fR and \fIoutput\fR.
.IP "\fB\-\-luatex\fR" 4
.IX Item "--luatex"
Using \f(CW\*(C`lualatex\*(C'\fR for compiler \fIinput\fR and \fIoutput\fR.
.IP "\fB\-\-arara\fR" 4
.IX Item "--arara"
Use \f(CW\*(C`arara\*(C'\fR for compiler \fIinput\fR and \fIoutput\fR.
.IP "\fB\-\-latexmk\fR" 4
.IX Item "--latexmk"
Using \f(CW\*(C`latexmk\*(C'\fR for compiler \fIoutput\fR file.
.IP "\fB\-\-norun\fR" 4
.IX Item "--norun"
Run script, but no create images files.
.IP "\fB\-\-nopdf\fR" 4
.IX Item "--nopdf"
Don't create a \f(CW\*(C`.pdf\*(C'\fR image files.
.IP "\fB\-\-nocrop\fR" 4
.IX Item "--nocrop"
Don't run \fIpdfcrop\fR.
.IP "\fB\-\-extrenv\fR=\fIenv1,env2,...\fR" 4
.IX Item "--extrenv=env1,env2,..."
Add new environments to extract.
.IP "\fB\-\-skipenv\fR=\fIenv1,env2,...\fR" 4
.IX Item "--skipenv=env1,env2,..."
Skip some default environments to extract.
.IP "\fB\-\-verbenv\fR=\fIenv1,env2,...\fR" 4
.IX Item "--verbenv=env1,env2,..."
Add new verbatim environments.
.IP "\fB\-\-writenv\fR=\fIenv1,env2,...\fR" 4
.IX Item "--writenv=env1,env2,..."
Add new verbatim write environments.
.IP "\fB\-\-deltenv\fR=\fIenv1,env2,...\fR" 4
.IX Item "--deltenv=env1,env2,..."
Delete environments in \fIoutput\fR file.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
\&\fBltximg\fR \-\-latex \-e \-p \-\-subenv \-o test\-out.ltx test\-in.ltx
.PP
Create a \f(CW\*(C`./images\*(C'\fR directory (if it doesn't exist) with all extracted
environments converted to \f(CW\*(C`.pdf\*(C'\fR, \f(CW\*(C`.eps\*(C'\fR, \f(CW\*(C`.png\*(C'\fR and \fIstandalone\fR
files, a file \fItest\-in\-fig\-all.ltx\fR with all extracted environments
and the file \fItest\-out.ltx\fR with all environments converted to
\&\f(CW\*(C`\eincludegraphics\*(C'\fR using \f(CW\*(C`latex>dvips>ps2pdf\*(C'\fR and \fIpreview\fR
package for \fItest\-in.ltx\fR and \f(CW\*(C`pdflatex\*(C'\fR for \fItest\-out.ltx\fR.
.SH "DOCUMENTATION"
.IX Header "DOCUMENTATION"
For full documentation use:
.PP
texdoc \fBltximg\fR
.SH "ISSUES AND REPORTS"
.IX Header "ISSUES AND REPORTS"
\&\fBRepository\fR : <https://github.com/pablgonz/ltximg>
.PP
\&\fBBug tracker\fR: <https://github.com/pablgonz/ltximg/issues>
.SH "AUTHOR"
.IX Header "AUTHOR"
Pablo González Luengo, \fIpablgonz@yahoo.com\fR.
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
Copyright 2013\-2021 Pablo González, \fIpablgonz@yahoo.com\fR.
.PP
This program is free software; you can redistribute it and/or modify
it under the terms of the \s-1GNU\s0 General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.PP
This program is distributed in the hope that it will be useful, but
\&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0  See the \s-1GNU\s0
General Public License for more details.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBgs\fR\|(1), \fBdvips\fR\|(1), \fBps2pdf\fR\|(1), \fBpdfcrop\fR\|(1), \fBpdftops\fR\|(1), \fBpdftocairo\fR\|(1), \fBpdftoppm\fR\|(1)