Skip to content

Commit 66b7c0e

Browse files
committed
Only keep tex when rendering pdf
1 parent da0a71b commit 66b7c0e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/project/types/manuscript/manuscript.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ import {
5252
kWarning,
5353
} from "../../../config/constants.ts";
5454
import { projectOutputDir } from "../../project-shared.ts";
55-
import {
56-
isHtmlOutput,
57-
isIpynbOutput,
58-
isLatexOutput,
59-
} from "../../../config/format.ts";
55+
import { isHtmlOutput, isLatexOutput } from "../../../config/format.ts";
6056
import {
6157
PandocInputTraits,
6258
PandocOptions,
@@ -297,9 +293,6 @@ export const manuscriptProjectType: ProjectType = {
297293
// Default to cosmo theme
298294
config[kTheme] = "cosmo";
299295

300-
// By default, keep tex and clean things up ourselves
301-
config[kKeepTex] = true;
302-
303296
return config;
304297
},
305298
create: (title: string): ProjectCreate => {
@@ -545,6 +538,11 @@ export const manuscriptProjectType: ProjectType = {
545538
};
546539
}
547540
extras[kNotebooks] = Object.values(outputNbs);
541+
} else if (isArticle && isLatexOutput(format.pandoc)) {
542+
if (isLatexOutput(format.pandoc)) {
543+
// By default, keep tex and clean things up ourselves
544+
format.render[kKeepTex] = true;
545+
}
548546
}
549547

550548
// Resolve input links

0 commit comments

Comments
 (0)