From 3d9d9dd03a15d0c3056ee20857f751788f0f610b Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Wed, 24 Nov 2021 00:18:56 +0100 Subject: [PATCH] set TEXMFLOCAL --- lib/utils.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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'), + } + }, } }