conf

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WritePandocJson

func WritePandocJson(path string, c *Config) error

Types

type Config

type Config struct {
	Meta struct {
		Title  string      `toml:"title"`
		Author interface{} `toml:"author"`
		Date   string      `toml:"date"` // String or list of strings
	} `toml:"meta"`
	Build struct {
		Filename     string `toml:"filename" default:"document"`
		Engine       string `toml:"engine" default:"pdflatex"`
		LuaFilters   bool   `toml:"lua-filters" default:"true"`
		OutputFormat string `toml:"output-format" default:"pdf"`
	} `toml:"build"`
	Style struct {
		TwoColumn      bool     `toml:"two-column" default:"false"`
		NumberSections bool     `toml:"number-sections" default:"false"`
		DocumentClass  string   `toml:"document-class" default:"article"`
		ClassOptions   []string `toml:"class-options"` // String or list of strings
	} `toml:"style"`
	Bib struct {
		Csl                 string `toml:"csl"` // Default is Chicago MoS 17th Ed.
		BibliographyFile    string `toml:"bibliography-file" default:"references.bib"`
		BibliographyTitle   string `toml:"bibliography-title"`
		LinkCitations       bool   `toml:"link-citations" default:"true"`
		IncludeBibliography bool   `toml:"include-bibliography" default:"true"`
	} `toml:"bib"`
	Latex struct {
		Packages []string `toml:"packages"`
		Header   string   `toml:"header"`
	} `toml:"latex"`
	Html struct {
		Header string `toml:"header"`
	} `toml:"html"`
}

func ConfigFromFile

func ConfigFromFile(path string) (*Config, error)

type PandocConfig

type PandocConfig struct {
	Title               string      `json:"title,omitempty"`
	Author              interface{} `json:"author,omitempty"`
	Date                string      `json:"date"`
	DocumentClass       string      `json:"documentclass"`
	ClassOptions        []string    `json:"classoption,omitempty"`
	NumberSections      bool        `json:"numbersections"`
	BiblographyTitle    string      `json:"reference-section-title,omitempty"`
	Csl                 string      `json:"csl,omitempty"`
	LinkCitations       bool        `json:"link-citations"`
	HeaderIncludes      string      `json:"header-includes,omitempty"`
	SupressBibliography bool        `json:"supress-bibliography"`
}

Jump to

Keyboard shortcuts

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