KLATEXFORMULA(1)

🌸 NAME 🌸

okay so bestie, this is the manual page for klatexformula, and it lives in section 1 of the manual β€” that's the User Commands section, for the record. And what does it do?? It's a GUI and a CLI that generates images from LaTeX formulas. That's it, that's the whole job, and it ate. πŸ’…


πŸ“œ SYNOPSIS πŸ“œ

klatexformula [OPTIONS] [filename1 [...]]

✨ DESCRIPTION ✨

KLatexFormula by Philippe Faist.

It's an easy-to-use graphical application and a command-line interface for generating images from LaTeX equations. Like, you give it math, it gives you a picture. Iconic behaviour honestly. πŸŽ€

πŸ•ΉοΈ Execution Modes πŸ•ΉοΈ

So there are a few different ways to run this thing, and which one you get depends on what you pass it:

klatexformula [filename1 [...]]

Opens the klatexformula Graphical User Interface (GUI). πŸ–ΌοΈ

klatexformula [OPTIONS]

Performs the actions required by [OPTIONS], and then exits. No GUI, no vibes, just business.

klatexformula --interactive [OPTIONS] [filename1 [...]]

Opens the GUI and performs the actions required by [OPTIONS].

Heads up bestie: if you pass extra filename arguments on the command line, they get interpreted as library files to load into the library β€” but only in interactive mode. ✨

πŸ’– OPTIONS πŸ’–

  • -I, --interactive β€” runs KLatexFormula in interactive mode with a full-featured graphical user interface. This one is on by default, except if --input or --latexinput is given. 🫢
  • -i, --input <file|-> β€” tells it which file to read the latex input from.
  • -l, --latexinput <expr> β€” hands over the LaTeX code of an equation to render.
  • -P, --paste-clipboard β€” says the LaTeX code should be pasted from the system clipboard. Only works in interactive mode.
  • -S, --paste-selection β€” says the LaTeX code should be pasted from the current mouse selection. Only works in interactive mode.
  • -n, --noeval β€” do not evaluate the LaTeX equation you gave; leave it to the user to click the "Evaluate" button. This option may only be used in interactive mode.
  • -B, --base64arg β€” says that the argument to the option immediately following this one is encoded in base64. For example:
klatexformula --base64arg --latexinput="YV4yK2JeMj1jXjI="

