Name
htex.SetOutputMode -- set output mode
Synopsis
htex.SetOutputMode(mode[, f$])
Function
This function can be used to configure hTeX's output mode. This allows you to redirect hTeX's output to a PDF document, an SVG image, or a PNG image. You have to pass the desired output mode in the mode parameter. This can be one of the following special constants:

#HTEX_OUTPUT_HOLLYWOOD
Draw the text to Hollywood's current output device, e.g. the current Hollywood display or a Hollywood brush if SelectBrush() is active. This is the default mode.

#HTEX_OUTPUT_SVG
Draw the text to an SVG image. If you use this mode, you also have to pass the optional argument f$ which must be set to the name of the output file.

#HTEX_OUTPUT_PDF
Draw the text to a PDF document. If you use this mode, you also have to pass the optional argument f$ which must be set to the name of the output file.

#HTEX_OUTPUT_PNG
Draw the text to a PNG image. If you use this mode, you also have to pass the optional argument f$ which must be set to the name of the output file.

Inputs
mode
desired output mode (see above)
f$
optional: desired output file; this must only be passed if the mode argument is not #HTEX_OUTPUT_HOLLYWOOD
Example
SetFont("latex", 72, {Loader = "hTeX"})
SetFontStyle(#ANTIALIAS)
SetFontColor(#BLACK)
htex.SetOutputMode(#HTEX_OUTPUT_PDF, "test.pdf")
text$ = "\\int_{now}^{+\\infty} \\text{Keep trying}"
TextOut(#CENTER, #CENTER, text$)
The code will save the LaTeX-formatted text to a file named test.pdf instead of drawing it to Hollywood's current output device.

Show TOC