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

Add support for tectonic -X build #901

Merged
merged 2 commits into from
Jul 9, 2023
Merged

Conversation

figitaki
Copy link
Contributor

@figitaki figitaki commented Jul 6, 2023

When trying to setup texlab with tectonic's -X build functionality, I ran into an issue where forward sync was not able to find the output pdf. This occurs because tectonic outputs to $projectRoot/build/default/default.pdf. This change adds a configuration option for build.outputFilename which will override the derived pdf_path if present. This allows the for the following config (assuming Skim as the previewer)

{
  "texlab.auxDirectory": "build/default/",
  "texlab.build.filename": "default.pdf",

  "texlab.build.executable": "tectonic",
  "texlab.build.args": [
    "-X",
    "build",
    "--keep-logs",
    "--keep-intermediates"
  ],
  "texlab.build.onSave": true,
  "texlab.build.forwardSearchAfter": true,

  "texlab.forwardSearch.executable": "/Applications/Skim.app/Contents/SharedSupport/displayline",
  "texlab.forwardSearch.args": ["-g", "%l", "%p", "%f"]
}

Copy link
Member

@pfoerster pfoerster left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

crates/commands/src/fwd_search.rs Outdated Show resolved Hide resolved
@figitaki
Copy link
Contributor Author

figitaki commented Jul 9, 2023

Glad to contribute! Pushed some updates, lmk if that looks better. Can submit an update to the wiki if this lands too.

@pfoerster
Copy link
Member

Can submit an update to the wiki if this lands too.

Sure, looking forward! Thanks again for the PR.

@pfoerster pfoerster merged commit b0e7101 into latex-lsp:master Jul 9, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants