Skip to content
forked from rwestlund/gotex

A Go library for rendering LaTeX documents

License

Notifications You must be signed in to change notification settings

DerLukas15/gotex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gotex

A simple Go library for rendering LaTeX documents

Install

go get -u github.com/DerLukas15/gotex

Documentation

See the documentation at https://godoc.org/github.com/DerLukas15/gotex

Example

package main

import "github.com/DerLukas15/gotex"

func main() {
    var document = `
        \documentclass[12pt]{article}
        \begin{document}
        This is a LaTeX document.
        \end{document}
        `
    var pdf, err = gotex.Render(document, gotex.Options{
        Command: "/usr/bin/pdflatex",
        Runs: 1,
        Texinputs:"/my/asset/dir:/my/other/asset/dir"})

    if err != nil {
        log.Println("render failed ", err)
    } else {
        // Do something with the PDF file, like send it to an HTTP client
        // or write it to a file.
        sendSomewhere(pdf)
    }
}

License

This code is under the BSD-2-Clause license.

About

A Go library for rendering LaTeX documents

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%