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 Render ¶
func Render(c *Doc)
Render the document through a set of templates document.Render() http://stackoverflow.com/questions/11467731/is-it-possible-to-have-nested-templates-in-go-using-the-standard-library-googl/11468132#11468132 https://elithrar.github.io/article/approximating-html-template-inheritance/
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!