latexparser

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractPDFPath added in v0.1.6

func ExtractPDFPath(inputPath string) string

ExtractPDFPath attempts to extract the PDF path from the expected cache location

func VerifyPDFExists added in v0.1.6

func VerifyPDFExists(pdfPath string) bool

VerifyPDFExists checks if the PDF file actually exists on disk This is the most reliable way to determine compilation success

Types

type Issue

type Issue struct {
	Level   IssueLevel
	File    string
	Line    int
	Message string
}

Issue represents a compilation issue (error or warning)

type IssueLevel added in v0.1.6

type IssueLevel int
const (
	LevelError IssueLevel = iota
	LevelWarning
	LevelInfo
)

func (IssueLevel) String added in v0.1.6

func (l IssueLevel) String() string

type ParseResult

type ParseResult struct {
	Errors      []Issue
	Warnings    []Issue
	HasPDF      bool
	PDFPath     string
	CompletedOK bool // latexmk completed without fatal errors
}

ParseResult holds the parsing results

func ParseLatexOutput

func ParseLatexOutput(output string) *ParseResult

ParseLatexOutput parses LaTeX/latexmk output comprehensively

func (*ParseResult) FormatIssues added in v0.1.6

func (pr *ParseResult) FormatIssues() string

FormatIssues returns a formatted string of all issues

func (*ParseResult) GetSummary

func (pr *ParseResult) GetSummary() string

GetSummary returns a human-readable summary of the compilation

func (*ParseResult) IsFatalError added in v0.1.6

func (pr *ParseResult) IsFatalError() bool

IsFatalError returns true if there are critical errors that prevented PDF generation

func (*ParseResult) IsSuccess

func (pr *ParseResult) IsSuccess() bool

IsSuccess returns true if compilation was successful (PDF exists)

Jump to

Keyboard shortcuts

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