diff --git a/lib/utils.ts b/lib/utils.ts index 8d6c24c..05630bb 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -16,6 +16,12 @@ export function getPdfPath(id: string) { export function getTexCmd(id: string): { cmd: string; options: ExecOptions } { return { cmd: `pdflatex -interaction nonstopmode ${getDocPath(id)}`, - options: { cwd: getDirPath(id) }, + options: { + cwd: getDirPath(id), + env: { + ...process.env, + TEXMFHOME: path.join(process.cwd(), 'texmf'), + } + }, } }