diff --git a/.changeset/grumpy-rice-bake.md b/.changeset/grumpy-rice-bake.md new file mode 100644 index 000000000..f8aafc820 --- /dev/null +++ b/.changeset/grumpy-rice-bake.md @@ -0,0 +1,5 @@ +--- +"jtex": patch +--- + +Change typst exports to be less- conflict prone. diff --git a/packages/jtex/src/typst/imports.ts b/packages/jtex/src/typst/imports.ts index 803da0f76..b66658951 100644 --- a/packages/jtex/src/typst/imports.ts +++ b/packages/jtex/src/typst/imports.ts @@ -10,9 +10,9 @@ export function renderTypstImports( const { macros, commands } = templateImports ?? {}; const importStatements: string[] = []; const hasMacros = macros && macros.length > 0; - if (hasMacros) importStatements.push('#import "myst.typ": *'); + if (hasMacros) importStatements.push('#import "myst-imports.typ": *'); if (output && hasMacros) { - const mystTypst = path.join(path.dirname(output), 'myst.typ'); + const mystTypst = path.join(path.dirname(output), 'myst-imports.typ'); writeFileToFolder(mystTypst, macros.join('\n\n')); } if (commands && Object.keys(commands).length > 0) {