import { CompileResult, EngineConfig, EngineHandle, EngineId, FileInput } from '../core/types'; export type LatexmkEngine = 'pdflatex' | 'xelatex' | 'lualatex'; export interface LatexmkOptions { engine: LatexmkEngine; mainTex: string; files: FileInput[]; /** * How to build the engines this driver needs. Every engine is a separate * wasm artifact, so at minimum each needs its `enginePath`; pass one config * for all of them, or a factory to vary it per engine: * * engineConfig: (id) => ({ enginePath: `/texlive-wasm/${id}.wasm`, bundleUrl }) * * Engines supplied via `handles` are used as-is and ignore this. */ engineConfig?: EngineConfig | ((id: EngineId) => EngineConfig); /** 'auto' (default) inspects the source; true forces; false skips. */ bibtex?: boolean | 'auto'; /** * biber for default-backend biblatex documents. 'auto' (default) runs it * when the sources load biblatex without `backend=bibtex`. Requires a * biber engine handle (or enginePath config) — the artifact is optional * and larger than the others (~10 MB + its VFS bundle). */ biber?: boolean | 'auto'; makeindex?: boolean | 'auto'; /** * Re-run for cross-refs/TOC. 'auto' (default) stops when .aux stabilizes; * false forces a single pass; { maxPasses } caps the loop. */ rerun?: boolean | 'auto' | { maxPasses: number; }; /** Pass -synctex=1 so the engine emits a .synctex.gz. Default: false. */ synctex?: boolean; /** * Deadline for the WHOLE pipeline, in ms — every pass and every helper * shares it, so a document that loops forever cannot outlive it by running * one more pass. Default: none (each individual invocation still carries * the wrapper default, see engines/base DEFAULT_RUN_TIMEOUT_MS). * Enforcing it terminates the engine worker. */ timeoutMs?: number; /** Cancels the pipeline — same worker-terminating semantics as `timeoutMs`. */ signal?: AbortSignal; /** Verbosity forwarded to engines this driver creates. */ verbose?: 'silent' | 'info' | 'debug'; /** * Engines to reuse instead of letting this driver build them from * `engineConfig` — e.g. handles kept alive by an EngineManager. */ handles?: { tex?: EngineHandle; bibtex?: EngineHandle; biber?: EngineHandle; makeindex?: EngineHandle; xdvipdfmx?: EngineHandle; }; } export interface LatexmkResult extends CompileResult { /** Number of TeX engine passes actually run. */ passes: number; } export declare function latexmk(opts: LatexmkOptions): Promise; /** * Public preview of latexmk's bibtex auto-detection. Apps that manage their * own EngineHandles (to pass `handles.bibtex` with a configured enginePath) * can ask up front whether a compile will invoke bibtexu, instead of * duplicating the detection heuristics. */ export declare function willRunBibtex(files: FileInput[]): boolean; /** Same preview for biber: default-backend biblatex documents. */ export declare function willRunBiber(files: FileInput[]): boolean; //# sourceMappingURL=index.d.ts.map