Documentation
¶
Index ¶
- Variables
- type BibData
- type TexLang
- func (tl *TexLang) BibData(fname string) *BibData
- func (tl *TexLang) CompleteCite(fss *pi.FileStates, origStr, str string, pos lex.Pos) (md complete.Matches)
- func (tl *TexLang) CompleteEdit(fss *pi.FileStates, text string, cp int, comp complete.Completion, seed string) (ed complete.Edit)
- func (tl *TexLang) CompleteLine(fss *pi.FileStates, str string, pos lex.Pos) (md complete.Matches)
- func (tl *TexLang) FindBibfile(fss *pi.FileStates, pfs *pi.FileState) (string, bool)
- func (tl *TexLang) FindBibliography(pfs *pi.FileState) string
- func (tl *TexLang) HiLine(fss *pi.FileStates, line int, txt []rune) lex.Line
- func (tl *TexLang) LexLine(fs *pi.FileState, line int, txt []rune) lex.Line
- func (tl *TexLang) Lookup(fss *pi.FileStates, str string, pos lex.Pos) (ld complete.Lookup)
- func (tl *TexLang) LookupCite(fss *pi.FileStates, origStr, str string, pos lex.Pos) (ld complete.Lookup)
- func (tl *TexLang) ParseDir(path string, opts pi.LangDirOpts) *syms.Symbol
- func (tl *TexLang) ParseFile(fss *pi.FileStates, txt []byte)
- func (tl *TexLang) ParseLine(fs *pi.FileState, line int) *pi.FileState
- func (tl *TexLang) Parser() *pi.Parser
Constants ¶
This section is empty.
Variables ¶
var LaTeXCmds = []string{
`\em`,
`\emph`,
`\textbf`,
`\textit`,
`\texttt`,
`\textsf`,
`\textrm`,
`\cite`,
`\incite`,
`\shortcite`,
`\tiny`,
`\scriptsize`,
`\footnotesize`,
`\small`,
`\normalsize`,
`\large`,
`\Large`,
`\LARGE`,
`\huge`,
`\Huge`,
`\begin`,
`\end`,
`enumerate`,
`itemize`,
`description`,
`\item`,
`figure`,
`table`,
`tabular`,
`array`,
`\hline`,
`\cline`,
`\multicolumn`,
`equation`,
`center`,
`\centering`,
`\verb`,
`verbatim`,
`quote`,
`\section`,
`\subsection`,
`\subsubsection`,
`\paragraph`,
}
LaTeXCmds is a big list of standard commands
var TheTexLang = TexLang{}
TheTexLang is the instance variable providing support for the Go language
Functions ¶
This section is empty.
Types ¶
type BibData ¶ added in v0.9.13
type BibData struct { File string `desc:"file name -- full path"` BibTex *bibtex.BibTex `desc:"bibtex data loaded from file"` Mod time.Time `desc:"mod time for loaded bibfile -- to detect updates"` }
BibData contains the bibliography data
type TexLang ¶
type TexLang struct { Pr *pi.Parser Bibs map[string]*BibData `desc:"bibliography data that has been loaded, keyed by abs file path"` }
TexLang implements the Lang interface for the Tex / LaTeX language
func (*TexLang) BibData ¶ added in v0.9.13
BibData returns the bib data for given bibfile, non-nil if exists
func (*TexLang) CompleteCite ¶ added in v0.9.13
func (tl *TexLang) CompleteCite(fss *pi.FileStates, origStr, str string, pos lex.Pos) (md complete.Matches)
CompleteCite does completion on citation
func (*TexLang) CompleteEdit ¶
func (tl *TexLang) CompleteEdit(fss *pi.FileStates, text string, cp int, comp complete.Completion, seed string) (ed complete.Edit)
func (*TexLang) CompleteLine ¶
func (*TexLang) FindBibfile ¶ added in v0.9.13
FindBibfile attempts to find the /bibliography file, and load it Returns full path to bib file if found and loaded, else "" and false. Sets meta data "bibfile" to resulting file if found, and deletes it if not
func (*TexLang) FindBibliography ¶ added in v0.9.13
func (*TexLang) Lookup ¶ added in v0.9.11
Lookup is the main api called by completion code in giv/complete.go to lookup item
func (*TexLang) LookupCite ¶ added in v0.9.13
func (tl *TexLang) LookupCite(fss *pi.FileStates, origStr, str string, pos lex.Pos) (ld complete.Lookup)
LookupCite does lookup on citation