Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4347 max-print-line should be added to string when magic tex arg is present #4385

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

James-Yu
Copy link
Owner

When there is a %!TeX options magic comment, all TeX program arguments are provided to cs.spawn as one string with { shell: true} option enabled. In such a case, prepending --max-print-line arg will supress other arguments. See https://github.com/James-Yu/LaTeX-Workshop/blob/6adc47f2049efa9c79899f5cb6e261d9089bb8bf/src/compile/build.ts#L210

There are two ways to resolve the issue:

  1. Instead of unshifting the max-print-line arg, we prepend it to the arg string when creating recipe.
  2. Joining arguments with space when spawning process.

Both ones are fine, and I decided to use the first to make internal variables more consistent with behavior.

Further, a unit test is designed.

@James-Yu James-Yu linked an issue Sep 15, 2024 that may be closed by this pull request
4 tasks
@James-Yu James-Yu merged commit cd8f79b into master Sep 15, 2024
7 of 10 checks passed
@James-Yu James-Yu deleted the 4347-miktex-tex-option branch September 15, 2024 05:13
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2024
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.

% !TEX program = latexmk -xelatex -synctex=1 doesn't work
1 participant