Getting started

star-tex is written in Go. You will need to have a valid Go toolchain installed.

Install Go

Installing a Go toolchain is explained on the main Go website: https://golang.org/doc/install.

You can either:

  1. download the binaries for your operating system,
  2. install Go via your O/S package manager, or
  3. recompiled from sources.

Option 1) is recommanded (Go has a quick release cycle so package managers tend to lag a bit.)

It is always OK to download the latest Go version and upgrade regularly as the Go toolchain has a solid reputation of backward compatibility (since version 1.0.)

Once Go has been installed, you should be able to run:

$> go version
$> go env

Install Star-TeX

star-tex packages are installable with the go get command:

$> go get star-tex.org/x/tex/dvi

This will:

  • fetch the sources for tex/dvi (via git),
  • inspect the sources for package dependencies,
  • fetch the dependencies (recursively),
  • build and install the dependencies,
  • build and install the dvi package.

By default, go get compiles the package for your operating system and architecture. But you can easily cross-compile for other operating systems and architectures:

$> GOOS=linux   GOARCH=amd64 go get star-tex.org/x/tex/dvi
$> GOOS=windows GOARCH=386   go get star-tex.org/x/tex/dvi

The list of supported operating systems and architectures is given by:

$> go tool dist list

To install a package and all the packages or commands under it (and, of course, their dependencies), use the ellipsis ...:

$> go get star-tex.org/x/tex/...

Updating Star-TeX

To update your local install of star-tex, you would use again the go get command, with the -u switch:

$> go get -u star-tex.org/x/tex