1KLATEXFORMULA(1) User Commands KLATEXFORMULA(1)
2
3
4
6 klatexformula - GUI and CLI to generate images from LaTeX formulas
7
9 klatexformula [OPTIONS] [filename1 [...]]
10
12 KLatexFormula by Philippe Faist
13
14 An easy-to-use graphical application and command-line interface for
15 generating images from LaTeX equations.
16
17 Execution Modes:
18 klatexformula [filename1 [...]]
19
20 Opens klatexformula Graphical User Interface (GUI)
21
22 klatexformula [OPTIONS]
23
24 Performs actions required by [OPTIONS], and exits
25
26 klatexformula --interactive [OPTIONS] [filename1 [...]]
27
28 Opens the GUI and performs actions required by [OPTIONS]
29
30 If additional filename arguments are passed to the command line,
31 they are interpreted as library files to load into the library
32 (only in interactive mode).
33
35 -I, --interactive
36
37 Runs KLatexFormula in interactive mode with a full-featured
38 graphical user interface. This option is on by default, except
39 if --input or --latexinput is given.
40
41 -i, --input <file|->
42
43 Specifies a file to read latex input from.
44
45 -l, --latexinput <expr>
46
47 Specifies the LaTeX code of an equation to render.
48
49 -P, --paste-clipboard
50
51 -S, --paste-selection
52
53 Specifies that the LaTeX code should be pasted from the system
54 clipboard or current mouse selection. Works only in interactive
55 mode.
56
57 -n, --noeval
58
59 Do not evaluate the LaTeX equation given, leave it to the user
60 to click on the "Evaluate" button. This option may only be used
61 in interactive mode.
62
63 -B, --base64arg
64
65 Specifies that the argument to the option immediately following
66 this one is encoded in base64. For example:
67
68 klatexformula --base64arg --latexinput="YV4yK2JeMj1jXjI="
69
70 will use the latex code "a^2+b^2=c^2". This option can be spec‐
71 ified more than once on the command line, each time indicating
72 that the argument to the immediately next option is encoded in
73 base64. This option can be useful when scripting, to avoid the
74 nuisance of having to escape latex code from the shell.
75
76 -o, --output <file|->
77
78 Specifies to write the output image (obtained from equation
79 given by --input or --latexinput) to <file> or standard output.
80
81 -F, --format <format>
82
83 Specifies the format the output should be written in. By de‐
84 fault, the format is guessed from file name extension and de‐
85 faults to PNG.
86
87 -f, --fgcolor <'#xxxxxx'>
88
89 Specifies a color (in web #RRGGBB hex format) to use for fore‐
90 ground color. Don't forget to escape the '#' to prevent the
91 shell from interpreting it as a comment.
92
93 -b, --bgcolor <-|'#xxxxxx'>
94
95 Specifies a color (in web #RRGGBB hex format, or '-' for trans‐
96 parent) to use as background color (defaults to transparent)
97
98 -X, --dpi <N>
99
100 Use N dots per inch (DPI) when converting latex output to image.
101 Defaults to 1200 (high-resolution image).
102
103 -m, --mathmode <expression containing '...'>
104
105 Specifies which LaTeX math mode to use, if any. The argument to
106 this option is any string containing "...", which will be re‐
107 placed by the equation itself. Defaults to "\[ ... \]"
108
109 -p, --preamble <LaTeX code>
110
111 Any LaTeX code that will be inserted before \begin{document}.
112 Useful for including custom packages with \usepackage{...}.
113
114 -s, --userscript <user script>
115
116 Call a specific user script when running the backend. See the
117 documentation in libklfbackend for more information. The script
118 must understand and respond to the "--scriptinfo" option.
119
120 --want-pdf [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>]
121
122 If set, then PDF is also internally generated. This setting
123 should be detected automatically but you may adjust it if kla‐
124 texformula guesses wrong.
125
126 --want-svg [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>]
127
128 If set, then SVG is also internally generated (via gs, note: not
129 always available). This setting should be detected automatically
130 but you may adjust it if klatexformula guesses wrong.
131
132 -q, --quiet [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>]
133
134 Disable console output of warnings and errors.
135
136 --redirect-debug <file>
137
138 Redirects debugging output to the given <file>. If the file name
139 does not end with .klfdebug, this suffix is automatically ap‐
140 pended to the file name. If the file exists, it is silently
141 overwritten.
142
143 -d, --daemonize
144
145 Run a separate, detached, klatexformula process and return imme‐
146 diately. All other options, like --latexinput, may still be
147 given. They will be forwared to the daemon process.
148
149 --skip-plugins
150
151 Obsolete. Since Klatexformula 4, no plugin system is available
152 and plugins are never loaded.
153
154 --calcepsbbox [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>]
155
156 Correct the bounding box of the output for characters that don't
157 report a complete or incorrect bounding box. (On by default.)
158
159 --nocalcepsbbox [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>]
160
161 Same as --calcepsbbox=<inverse of value given>
162
163 --outlinefonts [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>]
164
165 Convert embedded fonts in EPS and PDF to vector outlines (previ‐
166 ously, gs pswrite device with option -dNOCACHE; more recently,
167 gs ps2write with -dNoOutputFonts). Useful for exporting to eg.
168 Inkscape or Adobe Illustrator.
169
170 --nooutlinefonts [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>]
171
172 Same as --outlinefonts=<inverse of value given>
173
174 --lborderoffset <N>
175
176 --tborderoffset <N>
177
178 --rborderoffset <N>
179
180 --bborderoffset <N>
181
182 Include a margin of N postscript points on left, top, right, or
183 bottom margin respectively.
184
185 --tempdir </path/to/temp/dir>
186
187 Specify the directory in which KLatexFormula will write tempo‐
188 rary files. Defaults to a system-specific temporary directory
189 like "/tmp/".
190
191 --latex <latex executable>
192
193 --dvips <dvips executable>
194
195 --gs <gs executable>
196
197 --epstopdf <epstopdf executable>
198
199 [OBSOLETE: EPSTOPDF NO LONGER USED] Specifiy the executable for
200 latex, dvips, gs or epstopdf. By default, they are searched for
201 in $PATH and in common system directories.
202
203 -Q, --qtoption <qt-option>
204
205 Specify a Qt-specific option. For example, to launch KLatexFor‐
206 mula in Plastique GUI style, use
207
208 klatexformula --qtoption="-style=Plastique"
209
210 Note that if <qt-option> begins with a '-', then it must be ap‐
211 pended to the long '--qtoption=' syntax with the equal sign.
212
213 -h, --help [<filename|&N>]
214
215 Display this help text and exit. If a file name is provided,
216 the help message is appended to that file. If the argument is
217 "&<N>", then the help message is printed in file descriptor N.
218 (Reminder: N=1 for standard output 'stdout', N=2 for standard
219 error output 'stderr')
220
221 -V, --version [<filename|&N>][:<format>]
222
223 Display KLatexFormula version information and exit. The op‐
224 tional output argument is handled as with --help, however it may
225 also contain a version string format preceded by a colon where
226 %k, and %q and %% are respectively replaced by klatexformula
227 version, Qt version and a literal %.
228
230 Create an image named filename.png from the equation
231 'a^2+b^2=c^2':
232
233 klatexformula --latexinput 'a^2+b^2=c^2' --output filename.png
234
235 Open klatexformula window with equation 'f(x)=-2\,x', but don't
236 evaluate it:
237
238 klatexformula -I --latexinput='f(x)=-2\,x' --noeval
239
240 Open klatexformula window and return immediately to shell com‐
241 mand:
242
243 klatexformula -I --daemonize
244
245 Print help message, but to standard output instead of standard
246 error output:
247
248 klatexformula --help='&1'
249
250 Notes:
251 When run in interactive mode, the newly evaluated equation is
252 appended to KLatexFormula's history.
253
254 When not run in interactive mode, no X11 server is needed.
255
256 Please report any bugs and malfunctions to the author.
257
258 More information is available on https://klatexformula.sourceforge.io/.
259
260 Have a lot of fun!
261
262
263
264klatexformula 4.1.0 July 2021 KLATEXFORMULA(1)