document

package
v0.0.0-...-10c6b56 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package document provides utility functions for rendering a LaTeX document. A document can be any paper or electronic document transmitted This package was an attempt for me to use text/template to make writing LaTeX code easier.

It is also IDeal for reports and repetitive LaTeX tasks. Nothing that is here cannot be programmed in TeX itself, well almost.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PartialLatexFiles

func PartialLatexFiles(path string)

PartialLatexFiles is a function that can get a number of files and include them in the templates or process them indivIDually

func Run

func Run()

Run is a runner for executing the commands.

func SetDefaults

func SetDefaults(doc *Doc)

SetDefaults function provides a ...

func Show

func Show(c *Doc)

Show is a function for outputting the document to stdout

func TestWriteFile

func TestWriteFile()

TestWriteFile Just a test to see if I can use the Afero FS Maybe better to go to minio or both. Minio uses a db and maybe best to avoID it, although don't see why it could be used with S3

Types

type Doc

type Doc struct {
	//scriptContext   *script.Context
	DocumentID   string `default:"DocumentID"`
	DocumentType string `default:"DocumentType"`
	Bucket       string

	UserID          string // user capturing the record
	Title           string `default:"You need a Title"` // don't leave spaces after var
	Body            string `default:"\\lipsum"`
	HTMLTemplate    string
	LatexTemplate   string `default:"book.tex"`
	Language        string `default:"EN"`
	Cover           interface{}
	DateCreated     string
	DateLastRevised string
	Author          string `default:"Dr. Y. Lazarides"`
	Maintainer      string
	Settings        latexSettings
	// contains filtered or unexported fields
}

Doc describes the structure of a publication. A publication can be anything from a letter, a poem, a report, an article, proceedings or even an encyclopedia. Anything that can be printed as a pdf. It can also be a website!

func New

func New(latexClass string) *Doc

New Creates a new Document type in memory

type DocI

type DocI interface {
	Options()
	Wrap()
	Compile()
	Render()
	Upload()
	Mail()
	Paths()
	Show()
}

DocI defines the interface for all type of documents. It provides methods to render a document through templates and to store it either locally or on the cloud.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL