Documentation
¶
Index ¶
- Constants
- Variables
- func CompilationError(message string, cause error, extra KV) error
- func InputError(message string, cause error, extra KV) error
- func QueueError(message string, cause error, extra KV) error
- func SetDefaultEngine(name string) error
- func SetJobBaseDir(dir string) error
- func SupportedEngines() (e []string)
- func UnknownError(message string, cause error, extra KV) error
- type Document
- type Engine
- type ErrInvalidWorkDir
- type ErrUnsupportedEngine
- type ErrWithCategory
- type File
- type KV
Constants ¶
View Source
const Mark = "%!texd"
Mark is used to help identifying the main input file from a list of potential candidates. This is a last resort measurement, clients should specify main files explicitly.
Variables ¶
View Source
var (
DefaultEngine = engines[0]
)
View Source
var ForbiddenFiles = []string{
"latexmkrc", ".latexmkrc",
}
ForbiddenFiles is a list of file names which are not allowed for security reasons.
View Source
var LatexmkDefaultFlags = []string{
"-cd",
"-silent",
"-pv-", "-pvc-",
}
Functions ¶
func SetDefaultEngine ¶
func SetJobBaseDir ¶
SetJobBaseDir will update the working directory for texd. If dir is empty, texd will fallback to os.TempDir(). The directory must exist, and it must be writable, otherwise a non-nil error is returned.
func SupportedEngines ¶
func SupportedEngines() (e []string)
Types ¶
type Document ¶
type Document interface {
WorkingDirectory() (string, error)
AddFile(name, contents string) error
AddFiles(req *http.Request) error
Cleanup() error
Image() string
Engine() Engine
SetMainInput(string) error
MainInput() (string, error)
GetResult() (io.ReadCloser, error)
GetLogs() (io.ReadCloser, error)
}
func NewDocument ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func ParseEngine ¶
func (Engine) LatexmkCmd ¶
latexmk builds a command line for latexmk invocation.
type ErrInvalidWorkDir ¶
type ErrInvalidWorkDir struct {
// contains filtered or unexported fields
}
func (*ErrInvalidWorkDir) Error ¶
func (err *ErrInvalidWorkDir) Error() string
func (*ErrInvalidWorkDir) Unwrap ¶
func (err *ErrInvalidWorkDir) Unwrap() error
type ErrUnsupportedEngine ¶
type ErrUnsupportedEngine string
func (ErrUnsupportedEngine) Error ¶
func (err ErrUnsupportedEngine) Error() string
type ErrWithCategory ¶
type ErrWithCategory struct {
// contains filtered or unexported fields
}
func (*ErrWithCategory) Error ¶
func (err *ErrWithCategory) Error() string
func (*ErrWithCategory) MarshalJSON ¶
func (err *ErrWithCategory) MarshalJSON() ([]byte, error)
func (*ErrWithCategory) Unwrap ¶
func (err *ErrWithCategory) Unwrap() error
Click to show internal directories.
Click to hide internal directories.