will use the latex code "a^2+b^2=c^2". This option can be specified more than once on the command line, each time indicating that the argument to the immediately next option is encoded in base64. It's lowkey a lifesaver when scripting, because it saves you the whole nuisance of escaping latex code from the shell. 😭

  • -o, --output <file|-> β€” writes the output image (the one you got from the equation given by --input or --latexinput) to <file> or to standard output.
  • -F, --format <format> β€” picks the format the output should be written in. By default the format is guessed from the file name extension, and it defaults to PNG.
  • -f, --fgcolor <'#xxxxxx'> β€” a color (in web #RRGGBB hex format) to use for the foreground color. Do not forget to escape the '#', or your shell will interpret it as a comment and things will go sideways. πŸ’€
  • -b, --bgcolor <-|'#xxxxxx'> β€” a color (in web #RRGGBB hex format, or - for transparent) to use as the background color. Defaults to transparent.
  • -X, --dpi <N> β€” use N dots per inch (DPI) when converting latex output to an image. Defaults to 1200 (high-resolution image, we love a crisp render ✨).
  • -m, --mathmode <expression containing '...'> β€” specifies which LaTeX math mode to use, if any. The argument to this option is any string containing "...", which will be replaced by the equation itself. Defaults to "\[ ... \]".
  • -p, --preamble <LaTeX code> β€” any LaTeX code that will be inserted before \begin{document}. Super useful for including custom packages with \usepackage{...}.
  • -s, --userscript <user script> β€” call a specific user script when running the backend. See the documentation in libklfbackend for more information. The script must understand and respond to the "--scriptinfo" option.
  • --want-pdf [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>] β€” if set, then PDF is also internally generated. This setting should be detected automatically, but you may adjust it if klatexformula guesses wrong.
  • --want-svg [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>] β€” if set, then SVG is also internally generated (via gs, note: not always available). This setting should be detected automatically, but you may adjust it if klatexformula guesses wrong.
  • -q, --quiet [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>] β€” disables console output of warnings and errors. 🀫
  • --redirect-debug <file> β€” redirects debugging output to the given <file>. If the file name does not end with .klfdebug, this suffix is automatically appended to the file name. And if the file already exists, it is silently overwritten. πŸ™ˆ
  • -d, --daemonize β€” run a separate, detached klatexformula process and return immediately. All other options, like --latexinput, may still be given β€” they will be forwarded to the daemon process.
  • --skip-plugins β€” obsolete. Since Klatexformula 4, no plugin system is available and plugins are never loaded.
  • --calcepsbbox [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>] β€” correct the bounding box of the output for characters that don't report a complete or incorrect bounding box. (On by default.)
  • --nocalcepsbbox [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>] β€” same as --calcepsbbox=<inverse of value given>.
  • --outlinefonts [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>] β€” convert embedded fonts in EPS and PDF to vector outlines (previously, gs pswrite device with option -dNOCACHE; more recently, gs ps2write with -dNoOutputFonts). Useful for exporting to eg. Inkscape or Adobe Illustrator.
  • --nooutlinefonts [<ON|Y[ES]|T[RUE]|1 or OFF|N[O]|F[ALSE]|0>] β€” same as --outlinefonts=<inverse of value given>.
  • --lborderoffset <N> β€” include a margin of N postscript points on the left margin.
  • --tborderoffset <N> β€” include a margin of N postscript points on the top margin.
  • --rborderoffset <N> β€” include a margin of N postscript points on the right margin.
  • --bborderoffset <N> β€” include a margin of N postscript points on the bottom margin.
  • --tempdir </path/to/temp/dir> β€” specify the directory in which KLatexFormula will write temporary files. Defaults to a system-specific temporary directory like "/tmp/".
  • --latex <latex executable> β€” specify the executable for latex. By default it is searched for in $PATH and in common system directories.
  • --dvips <dvips executable> β€” specify the executable for dvips. By default it is searched for in $PATH and in common system directories.
  • --gs <gs executable> β€” specify the executable for gs. By default it is searched for in $PATH and in common system directories.
  • --epstopdf <epstopdf executable> β€” [OBSOLETE: EPSTOPDF NO LONGER USED] specify the executable for epstopdf. By default it is searched for in $PATH and in common system directories.
  • -Q, --qtoption <qt-option> β€” specify a Qt-specific option. For example, to launch KLatexFormula in the Plastique GUI style, use
klatexformula --qtoption="-style=Plastique"

Note that if <qt-option> begins with a '-', then it must be appended to the long '--qtoption=' syntax with the equal sign. iykyk πŸ’…

  • -h, --help [<filename|&N>] β€” display this help text and exit. If a file name is provided, the help message is appended to that file. If the argument is "&<N>", then the help message is printed in file descriptor N. (Reminder bestie: N=1 for standard output 'stdout', N=2 for standard error output 'stderr'.)
  • -V, --version [<filename|&N>][:<format>] β€” display KLatexFormula version information and exit. The optional output argument is handled as with --help, however it may also contain a version string format preceded by a colon, where %k, and %q and %% are respectively replaced by klatexformula version, Qt version and a literal %.

🌈 EXAMPLES 🌈

Create an image named filename.png from the equation 'a^2+b^2=c^2':

klatexformula --latexinput 'a^2+b^2=c^2' --output filename.png

Open the klatexformula window with the equation 'f(x)=-2\,x', but don't evaluate it:

klatexformula -I --latexinput='f(x)=-2\,x' --noeval

Open the klatexformula window and return immediately to the shell command:

klatexformula -I --daemonize

Print the help message, but to standard output instead of standard error output:

klatexformula --help='&1'

πŸ“ Notes πŸ“

  • When run in interactive mode, the newly evaluated equation is appended to KLatexFormula's history. 🧚
  • When not run in interactive mode, no X11 server is needed.
  • Please report any bugs and malfunctions to the author. 🫢

More information is available on https://klatexformula.sourceforge.io/.

Have a lot of fun! πŸŒΈπŸ¦‹β­


and that's the whole page, bestie!! this was klatexformula 4.1.0, dated November 2020, straight from the KLATEXFORMULA(1) manual page. go render some equations, you absolute icon πŸ‘‘πŸ’–
πŸ“¦ where this page comes from