Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

Add support for ps and dvi file formats for latexmk builder #143

Merged
merged 3 commits into from
Nov 10, 2015
Merged

Add support for ps and dvi file formats for latexmk builder #143

merged 3 commits into from
Nov 10, 2015

Conversation

sometea
Copy link
Contributor

@sometea sometea commented Nov 5, 2015

Hi, I have added an option to create ps or dvi files instead of the default pdf when using the latexmk builder. Currently, this only works for latexmk, since I do not have access to texify.

@@ -59,6 +60,13 @@ export default class LatexmkBuilder extends Builder {
args.push(`-outdir="${outdir}"`)
}

if (outputFormat) {
if (outputFormat !== 'pdf') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines should probably be combined into

if (outputFormat && outputFormat !== 'pdf') {

Although since the config value is an enum, this should in reality always pass the first test, so in theory we should be able to remove the truthy check on outputFormat, hence reduce both if blocks down to

if (outputFormat !== 'pdf') {

@thomasjo
Copy link
Owner

thomasjo commented Nov 6, 2015

Overall this is brilliant work, and thank you for helping out! I left a few line comments that I would like to address before merging though. You should at least collapse those two if statements into a single one if you don't have time or interest in going the alternate route of the re-ordering of variable initialization. I'm happy to do that refactoring after merging, so just let me know you're preference.

@sometea
Copy link
Contributor Author

sometea commented Nov 6, 2015

Thanks for your comments, and thanks for this great package. I have followed your second suggestion and just moved the initialization of const outputFormat to before the initialization of args. I have also added a default value to outputFormat in case it is not defined. (The test checking for the default command line arguments fails otherwise.)

@thomasjo
Copy link
Owner

There are some minor things I'd like to tweak, but I can deal with that myself. Thanks so much for adding this @sometea. I really appreciate the help 🙇

thomasjo added a commit that referenced this pull request Nov 10, 2015
Add support for ps and dvi file formats for latexmk builder
@thomasjo thomasjo merged commit bbdcb22 into thomasjo:master Nov 10, 2015
@sometea
Copy link
Contributor Author

sometea commented Nov 10, 2015

Thanks for merging. Let me know if something else comes up that I could possibly help with.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants