Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookImageType ¶
type BookImageType int
const ( BookImageTypePNG BookImageType = iota BookImageTypeJPG )
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue allows to run LaTeX and to convert the output into images.
func NewQueue ¶
NewQueue creates a new rendering queue for converting .tex files to images. The argument 'resolution' specifies the image resolution in pixels per inch.
func (*Queue) Finish ¶
Finish must be called after the last rendering job has been submitted to the queue. The function waits until all rendered images have been delivered and then shuts down the queue.
func (*Queue) Submit ¶
Submit adds a new rendering job to the queue. As part of the job, the template tmpl is executed with the given data to obtain a TeX file. Pdflatex is run with this file as input, and Ghostscript is used to convert each page of output into an image. The resulting images can be read from the channel returned by .Submit().