Code Monkey home page Code Monkey logo

gotex's Introduction

gotex

A simple Go library for rendering LaTeX documents

Install

go get -u github.com/rwestlund/gotex

Documentation

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

Example

package main

import "github.com/rwestlund/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.

gotex's People

Contributors

rwestlund avatar

Watchers

Publifye AS avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.